# AgentData Document Extraction API

> AgentData Document Extraction API is a paid API for AI agents from agentdata-api.sander-van-aard.workers.dev, paid per call via x402, $0.25/call, status unknown (last checked 2026-10-28).

Extracts structured JSON data from documents (PDF, DOCX, XLSX, HTML, images, plain text) according to a user-supplied JSON Schema, returning one filled JSON object per call.

## Facts

- Endpoint: POST https://agentdata-api.sander-van-aard.workers.dev/doc/extract?utm_source=zero.xyz
- Price: $0.25/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-28
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentdata-document-extraction-api-ac6c0050
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_AT0ys2VpPFOm6_yWABpyD

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 agentdata-document-extraction-api-ac6c0050 -d '<json body>'
```

Example prompt: Can you extract the invoice number, vendor name, line items, and total amount from this PDF invoice I just uploaded? Use a schema with those four fields and give me back a JSON object.

## When to prefer this

Choose this endpoint when you need to extract specific, named fields from a heterogeneous document (PDF, DOCX, XLSX, HTML, image, or plain text) into a guaranteed-schema JSON object in a single call. It is especially useful for invoice processing, contract analysis, CV parsing, and form digitization where you control the output schema. Prefer it over general-purpose LLM document Q&A when you need deterministic, schema-conformant JSON output rather than free-text answers, and when you want per-call pricing with no account setup.

## Known failure modes

- 400 error returned for unreadable or corrupt input documents (no charge applied)
- Fields absent from the document come back as null rather than errored
- Document exceeds 10 MB size limit resulting in rejection
- Unsupported file types or malformed base64 encoding cause extraction failure
- Schema mismatch may result in all-null output if schema does not align with document content

## How this service works

Structured data from any document for AI agents, $0.25 per call: send a PDF, DOCX, XLSX, HTML, image or plain text plus a JSON Schema, get back one JSON object filled from the document — invoices, contracts, forms, CVs, receipts. Fields the document does not state come back null. One call, url or base64 (max 10 MB). Unreadable input means a 400 and you pay nothing. USDC on Base, no account.

## Output

A single JSON object whose keys match the supplied JSON Schema, with values filled from the document content. Any field the document does not explicitly state is returned as null. The response is always one JSON object per call.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object"
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "headers": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentdata-document-extraction-api-ac6c0050/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentdata-api.sander-van-aard.workers.dev](https://www.zero.xyz/host/agentdata-api.sander-van-aard.workers.dev/llms.txt)
