# Web Scraper API – Structured Elements Extractor

> Web Scraper API – Structured Elements Extractor is a paid API for AI agents from web-scraper-api-production-bf20.up.railway.app, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-02).

Extracts structured HTML elements from a webpage including heading hierarchy (h1–h6), lists, tables as 2D arrays, and images with alt text, plus element counts.

## Facts

- Endpoint: POST https://web-scraper-api-production-bf20.up.railway.app/scrape/structured?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/web-scraper-api-structured-elements-extractor-bb5caed3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_23IGxpPcbP5e41g1H5Zlq

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-elements-extractor-bb5caed3 -d '<json body>'
```

Example prompt: Can you scrape https://en.wikipedia.org/wiki/Solar_System and give me all the headings, tables, lists, and images with their alt text as structured data?

## When to prefer this

Choose this endpoint when you need structured HTML elements (headings, tables, lists, images) extracted as typed, machine-readable arrays from a URL — rather than plain text content or link extraction. Ideal for outline analysis, table data extraction, image auditing, and content structure inspection. Prefer this over the plain-text scraper when you need hierarchical or tabular structure preserved, and over the links extractor when your goal is content elements rather than hyperlinks.

## Known failure modes

- Invalid or non-absolute URL returns a 400 validation error
- Unreachable or non-existent URL results in a connection/fetch error
- Pages with heavy JavaScript rendering may return incomplete or empty structured elements if content is rendered client-side
- Pages behind authentication or paywalls return no usable content
- Very large pages may time out or return partial results
- Pages with no structured elements (headings, tables, lists, images) return empty arrays with zero counts

## How this service works

Extract structured elements: heading hierarchy (h1-h6), lists, tables as 2D arrays, and images with alt text, plus element counts.

## Output

Returns structured JSON containing: an array of headings (each with level h1–h6 and text), an array of lists (ordered/unordered with items), tables represented as 2D arrays of cell values, images with their src URLs and alt text, and a summary of element counts for each 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'."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/web-scraper-api-structured-elements-extractor-bb5caed3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from web-scraper-api-production-bf20.up.railway.app](https://www.zero.xyz/host/web-scraper-api-production-bf20.up.railway.app/llms.txt)
