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

> Source: <https://dev.to/rishamax/schema-first-pdf-json-in-one-api-call-try-the-playground-516a>
> Published: 2026-07-15 16:44:37+00:00

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.

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](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.

```
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"
```

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

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](https://0xpdf.io/?utm_source=devto&utm_medium=article&utm_campaign=schema-first-playground).
