# fetchwerk Structured Web Extraction

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

Fetches a single web page and populates a caller-supplied JSON Schema with extracted data, returning a source citation and confidence score for every field.

## Facts

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

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-f18473f3 -d '<json body>'
```

Example prompt: Go to https://en.wikipedia.org/wiki/OpenAI and extract the fields foundingDate (string), headquarters (string), and numberOfEmployees (integer) — use strict mode so I only get a result if all fields are valid.

## When to prefer this

Choose this endpoint when you have a precise, caller-defined schema and need per-field provenance and confidence alongside the extracted values. It is ideal for agentic workflows that require schema validation guarantees (strict mode) or partial-data fallback (strict=false) and need traceability of where each datum came from. Prefer this over generic scraping endpoints when you own the schema definition and correctness guarantees matter.

## Known failure modes

- 422 Unprocessable Entity — submitted schema uses unsupported keywords ($ref, oneOf, anyOf, allOf, if/then) or exceeds 200 fields or max_depth 4
- 422 Unprocessable Entity — extracted data violates schema in strict=true mode; no charge applied
- URL is unreachable or returns non-200 status — extraction fails with an error
- Page content is too sparse or ambiguous for the model to map fields — low confidence scores or missing values returned in strict=false mode
- Schema root is not an object type — call is refused before payment

## 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 conforming to the submitted schema, where each field is populated with data extracted from the target page. Every field includes a source reference (e.g. XPath or text snippet) and a numerical confidence score. If strict mode is on and the result violates the schema, the call returns a 422 with an error list and no charge is applied. If strict mode is off, partial data is returned alongside any validation errors.

## 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."
  }
 }
}
```

## More

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