# DocExtract — PDF to Structured JSON

> DocExtract — PDF to Structured JSON is a paid API for AI agents from x402-docextract.onrender.com, paid per call via x402, $0.1/call, status unknown (last checked 2026-10-19).

Uploads a PDF and returns structured JSON extraction including tables, line items, totals, parties, dates, full text, and document metadata

## Facts

- Endpoint: POST https://x402-docextract.onrender.com/extract?utm_source=zero.xyz
- Price: $0.1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/docextract-pdf-to-structured-json-a2e1ac82
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_CtdZvrsGW-x2Nm2yCzsMd

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 docextract-pdf-to-structured-json-a2e1ac82 -d '<json body>'
```

Example prompt: Can you extract all the tables, line items, totals, and party names from this PDF invoice and give me the results as structured data?

## When to prefer this

Choose this endpoint when you need to extract structured information (tables, line items, parties, dates, totals) from PDF documents programmatically, especially for financial, legal, or business documents. Prefer it over generic text extraction when structured JSON output and per-field parsing are required, and over OCR-only tools when semantic structure (line items, totals, parties) matters as much as raw text.

## Known failure modes

- Non-PDF file uploaded — server rejects binary that is not a valid PDF
- Corrupted or password-protected PDF — extraction fails or returns partial data
- Scanned image-only PDF with no OCR layer — text extraction may be empty or incomplete
- Network timeout on very large PDFs — upload or processing may time out
- Payment authorization insufficient — if actual cost exceeds the $0.10 cap, the call may be rejected

## How this service works

Upload a PDF and receive structured extraction: tables, line items, totals, parties, dates, full text, and metadata. Payment via x402 upto scheme: the client authorizes up to $0.10 and the server settles the actual per-page price ($0.02 + $0.005/page). Terms of service: GET /terms (free).

## Output

A structured JSON object containing extracted tables, line items, totals, named parties, dates, full document text, and metadata such as page count and document structure — priced at $0.02 base plus $0.005 per page, settled via x402 up-to payment authorization.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "file": {
   "type": "string",
   "format": "binary",
   "description": "The PDF document"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/docextract-pdf-to-structured-json-a2e1ac82/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-docextract.onrender.com](https://www.zero.xyz/host/x402-docextract.onrender.com/llms.txt)
