A PDF parsing API built for RAG

Turn any PDF or scan into clean, chunked, citable context for your LLM — one API call, per-element provenance, and nothing stored.

Retrieval-augmented generation lives or dies on the quality of the text you feed it. Raw PDF text dumps break tables, lose headings, and give your model no way to cite a source. A parser built for RAG has to do four things well: preserve structure as Markdown, split it into token-bounded chunks that respect headings, keep bounding-box provenance so answers can cite the exact spot on the page, and OCR scans so image-only PDFs aren't a dead end.

PDFjet does all four behind one API key. It's deterministic and on-server by default (an optional AI engine handles the messy scans), returns results in a single call with no pipeline to wire up, and never stores your files — which matters when the documents feeding your RAG system are contracts, invoices, or anything sensitive.

Get RAG-ready chunks in one call

curl -X POST 'https://pdfjet.dev/extract/chunks?max_tokens=512&overlap=64' \
  -H "Authorization: Bearer pj_live_..." \
  -F [email protected]
Get your free API key → 100 pages/month free, no credit card.

Clean Markdown, not a text dump

POST a PDF to /extract/md and get back clean Markdown with headings, lists and tables intact — the structure an LLM actually uses to reason. Scanned pages are OCR'd first, so image-only PDFs come through as real text, not gaps.

curl -X POST https://pdfjet.dev/extract/md \
  -H "Authorization: Bearer pj_live_..." \
  -F [email protected]

Heading-aware, token-bounded chunks

/extract/chunks splits the document into overlapping chunks that respect heading boundaries and stay under a token budget you set with ?max_tokens (64-2000) and ?overlap. Each chunk carries its heading breadcrumb, page numbers, and a bounding box — so you can embed it directly and still trace every answer back to its source.

Provenance for citations

/extract/json returns the full Document Model: element types, text, 1-based page numbers, and a per-element bounding box. That's what lets your app show "this answer came from page 7, this table" instead of an unsourced guess. Add ?provenance=false when you want a leaner payload.

Deterministic first, AI when you need it

Standard extraction runs entirely on our servers with no third-party model involved. For genuinely messy or form-heavy scans, an optional AI engine rebuilds layout, tables and checkbox states — and you can force it off with ?engine=off to keep everything on-server. Either way, files are processed in memory and deleted immediately.

Why PDFjet

Evaluating parsers for RAG? See how PDFjet stacks up against the tools teams compare most:

See all comparisons →

FAQ

What makes a PDF parser "good for RAG"?

Four things: clean structure-preserving output like Markdown, heading-aware chunking that stays within a token budget, per-element provenance (bounding boxes) so answers can cite the source, and OCR so scanned PDFs aren't a dead end. PDFjet does all four in one API.

Does PDFjet chunk documents for me?

Yes. POST to /extract/chunks with ?max_tokens (64-2000) and ?overlap; it returns overlapping, heading-aware chunks, each with a heading breadcrumb, page numbers and a bounding box, ready to embed.

Can I keep everything on-server for sensitive documents?

Yes. Standard extraction runs entirely on our servers, and files are never stored. Only the optional AI rebuild can send pages to a vision model; add ?engine=off to keep even that on-server.

How much does it cost?

The free tier includes 100 pages per month with no credit card. Paid plans are simple per-page pricing (Pro $19/mo for 1,000 pages, Business $99/mo for 10,000), and every plan includes every feature.

Turn your PDFs into clean data in minutes

100 pages/month free. Every feature. Zero data retention. No credit card.

Get your free API key →

Related

Guides