OCRRouter

Marker vs Google Document AI

Pick Marker if you want to turn PDFs into Markdown on your own hardware, especially books and papers with equations. Pick Google Document AI if you already run on Google Cloud and need bulk OCR at a fixed per-page price. The main split is self-hosted open code with a weight licence limit versus a managed, pay-per-page API.

Markerdatalab/markerGoogle Document AIgoogle/document-ai
TypeOCR APIOCR API
Price14 credits / page10 credits / page
Per 1,000 pages$14.00$10.00
Typical speed2.5 s / page1.4 s / page
Best forBooks and research papersMultilingual scans
InputsPDF, images, DOCXPDF, images
Languages90+ languages200+ languages
Max pages per request1,000500
Tables✓ Yes✓ Yes
HandwritingNo✓ Yes
Math✓ YesNo
Bounding boxes✓ Yes✓ Yes
ConfidenceNo✓ Yes
FormsNo✓ Yes
Multilingual✓ Yes✓ Yes
On OCRRouterAvailableAvailable

Prices are what you pay on OCRRouter. Speed is the provider's typical figure, not a benchmark we ran.

Which to choose

Choose Marker if

  • You want PDF to Markdown, HTML, JSON or RAG chunks from a tool you run yourself on GPU, CPU or Apple Silicon.
  • You need to avoid per-page fees, since self-hosting costs only compute if you fit the weight licence (free for research, personal use and startups under $5M).
  • Datalab reports 83.7 on olmOCR-bench in vllm mode, and CPU fast mode runs at 23.6 pages per second, though these numbers are Datalab's own.

Choose Google Document AI if

  • You are on Google Cloud and want a managed service, with Enterprise Document OCR at $1.50 per 1,000 pages and $0.60 above 5M pages a month.
  • You want chunking for RAG from Layout Parser at $10 per 1,000 pages, or form extraction from Form Parser at $30 per 1,000 pages.
  • You process documents in batches, which take up to 500 pages per request.

Key differences

MarkerGoogle Document AI
How you run itLocal on GPU, CPU or MPS. Datalab also sells a hosted API.Hosted API only.
LicenceCode is Apache-2.0. Weights use a modified AI Pubs Open Rail-M licence, free for research, personal use and startups under $5M.Proprietary.
PriceFree self-hosted within the weight licence, and you pay for compute. Hosted API has about 5,000 free pages a month.Enterprise OCR is $1.50 per 1,000 pages, with the first 1,000 free. Layout Parser is $10 and Form Parser is $30 per 1,000 pages.
Output formatsMarkdown, HTML, JSON, chunks, LaTeX and images.JSON, plain text, bounding boxes and chunks.
Request limitsNot publishedOnline requests take 15 pages (30 in imageless mode). Batch takes 500 pages, and Form Parser batch takes 100.
Benchmark83.7 on olmOCR-bench in vllm mode, reported by the authors. CPU fast mode scores 66.6.64.6% on RD-TableBench, an independent test by Reducto, behind Azure and Textract.
Known weaknessThe weight licence blocks free commercial use for companies above $5M.Weak on complex tables, and not suited to long PDFs in one synchronous call.

Sources

What each one is

Marker

Hosted version of the open-source Marker and Surya models. Strong on books and papers.

Marker details

Google Document AI

Google Cloud OCR with layout parsing and specialised processors.

Google Document AI details

Try both on your own file

Run the file once with each model and compare the output.

PDF, PNG, JPG, WebP, HEIC. Up to 20 MB each, 10 files.No file?

Use one, fall back to the other

{"model": "datalab/marker","fallbacks": ["google/document-ai"],"file_url": "https://example.com/document.pdf"}

Questions

More comparisons

Marker alternativesGoogle Document AI alternativesBest OCR models in 2026