# x402-changed

> x402-changed is a paid API for AI agents from x402-extract-wg5z.onrender.com, paid per call via x402, $0.008/call, status unknown (last checked 2026-11-04).

Performs a deterministic line diff of any public URL's current content against previously seen text, returning added/removed lines and change detection.

## Facts

- Endpoint: GET https://x402-extract-wg5z.onrender.com/v1/changed?utm_source=zero.xyz
- Price: $0.008/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-04
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-changed-e1aacb0a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_D1N_thh0nzlDLKARg0Eab

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 x402-changed-e1aacb0a
```

Example prompt: Check if https://example.com/pricing has changed since I last saw it — here's the text I saved before: 'Basic plan $9/mo, Pro plan $29/mo, Enterprise contact us.' Tell me exactly what lines were added or removed.

## When to prefer this

Choose this endpoint when you need a stateless, deterministic line-level diff of a public webpage against a known baseline you supply — ideal when you are storing your own snapshots and want explicit added/removed line arrays rather than just a changed/unchanged signal. Prefer over full-scrape endpoints when change detection and diff precision are the primary goal, and you already hold the previous text. The x402 micropayment model makes it cost-effective for high-frequency polling of many URLs.

## Known failure modes

- URL is not publicly accessible or returns non-200 status — fetch fails
- 'previous' text exceeds 10,000 character limit — request rejected
- URL uses non-HTTP/HTTPS scheme — not supported
- Page returns dynamic/JS-rendered content that differs from static fetch — may show spurious diffs
- Payment not completed or insufficient USDC balance — 402 Payment Required
- Network timeout fetching the target URL — transient error

## How this service works

What changed on a page since you last saw it: deterministic line diff of any public URL against text you supply. $0.008 USDC per call on Base.

## Output

Returns a JSON object with a boolean 'changed' flag, SHA-256 hashes of both the current and previous page text, arrays of up to 50 added lines and up to 50 removed lines, and integer counts of total added and removed lines, plus the checked URL.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "url",
      "previous"
     ],
     "properties": {
      "url": {
       "type": "string",
       "description": "Public http(s) page to check (same fetch rules as /extract)"
      },
      "previous": {
       "type": "string",
       "description": "The text you last saw (≤10,000 chars). The server is stateless: it holds no baseline, you supply it."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "changed",
      "current_hash",
      "previous_hash",
      "added_count",
      "removed_count",
      "added",
      "removed",
      "url"
     ],
     "properties": {
      "url": {
       "type": "string"
      },
      "added": {
       "type": "array",
       "items": {
        "type": "string"
       },
       "description": "New lines (max 50)"
      },
      "changed": {
       "type": "boolean"
      },
      "removed": {
       "type": "array",
       "items": {
        "type": "string"
       },
       "description": "Gone lines (max 50)"
      },
      "added_count": {
       "type": "integer"
      },
      "current_hash": {
       "type": "string",
       "description": "SHA-256 of the current page text"
      },
      "previous_hash": {
       "type": "string",
       "description": "SHA-256 of the supplied previous text"
      },
      "removed_count": {
       "type": "integer"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-changed-e1aacb0a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-extract-wg5z.onrender.com](https://www.zero.xyz/host/x402-extract-wg5z.onrender.com/llms.txt)
