DEV Community

risha-max
risha-max

Posted on

Schema-First PDF JSON in One API Call (Try the Playground)

If you are wiring invoice/form extraction into an app, the usual trap is: OCR dump → brittle regex → custom parsers per vendor.

0xPdf flips that: you define a JSON schema (or pick a template), send a PDF, get structured JSON back — one HTTP call or MCP tool.

Try before you integrate

Open the browser playground and run sample PDFs (or upload your own):

https://0xpdf.io/samples?utm_source=devto&utm_medium=article&utm_campaign=schema-first-playground

No production wiring required to see whether the shape fits your workflow.

Minimal curl

curl -X POST "https://api.0xpdf.io/api/v1/pdf/parse" \
  -H "X-API-Key: YOUR_KEY" \
  -F "file=@invoice.pdf" \
  -F "schema_template=invoice"
Enter fullscreen mode Exit fullscreen mode

Docs + SDKs: https://0xpdf.io/docs?utm_source=devto&utm_medium=article&utm_campaign=schema-first-playground

Who this is for

Developers and agents that need typed fields (vendor, totals, line items) — not a wall of OCR text.

If the playground output looks right on 3–5 of your real PDFs, the API path is usually straightforward.


Built by 0xPdf.

Top comments (0)