# PageWatch Web Extraction API

> PageWatch Web Extraction API is a paid API for AI agents from pagewatch.zenith-ops.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-31).

Extracts structured data (prices, lists, tables, events, links, text) from public web pages using CSS selectors and various extraction modes

## Facts

- Endpoint: GET https://pagewatch.zenith-ops.workers.dev/v1/pro/extract?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pagewatch-web-extraction-api-b51f95fc
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_V4dTe8rj8jJ7UrhUV6nst

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 pagewatch-web-extraction-api-b51f95fc
```

Example prompt: Can you extract the current price from this product page https://example.com/product/123 using the CSS selector '.price-now' in price mode?

## When to prefer this

Choose this endpoint when you need to extract specific structured data from a known static public web page — particularly prices, tables, event lists, or CSS-targeted text — without needing JavaScript rendering. It is ideal for one-shot data pulls from product pages, public directories, or news sites. Prefer alternatives if the target page requires JavaScript (SPA/React sites), requires authentication, or if you need full-site crawling rather than single-page extraction.

## Known failure modes

- URL is not publicly accessible or uses a non-standard port — returns error
- Page requires JavaScript rendering (only static HTML is supported) — returns empty or incomplete data
- CSS selector is malformed or exceeds 300 characters — returns validation error
- Selected element or table index not found on page — returns empty match with matched:0
- URL resolves to a private IP or non-public DNS — blocked for security
- fields parameter exceeds 20 fields in list mode — returns validation error
- Requested URL returns non-HTML content — extraction may fail or return unexpected results

## How this service works

Extract prices, lists, tables and events from public web pages and get notified when they change. RSS, ICS, signed webhooks, MCP. Static HTML only.

## Output

Returns a JSON object containing the extracted data under a 'data' key, the extraction mode used, the final resolved URL, a fetch timestamp, and metadata including match count and whether results were truncated. For 'page' mode, includes title, headings, word count, content hash, canonical URL, and description. For other modes, data is mode-specific (price string, array of list items, array of table rows, etc.).

## 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": {
      "all": {
       "type": "string",
       "description": "mode=text: return every match instead of the first (true/false)."
      },
      "url": {
       "type": "string",
       "description": "Public http(s) page URL (ports 80/443, public DNS name)."
      },
      "attr": {
       "type": "string",
       "description": "Attribute name for mode=attr."
      },
      "mode": {
       "enum": [
        "text",
        "attr",
        "list",
        "table",
        "price",
        "events",
        "page",
        "links",
        "json"
       ],
       "type": "string",
       "description": "What to extract. Default text."
      },
      "match": {
       "type": "string",
       "description": "Regular expression filter for mode=links."
      },
      "fields": {
       "type": "string",
       "description": "JSON object for mode=list: {\"name\":\"css\" or \"css@attr\"}, max 20 fields."
      },
      "format": {
       "enum": [
        "json",
        "csv",
        "ics"
       ],
       "type": "string",
       "description": "json (default), csv, or ics (events mode)."
      },
      "jsonpath": {
       "type": "string",
       "description": "JSONPath-lite for mode=json, for example $.items[0].price."
      },
      "sameHost": {
       "type": "string",
       "description": "mode=links: only links on the page's own host (true/false)."
      },
      "selector": {
       "type": "string",
       "description": "CSS selector (max 300 characters). Required for text, attr and list."
      },
      "tableIndex": {
       "type": "string",
       "description": "mode=table: zero-based index of the table to read."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "url": "https://example.com/",
  "data": {
   "h1": [],
   "title": "Example Domain",
   "canonical": null,
   "wordCount": 25,
   "contentHash": "e4d13b4926b39ea0",
   "description": null
  },
  "meta": {
   "matched": 1,
   "truncated": false
  },
  "mode": "page",
  "final_url": "https://example.com/",
  "fetched_at": "2026-10-18T10:16:15.654Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pagewatch-web-extraction-api-b51f95fc/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from pagewatch.zenith-ops.workers.dev](https://www.zero.xyz/host/pagewatch.zenith-ops.workers.dev/llms.txt)
