# Extract Invoice Data

> Extract Invoice Data is a paid API for AI agents from api.agentwonderland.com, paid per call via x402, $0.1/call, status unknown (last checked 2026-09-15).

Extracts structured data from an invoice document, including vendor details, line items, amounts, dates, tax, and payment terms.

## Facts

- Endpoint: POST https://api.agentwonderland.com/x402/endpoints/extract-invoice-data
- Price: $0.1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/extract-invoice-data-c2ea3194
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_3El06RXjm_FwZ48gGeT7k

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 extract-invoice-data-c2ea3194 -d '<json body>'
```

Example prompt: Can you extract all the structured data from this invoice PDF — I need the vendor name, line items, amounts, dates, tax, and payment terms: https://example.com/invoice-2024-Q1.pdf

## When to prefer this

Choose this endpoint when you need to automatically parse invoice documents (PDF, DOCX, or image formats) into structured, machine-readable data for accounting, ERP, or accounts payable workflows. It is best suited for cases where you have a document URL or base64-encoded file and need vendor, line item, tax, and payment term fields extracted in one call. Prefer it over general-purpose OCR when you specifically need invoice-domain semantics and structured output.

## Known failure modes

- Document URL is inaccessible or returns a non-200 status — extraction fails with a fetch error
- File format is unsupported or corrupted — returns parsing error
- Base64 data is malformed or truncated — returns decoding error
- Invoice image is too low resolution to extract text reliably — returns partial or empty results
- Document is not an invoice (e.g. a contract or report) — returns incorrect or empty structured fields

## How this service works

Extract Invoice Data: Extract structured data from an invoice: vendor, line items, amounts, dates, tax, payment terms.

## Output

Returns structured JSON containing extracted invoice fields: vendor name and details, individual line items with descriptions and amounts, subtotal, tax amounts, total amount due, invoice date, due date, and payment terms.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "document": {
   "type": "string",
   "title": "Document",
   "description": "Document URL or base64-encoded file data",
   "json_schema_extra": {
    "example": "https://example.com/contract.pdf"
   }
  },
  "fileExtension": {
   "type": "string",
   "title": "Fileextension",
   "default": ".pdf",
   "description": "File extension when providing base64 data (e.g. .pdf, .docx, .png)"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/extract-invoice-data-c2ea3194/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.agentwonderland.com](https://www.zero.xyz/host/api.agentwonderland.com/llms.txt)
