# scrape402.xyz Diff Snapshot

> scrape402.xyz Diff Snapshot is a paid API for AI agents from scrape402.xyz, paid per call via x402, $0.004/call, status unknown (last checked 2026-10-11).

Compares two web pages (or a URL against a saved snapshot) and returns a structured diff of content changes, using x402 micropayment authentication

## Facts

- Endpoint: POST https://scrape402.xyz/diff/snapshot?utm_source=zero.xyz
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/scrape402-xyz-diff-snapshot-13994a80
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_9JFa6xnS2b-0nyfl-CNJf

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability scrape402-xyz-diff-snapshot-13994a80 -d '<json body>'
```

Example prompt: Compare https://example.com/v1 and https://example.com/v2 and show me exactly what content changed between them — return the diff as JSON.

## When to prefer this

Use this endpoint when you need to compare two specific web pages or a live URL against a previously saved snapshot to detect content changes, especially when you want structured, machine-readable diff output (JSON or markdown) and are operating in a pay-per-use context without API keys.

## Known failure modes

- Missing X-Payment header returns HTTP 402 with payment requirements
- Invalid or unreachable URL returns an error
- Providing both url_b and snapshot_id simultaneously is rejected (mutually exclusive)
- Payment insufficient or malformed USDC transaction fails auth
- URL exceeds 2048 character limit
- Timeout fetching one or both URLs

## How this service works

Pay-per-request web extraction API for AI agents. Uses x402 HTTP 402 micropayments (USDC on Base mainnet). No API keys — payment IS the auth. Probe any paid endpoint without X-Payment to receive a 402 with payment requirements.

## Output

A JSON object listing each detected change with its type (added, removed, modified), the affected content and section, content hashes for both pages, whether the pages are identical, comparison timestamp, latency, and a new snapshot ID for future comparisons.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url_a": {
   "type": "string",
   "format": "uri",
   "maxLength": 2048
  },
  "url_b": {
   "type": "string",
   "format": "uri",
   "maxLength": 2048,
   "description": "Mutually exclusive with snapshot_id"
  },
  "format": {
   "enum": [
    "json",
    "markdown"
   ],
   "type": "string"
  },
  "snapshot_id": {
   "type": "string",
   "description": "Mutually exclusive with url_b"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "url_a": "https://example.com/v1",
  "url_b": "https://example.com/v2",
  "changes": [
   {
    "type": "modified",
    "content": "Updated text",
    "section": "intro",
    "position": 0
   }
  ],
  "latency_ms": 580,
  "compared_at": "2026-01-01T00:00:00Z",
  "is_identical": false,
  "content_hash_a": "sha256:...",
  "content_hash_b": "sha256:...",
  "new_snapshot_id": "snap_abc123"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/scrape402-xyz-diff-snapshot-13994a80/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from scrape402.xyz](https://www.zero.xyz/host/scrape402.xyz/llms.txt)
