# Document Extraction Hub — Pay-Per-Page OCR & Structured JSON Extraction

> Document Extraction Hub — Pay-Per-Page OCR & Structured JSON Extraction is a paid API for AI agents from doc.netzhandwerker.de, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-11).

Extracts structured JSON data with field positions and confidence scores from PDFs or images, decoding QR codes and barcodes, paid per page in USDC via x402 with no signup required.

## Facts

- Endpoint: POST https://doc.netzhandwerker.de/document?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/document-extraction-hub-pay-per-page-ocr-structured-json-extraction-53ff0b65
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_eCDxI7I93uevm8Re9cIuf

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 document-extraction-hub-pay-per-page-ocr-structured-json-extraction-53ff0b65 -d '<json body>'
```

Example prompt: Extract all fields from this invoice PDF at https://example.com/invoice.pdf — map them to my schema with vendor name, invoice number, line items, and total amount, and give me confidence scores and page positions for each field.

## When to prefer this

Choose this endpoint when you need structured JSON output from PDFs or document images with field-level provenance (page number and position), especially when your use case requires mapping document content to a custom schema. Ideal for invoice processing, form digitization, contract parsing, and logistics label decoding. Preferred over general OCR tools when you need per-field confidence scores, barcode/QR decoding in the same call, and no-signup pay-per-page billing via USDC x402.

## Known failure modes

- Document URL is not publicly accessible — returns an error indicating the URL could not be fetched
- PDF is encrypted or password-protected — extraction fails or returns empty fields
- Page range exceeds the 20-page limit per call — returns a validation error
- Both url and pdf_base64 are supplied simultaneously — returns a schema validation error
- Low-quality scan or image resolution causes OCR confidence to be very low — fields returned with low confidence scores or empty
- Payment via x402 fails or is insufficient — request is rejected with a 402 status before processing

## How this service works

PDF or picture in, structured JSON out, with a page and a position behind every field, plus every QR code and barcode decoded. Paid per page in USDC over x402. No signup, no API key.

## Output

A structured JSON object containing: mapped field values from the document matched to the provided schema (with confidence scores and page/position coordinates for each), decoded QR code and barcode values, and optionally raw extracted tables, headers, and key-value pairs if include_raw is enabled.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "format": "uri",
   "description": "Public http or https URL of the PDF. Use this or \"pdf_base64\", not both."
  },
  "pages": {
   "anyOf": [
    {
     "type": "string"
    },
    {
     "type": "array",
     "items": {
      "type": "integer",
      "minimum": 1
     }
    }
   ],
   "description": "Optional page range, for example \"1-5\", \"2,4,7\" or [1,2,3]. At most 20 pages per call."
  },
  "schema": {
   "type": "object",
   "description": "Optional JSON Schema. Every property is looked up in the document and returned with value, confidence and source. A property that is not in the document stays empty."
  },
  "pdf_base64": {
   "type": "string",
   "description": "The PDF as base64. Use this or \"url\", not both."
  },
  "include_raw": {
   "type": "boolean",
   "default": false,
   "description": "With a schema, also return header data, tables and key value pairs alongside the mapped result."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/document-extraction-hub-pay-per-page-ocr-structured-json-extraction-53ff0b65/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from doc.netzhandwerker.de](https://www.zero.xyz/host/doc.netzhandwerker.de/llms.txt)
