# Watch & Diff — HTTP Headers Fetch

> Watch & Diff — HTTP Headers Fetch is a paid API for AI agents from watch-diff.agent-utils.workers.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-14).

Fetches the HTTP response headers for a given URL, returning status, redirect info, timing, and all headers without downloading the full body.

## Facts

- Endpoint: GET https://watch-diff.agent-utils.workers.dev/v1/headers
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/watch-diff-http-headers-fetch-6a8da43d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_lomxBDQ3FNTBj9yXwp-gu

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 watch-diff-http-headers-fetch-6a8da43d
```

Example prompt: Fetch the HTTP headers for https://example.com/data.json and tell me its ETag, Last-Modified, and whether it redirected anywhere.

## When to prefer this

Use this endpoint when you only need HTTP metadata (headers, status, redirect chain, latency) for a URL without downloading and parsing the full body. It is ideal for lightweight change detection using ETag or Last-Modified, uptime probing, content-type pre-checks, and redirect auditing. Prefer it over full-page fetch or diff endpoints when you do not need body content. It charges per call via x402 micropayments with no API key setup required.

## Known failure modes

- URL is unreachable or DNS fails — returns ok: false with an error message
- URL exceeds 2 MB body limit — may error or truncate
- Non-HTTP/HTTPS URLs are rejected
- Payment via x402 fails or wallet has insufficient USDC — request is rejected before fetch
- Target server returns no headers or times out — partial or error response

## How this service works

Did this URL change since my last check? Fetch, normalize, hash and diff any page, region or JSON for AI agents running recurring tasks. State per paying wallet, 90 days. Pay per call over x402, no API key.

## Output

A JSON object with: ok (boolean), url (the requested URL), status (HTTP status code), headers (key-value map of all response headers such as ETag, Last-Modified, Cache-Control, Content-Type, Server), finalUrl (URL after any redirects), redirected (boolean), checkedAt (ISO timestamp), and responseMs (round-trip latency in milliseconds).

## 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"
     ],
     "properties": {
      "url": {
       "type": "string",
       "format": "uri",
       "description": "Absolute http(s) URL to fetch (max 2 MB body)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "ok": {
       "type": "boolean"
      },
      "url": {
       "type": "string"
      },
      "status": {
       "type": "integer"
      },
      "headers": {
       "type": "object",
       "additionalProperties": {
        "type": "string"
       }
      },
      "finalUrl": {
       "type": "string"
      },
      "checkedAt": {
       "type": "string"
      },
      "redirected": {
       "type": "boolean"
      },
      "responseMs": {
       "type": "integer"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "url": "https://example.com/",
  "status": 200,
  "headers": {
   "etag": "\"8423…\"",
   "server": "ECAcc",
   "content-type": "text/html; charset=UTF-8",
   "cache-control": "max-age=3600",
   "last-modified": "Mon, 13 Jan 2025 20:11:20 GMT",
   "content-length": "1256"
  },
  "finalUrl": "https://example.com/",
  "checkedAt": "2026-09-06T21:10:00.000Z",
  "redirected": false,
  "responseMs": 95
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/watch-diff-http-headers-fetch-6a8da43d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from watch-diff.agent-utils.workers.dev](https://www.zero.xyz/host/watch-diff.agent-utils.workers.dev/llms.txt)
