# Web Scraper API – Structured Extraction

> Web Scraper API – Structured Extraction is a paid API for AI agents from scrape.payapi.market, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-23).

Scrapes a webpage and returns structured data including headings, images, tables, lists, and metadata via a single POST request with x402 micropayment.

## Facts

- Endpoint: POST https://scrape.payapi.market/scrape/structured?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-23
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/web-scraper-api-structured-extraction-1bd09a9b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_0Y89B5FHFygY_tO9YrzCM

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 web-scraper-api-structured-extraction-1bd09a9b -d '<json body>'
```

Example prompt: Can you scrape https://en.wikipedia.org/wiki/Artificial_intelligence and pull out all the headings, tables, and images in structured format?

## When to prefer this

Choose this endpoint when you need structured extraction of HTML content — headings, images, tables, and lists — from a publicly accessible webpage, especially in agentic workflows requiring micropayment-gated access via x402. It is ideal for single-page extraction tasks where the output needs to be immediately machine-readable without additional HTML parsing on your side.

## Known failure modes

- Invalid or unreachable URL returns an error response
- Pages with heavy JavaScript rendering may return incomplete content
- Paywalled or login-protected pages cannot be scraped
- x402 payment failure if wallet balance is insufficient or payment not configured
- Redirects to unexpected domains may yield unintended content
- Rate limits may apply for high-frequency scraping

## How this service works

HTML scraping (text, links, metadata, structured) with x402 payments and MCP server.

## Output

A JSON object containing the scraped page's URL, final redirected URL, extracted headings (with level), images (with src, alt, width, height), tables (as 2D arrays), lists (with type and items), and counts of each element type.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "description": "Absolute http(s) URL of the page to scrape, e.g. 'https://example.com'."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "url": "https://example.com",
  "lists": [
   {
    "type": "ul",
    "items": [
     "First item",
     "Second item"
    ]
   }
  ],
  "counts": {
   "lists": 1,
   "images": 1,
   "tables": 1,
   "headings": 1
  },
  "images": [
   {
    "alt": "Example logo",
    "src": "https://example.com/logo.png",
    "width": "200",
    "height": "80"
   }
  ],
  "tables": [
   [
    [
     "Header A",
     "Header B"
    ],
    [
     "Row 1A",
     "Row 1B"
    ]
   ]
  ],
  "headings": [
   {
    "text": "Example Domain",
    "level": 1
   }
  ],
  "final_url": "https://example.com/"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/web-scraper-api-structured-extraction-1bd09a9b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from scrape.payapi.market](https://www.zero.xyz/host/scrape.payapi.market/llms.txt)
