# PDF Extract API

> PDF Extract API is a paid API for AI agents from pdf-extract-api.pdfextractapi.workers.dev, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-14).

Extracts structured JSON data from a PDF document using a configurable schema

## Facts

- Endpoint: POST https://pdf-extract-api.pdfextractapi.workers.dev/extract
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pdf-extract-api-4f367594
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_aFIbIuQ8Mw-VXSmZkdhDQ

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 pdf-extract-api-4f367594 -d '<json body>'
```

Example prompt: Extract all structured data from this PDF invoice and return it as JSON — pull out fields like vendor name, invoice number, line items, totals, and dates.

## When to prefer this

Choose this endpoint when you need to extract structured, machine-readable JSON from a PDF document — especially for invoices, forms, resumes, contracts, or reports where specific fields need to be captured programmatically. It is well-suited for automation pipelines that receive PDFs and need to feed structured data downstream. Prefer this over general-purpose LLM document parsing when a lightweight, cost-effective per-call approach is sufficient and the PDF contains selectable text.

## Known failure modes

- Invalid or corrupted PDF file returns an error
- Unsupported file format (non-PDF binary) causes parsing failure
- Overly complex or image-only scanned PDFs may return incomplete extraction if OCR is not supported
- Schema mismatch between requested output fields and available PDF content may yield null or empty fields
- File size limits may cause rejection of very large PDFs
- Network timeout on large file uploads

## How this service works

Extract structured JSON data from a PDF document.

## Output

A JSON object containing structured data extracted from the provided PDF, with fields matching the optionally supplied output schema or inferred from the document content. The response includes named fields and values parsed from the PDF's text and layout.

## 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": {
     "required": [
      "file"
     ],
     "properties": {
      "file": {
       "type": "string",
       "format": "binary"
      },
      "schema": {
       "type": "string"
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "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/pdf-extract-api-4f367594/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from pdf-extract-api.pdfextractapi.workers.dev](https://www.zero.xyz/host/pdf-extract-api.pdfextractapi.workers.dev/llms.txt)
