# AgentWork Web Evidence - Change Detection

> AgentWork Web Evidence - Change Detection is a paid API for AI agents from api.agentwork.run, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-15).

Checks whether a public webpage has changed since a previous read, returning either a compact changed/unchanged flag or a line-level diff of added and removed content.

## Facts

- Endpoint: POST https://api.agentwork.run/v1/web/changes
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentwork-web-evidence-change-detection-46142c90
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_WKmyXPrXwDttloKIE-U11

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 agentwork-web-evidence-change-detection-46142c90 -d '<json body>'
```

Example prompt: Check whether the pricing page at https://example.com/pricing has changed since my last read — here's the SHA-256 hash from before: 3a5b9c... — just tell me if it changed or not, no need for a full diff.

## When to prefer this

Choose this endpoint when you need a lightweight, stateless change-detection check for a specific public webpage without storing history server-side — ideal for recurring monitoring loops where the caller maintains the baseline (SHA-256 or prior text). Prefer the SHA-256 mode for bandwidth efficiency when you only need a changed/unchanged signal, and the previous_text mode when you need a precise line-level diff. This is better than a full page-fetch endpoint when the primary goal is detecting modifications rather than ingesting new content.

## Known failure modes

- Non-public or private URLs return an error — only publicly accessible HTTP/HTTPS pages on ports 80/443 are supported
- JavaScript-rendered content will not be captured — only static HTML/text is fetched
- URLs resolving to non-public IPv4 addresses (e.g. internal IPs) are rejected
- If max_chars differs between calls, comparisons may be unreliable — callers must keep this value consistent
- Malformed or incorrect previous_sha256 (not a valid 64-character hex string) will be rejected
- Payment failure over x402 protocol results in the check not being performed
- Pages exceeding 60,000 characters after truncation may produce incomplete diffs

## How this service works

Web reads and change checks: $0.005 on Base, $0.01 on Algorand; digital PDF-to-text $0.01. Structured JSON, hashes and x402 USDC. No API key.

## Output

Returns a JSON object with ok status, the current page URL, extracted plain text (up to max_chars), a fetch timestamp, and a comparison object containing a boolean 'changed' flag plus arrays of 'added' and 'removed' lines (populated only when previous_text was supplied). When only a SHA-256 hash is provided, the comparison includes 'changed' but no line diff.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "format": "uri",
   "maxLength": 2048,
   "description": "Public HTTP/HTTPS URL; ports 80/443 and public IPv4 resolution only"
  },
  "max_chars": {
   "type": "integer",
   "default": 20000,
   "maximum": 60000,
   "minimum": 1000,
   "description": "Maximum returned characters; keep identical between comparisons"
  },
  "previous_text": {
   "type": "string",
   "maxLength": 60000,
   "description": "Exact text from the prior read, for line additions/removals"
  },
  "previous_sha256": {
   "type": "string",
   "pattern": "^[a-fA-F0-9]{64}$",
   "description": "Prior text_sha256; provides a compact change check without line diff"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "url": "https://example.com/",
  "text": "Example Domain\nNew line",
  "comparison": {
   "added": [
    "New line"
   ],
   "changed": true,
   "removed": [
    "Old line"
   ]
  },
  "fetched_at": "2026-09-08T00:00:00Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentwork-web-evidence-change-detection-46142c90/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.agentwork.run](https://www.zero.xyz/host/api.agentwork.run/llms.txt)
