# fetchwerk Structured Web Extraction

> fetchwerk Structured Web Extraction is a paid API for AI agents from fetch.netzhandwerker.de, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-11).

Fetches a single web page and fills a caller-supplied JSON Schema with extracted data, reporting source and confidence for every field.

## Facts

- Endpoint: POST https://fetch.netzhandwerker.de/structured?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fetchwerk-structured-web-extraction-649c34d2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_y8MF1zw11CNLcpiLJ_h_x

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 fetchwerk-structured-web-extraction-649c34d2 -d '<json body>'
```

Example prompt: Fetch the page at https://example.com/product/123 and extract the data into this schema: {"type":"object","properties":{"title":{"type":"string"},"price":{"type":"number"},"inStock":{"type":"boolean"}}}, using strict mode so I only get back data that fully matches.

## When to prefer this

Choose this endpoint when you have a precise, caller-defined schema and need both extracted values and per-field provenance (source + confidence). It is ideal when schema validation matters — strict mode prevents partial data from silently passing through. Prefer it over generic scrapers when you need typed, validated output rather than raw HTML or Markdown. If you only need article text or page metadata, sibling endpoints for Markdown extraction or metadata extraction are more appropriate.

## Known failure modes

- 422 Unprocessable Entity if strict mode is enabled and extracted data violates the schema — no charge applied
- 422 if the submitted schema uses forbidden composition keywords ($ref, oneOf, anyOf, allOf, if/then) or exceeds 200 fields or max_depth
- 404 or fetch error if the target URL is unreachable or returns a non-200 response
- Partial data with errors list when strict=false and the page content does not fully satisfy the schema
- Timeout if the target page is slow to load or behind a login wall
- Low confidence scores if the page content is sparse, heavily JavaScript-rendered, or obfuscated

## How this service works

Fill a caller supplied JSON Schema from one web page and report source and confidence for every field.

## Output

A JSON object whose shape matches the submitted schema, with each field populated from the fetched web page. Each field is annotated with a source reference (e.g. CSS selector or text position) and a confidence score between 0 and 1. In strict mode, a 422 error with a validation error list is returned (and no charge applied) if the result violates the schema; in non-strict mode, partial data is returned alongside the error list.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "format": "uri",
   "description": "Absolute http or https URL to read."
  },
  "schema": {
   "type": "object",
   "description": "Target JSON Schema, draft 2020-12. Only the types object, array, string, number, integer, boolean and null are accepted; composition keywords such as $ref, oneOf, anyOf, allOf and if/then are refused. At most 200 fields and no deeper than max_depth. The root must describe an object."
  },
  "strict": {
   "type": "boolean",
   "default": true,
   "description": "true rejects the call with 422 when the result violates the submitted schema, so no partial data is returned and nothing is charged. false returns the partial data with the error list."
  },
  "max_depth": {
   "type": "integer",
   "default": 3,
   "maximum": 4,
   "minimum": 1,
   "description": "Maximum nesting depth the submitted schema may use. A deeper schema is refused before payment."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "url": "https://example.com/product",
  "data": {
   "name": "Example widget",
   "price": 19.9
  },
  "charged": true,
  "confidence": {
   "name": 1,
   "price": 1
  },
  "validation": {
   "valid": true,
   "errors": []
  },
  "field_sources": {
   "name": "jsonld",
   "price": "jsonld"
  },
  "unavailable_fields": []
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/fetchwerk-structured-web-extraction-649c34d2/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from fetch.netzhandwerker.de](https://www.zero.xyz/host/fetch.netzhandwerker.de/llms.txt)
