Upload a PDF, get back structured JSON. $0.02 per request.
Send a PDF. Get structured JSON back — either matching a schema you supply, or a sensible best-effort default (document type, summary, key fields, tables).
| Method | POST |
|---|---|
| Path | /extract |
| Content-Type | multipart/form-data |
| field | required | description |
|---|---|---|
file | yes | The PDF file, max 10MB |
schema | no | JSON Schema object, or a JSON array of field names, as a string |
curl -X POST https://pdf-extract-api.pdfextractapi.workers.dev/extract \
-F "file=@invoice.pdf" \
-F 'schema=["invoice_number","date","total","vendor_name"]'
{
"data": {
"invoice_number": "INV-2041",
"date": "2026-08-01",
"total": "£412.00",
"vendor_name": "Acme Supplies Ltd"
},
"meta": { "pages": 1, "truncated": false }
}
Errors return a non-200 status with { "error": { "code": "...", "message": "..." } }. Common codes: missing_file, file_too_large, invalid_file, corrupted_file, password_protected, no_text_layer (scanned PDFs aren't supported yet), invalid_schema.
This endpoint is paid per-request via the x402 protocol (HTTP 402 + USDC). Unpaid requests receive a 402 response with payment instructions.
Upload a PDF below and submit — you'll be prompted to connect a wallet and pay $0.02, then see the result.