# Webpage Change Detector / Content Diff Monitor

> Webpage Change Detector / Content Diff Monitor is a paid API for AI agents from x402-deployer.x402-deployer.workers.dev, paid per call via x402, $0.04/call, status unknown (last checked 2026-09-14).

Fetches a URL, strips HTML to plain text, hashes it with SHA-256, and returns a changed flag plus added/removed line diffs compared to a previous hash or text, with optional CSS selector scoping.

## Facts

- Endpoint: POST https://x402-deployer.x402-deployer.workers.dev/webpage-diff
- Price: $0.04/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-deployer-x402-deployer-workers-dev-5a9d9593
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_mLf99lqzP2GFWK9Jp2uFB

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-deployer-x402-deployer-workers-dev-5a9d9593 -d '<json body>'
```

Example prompt: Check if the pricing page at https://example.com/pricing has changed since last time — I have the previous hash abc123def456, and I only care about the #pricing-table section.

## When to prefer this

Choose this endpoint when you need to detect whether a specific webpage has changed over time, especially for price monitoring, status page watching, policy/TOS diffs, or any scenario where you have a previous hash or text snapshot and want a structured added/removed line diff. Prefer this over full scraping tools when you only need change detection, not full structured data extraction.

## Known failure modes

- URL is unreachable or returns non-200 status — error response indicating fetch failure
- Invalid or malformed URL — validation error
- CSS selector matches no elements — diff performed on full page or empty scope returned
- Redirects loop infinitely — timeout or redirect error
- Page content is entirely JavaScript-rendered with no static HTML — returns empty or minimal text

## How this service works

Webpage change detector / website change monitor / content diff / page-watch / visualping-style monitor / price-page monitor / status-page watcher / TOS-policy diff. Fetches a URL, strips HTML to plain text, computes a SHA-256 hash, and (when given a previous hash or text) returns a changed flag plus added/removed line lists. Optional CSS selector scopes the diff to one region. No login required; follows redirects.

## Output

Returns a 'changed' boolean flag, the new SHA-256 hash of the page text, and lists of added and removed lines compared to the previous content. If no previous hash or text is provided, returns only the current hash and extracted text.

## Example request

```json
{
 "input": {
  "body": {
   "url": "https://example.com",
   "selector": "body"
  },
  "type": "http",
  "method": "POST",
  "bodyType": "json"
 }
}
```

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "required": [
      "url"
     ],
     "properties": {
      "url": {
       "type": "string",
       "description": "Page URL to fetch (http or https). Server follows redirects and reports the final_url."
      },
      "selector": {
       "type": "string",
       "description": "Optional CSS selector to scope the diff (e.g. 'article', '#price'). When set, only matched element text is hashed and compared."
      },
      "previous_hash": {
       "type": "string",
       "description": "SHA-256 of a prior fetch, hex-encoded. If provided, response.changed compares against this hash."
      },
      "previous_text": {
       "type": "string",
       "description": "Prior plain-text content from a previous fetch. If provided, response.diff returns added/removed line arrays."
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "url": {
       "type": "string"
      },
      "diff": {
       "type": "null"
      },
      "changed": {
       "type": "boolean"
      },
      "selector": {
       "type": "null"
      },
      "final_url": {
       "type": "string"
      },
      "char_count": {
       "type": "integer"
      },
      "status_code": {
       "type": "integer"
      },
      "current_hash": {
       "type": "string"
      },
      "current_text": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-deployer-x402-deployer-workers-dev-5a9d9593/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-deployer.x402-deployer.workers.dev](https://www.zero.xyz/host/x402-deployer.x402-deployer.workers.dev/llms.txt)
