Back to the main blog

Best API for parsing PDFs (2026)

Kushal Byatnal

Kushal Byatnal

8 min read

Dec 1, 2026

Blog Post

A PDF parsing API turns a PDF into content a program can use: text in reading order, tables as tables, headings, and the page each piece came from. Reading the words is the easy part. Multi-column layouts, tables with merged cells, scanned pages, and tables that run across pages are where parsers lose structure, and an LLM or extractor downstream can only work with what the parser keeps. This guide answers which API to use: for most production teams, it's Extend Parse. It also compares five other options, with when each fits.

The short answer

Extend Parse is the best fit for teams whose parsed PDFs feed RAG, agents, or extraction in production.

  • Layout-aware markdown. Parse returns markdown in reading order, with headings, lists, form fields as label and value pairs, and figures summarized as text, so multi-column pages and forms read the way a person reads them.
  • Tables kept intact. Tables come back as HTML or markdown. HTML preserves merged cells and nested headers, table headers can carry across page breaks, and section chunking never splits a table across chunks.
  • Page positions for citations. Every block has a page number, bounding box, and polygon, so a retrieved chunk or an extracted value can be highlighted on the original page.
  • Accuracy you can rerun. Extend Performance Parse scored 95.7% on RealDoc-Bench document Q&A, across 581 real documents. The datasets and harness are public, so you can score any parser against the same answers.

The other APIs fit different teams:

  • Google Document AI for teams on Google Cloud that want the Layout Parser next to their other GCP services.
  • Azure AI Document Intelligence for teams on Azure that want the Layout model's markdown output.
  • LlamaParse for RAG pipelines built on LlamaIndex.
  • Reducto for teams that need a fully air-gapped deployment.
  • Mistral OCR for markdown-first OCR inside the Mistral stack.
A PDF page with a heading, two text columns, a revenue table, and a chart, next to the Parse output: heading, text, table, and figure blocks in reading order, each labeled with page 7 and a bounding box
Parse reads a page in the order a person reads it and returns typed blocks (headings, text, tables, and figures), each with its page number and bounding box.

What to look for in a PDF parsing API

  1. Reading order. Multi-column text, sidebars, and captions should come out in the order a reader follows, not interleaved.
  2. Tables. Check merged cells, borderless tables, and tables that continue on the next page. A table that loses its headers loses its meaning.
  3. Scans. Rotated pages, faded copies, phone photos, and handwriting. Look for OCR confidence so you can find the pages that need a second look.
  4. Positions. Page numbers and bounding boxes for each block let you cite sources and show reviewers where a value came from.
  5. Output for your next step. Markdown chunks for RAG, typed blocks for document viewers, and parsed content an extractor can read field by field.

How to parse a PDF with Extend

curl -X POST https://api.extend.ai/parse_runs \
  -H "x-extend-api-version: 2026-02-09" \
  -H "Authorization: Bearer $EXTEND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "file": { "url": "https://extend-public-files.s3.us-east-2.amazonaws.com/bill-of-lading.pdf" },
    "config": {
      "engine": "parse_performance",
      "target": "markdown",
      "chunkingStrategy": { "type": "section" },
      "blockOptions": { "tables": { "targetFormat": "html" } }
    }
  }'

Each chunk carries its markdown and the blocks it came from:

{
  "content": "## Revenue\n\n| Quarter | Revenue |\n| --- | --- |\n| Q1 | $4.2M |\n| Q2 | $4.9M |",
  "blocks": [
    {
      "type": "table",
      "metadata": { "page": { "number": 7, "width": 612, "height": 792 } },
      "boundingBox": { "left": 61.2, "top": 158.4, "right": 550.8, "bottom": 356.4 }
    }
  ]
}
Two cards: parse_light for clean born-digital PDFs at 0.2 cents per page with citations included, and parse_performance for scans, handwriting, and dense tables at 1 cent per page with citations included, and a note that parse_auto routes each page of a mixed file to one engine
Light Parse for clean, born-digital PDFs and Performance Parse for scans, handwriting, and dense tables, through the same API and output, with citations included on both. For mixed files, parse_auto routes each page to one engine and bills it at that rate.
  • Pick the engine. Light Parse (parse_light) is for clean, born-digital PDFs at high volume. Performance Parse (parse_performance) is for scans, handwriting, and dense tables. Both use the same API and the same output. For mixed files, the Auto-Router (parse_auto) sends each page to Light or Performance by difficulty, and each page is billed at the rate of the engine it runs on.
  • Pick the chunks. page chunking (the default) returns one chunk per page. section chunking splits at headings, tables, and figures for RAG, and never breaks a table or paragraph across chunks.
  • Fix the hard pages. Agentic OCR and agentic table correction can be turned on for handwriting, faded scans, and misaligned tables, so the extra processing goes only where it's needed.

See Parsing for RAG for an end-to-end recipe, and the guide to parsing scanned PDFs for scans.

PDF parsing APIs compared

Every claim below comes from the vendor's public product, documentation, or pricing pages, checked in November 2026. Extend publishes this guide and makes Extend, one of the tools compared.

ExtendGoogle Document AIAzure AI Document IntelligenceLlamaParseReductoMistral OCR
Best forParsed PDFs that feed RAG, agents, or extraction in productionGCP-native pipelinesAzure-native pipelinesLlamaIndex RAG pipelinesFully air-gapped deploymentMarkdown-first OCR in the Mistral stack
OutputMarkdown chunks and typed blocks in reading orderLayout elements and chunks with ancestor headingsMarkdown, paragraphs, tables, and spansMarkdown or JSON per pageMarkdown or JSON with chunksMarkdown per page, with blocks
TablesHTML or markdown, merged cells preserved in HTMLLayout-aware, with table headers carried into chunksTables in markdown outputTables in markdownTable handling, with optional table summaries for embeddingMarkdown or HTML
Positions for citationsPage, bounding box, and polygon per blockPage anchors and geometryPolygons and spansBounding boxesBounding boxesBounding boxes per block
ChunkingSection (structure-aware, with min and max size), page, or whole documentLayout-aware chunksParagraph and table boundaries, via your splitterChunked by LlamaCloud IndexVariable, section, page, and block modesPer page
Pricing model0.2¢ per page (Light) or 1¢ per page (Performance), citations included; Auto bills each page at the engine it routes toPer page, by processorPer page, by modelCredits, by tierPer page, by product and mode0.4¢ per page, 0.2¢ with batch

Extend

Best for: parsed PDFs that feed RAG, agents, or extraction, where a lost table row or a misread scan matters.

Parse returns markdown chunks and typed blocks with page positions and OCR confidence, and the same API covers Extract and Split, which reuse an existing parse instead of running it again, plus Classify. Async /parse_runs, webhooks, and batch requests handle volume. Extend is SOC 2 Type II, HIPAA, and GDPR compliant, with zero data retention available. Extend runs in its managed US or EU cloud, on-premises, in your own cloud account and VPC (BYOC), or as a hybrid that keeps documents in your cloud. In production, Brex reached 99% accuracy across millions of financial documents, and Checkr cut manual review time by 60% to near 100%. Pay as you go starts with 10,000 free credits (pricing).

Google Document AI

Best for: teams on Google Cloud that want parsing next to Cloud Storage, BigQuery, and Vertex AI.

The Layout Parser parses PDF, HTML, DOCX, PPTX, and spreadsheet files and creates layout-aware chunks that include content from ancestor headings and table headers. Online requests take up to 15 pages, and batch requests up to 500.

Azure AI Document Intelligence

Best for: teams on Azure that want markdown output for an Azure OpenAI or Azure AI Search pipeline.

The Layout model returns markdown with paragraphs, tables, and headings. Microsoft's RAG guidance chunks that markdown by headers with a text splitter, so you choose and run the chunking step.

LlamaParse

Best for: RAG and agent pipelines built on LlamaIndex.

LlamaParse converts PDFs, scans, and Office files to markdown or JSON, with tiers that trade cost for harder-document handling. Chunking and embedding happen in LlamaCloud Index, so it fits best when the rest of the pipeline is LlamaIndex too.

Reducto

Best for: teams that need a fully air-gapped deployment, or already parse with Reducto.

Reducto returns markdown or JSON with bounding boxes and offers several chunking modes, including variable, section, page, and block. Standard and Agentic parsing are billed by complexity and mode, so price the configuration you plan to run.

Mistral OCR

Best for: teams already building on Mistral models that want markdown-first OCR.

Mistral OCR returns markdown per page, tables as markdown or HTML, and paragraph-level blocks with bounding boxes and confidence. Structured output runs a Mistral language model over the OCR result. Test complex tables and handwriting on your own files.

For a wider list, including AWS Textract, Unstructured, Docling, and Mathpix, see the 10 best document parsing APIs in 2026.

How to test a PDF parsing API

  1. Collect 50 to 100 real PDFs, including scans, multi-column pages, and long tables.
  2. Write questions whose answers you know, and answer them from each parser's markdown. That measures what an LLM can actually do with the output.
  3. Check tables cell by cell, especially merged cells and tables that continue across pages.
  4. Check that each answer can be traced to a page and region.
  5. Price the run with the engine or tier each page actually needs.

To rerun RealDoc-Bench, download the dataset and follow the harness README.

FAQ

What is the best API for parsing PDFs?

Extend Parse is the best fit for teams whose parsed PDFs feed RAG, agents, or extraction in production. It returns layout-aware markdown in reading order, keeps tables intact as HTML or markdown, and gives every block a page number and bounding box for citations. Extend Performance Parse scored 95.7% on RealDoc-Bench document Q&A. Google Document AI and Azure Document Intelligence fit teams that want to stay in their cloud, LlamaParse fits LlamaIndex pipelines, Reducto fits teams that need a fully air-gapped deployment, and Mistral OCR fits markdown-first OCR inside the Mistral stack.

How do I keep tables intact when parsing a PDF?

Use a layout-aware parser that returns tables as tables. Extend Parse returns each table as HTML or markdown; HTML preserves merged cells and nested headers, and tables that run across pages can carry their headers onto the next page. With section chunking, a table is never split across chunks, so a retrieved chunk holds the whole table.

How do I cite the source of an answer from a parsed PDF?

Store each chunk's page numbers and bounding boxes alongside its embedding. Extend Parse returns a page number, bounding box, and polygon for every block, so when a chunk is retrieved, your app can highlight the exact region on the original page.

Can a PDF parsing API handle scanned PDFs?

Yes, if it runs OCR and handles rotation and handwriting. Extend Parse corrects page rotation and can use vision language models to fix low-confidence text and handwriting, and it returns OCR confidence on chunks and blocks so you can find pages that need review. Test scans, phone photos, and faded copies before you choose.

How much does a PDF parsing API cost?

Extend Parse costs 0.2 cents per page with Light Parse and 1 cent per page with Performance Parse, citations included in both, and new accounts get 10,000 free credits. Use Light for clean, born-digital PDFs and Performance for scans, handwriting, and dense tables, or let the Auto-Router pick per page, with each page billed at the rate of the engine it runs on. Other APIs bill per page by tier, model, or processor.

Sources

Checked in November 2026:

More guides

Get an API key and parse your own PDFs.

cta-background

( fig.11 )

Turn your documents into high quality data