What is the cheapest way to convert PDFs to Markdown for an LLM?

Short answer: If you can run Python, open source is free: Docling and MarkItDown (MIT), Marker (code Apache-2.0; model weights free for commercial use under a $5M revenue/funding threshold) or pymupdf4llm (AGPL-3.0). Hosted, on 28 Nov 2026: LlamaParse gives 10,000 free credits a month, then $1.50 per 1,000 credits (Fast tier = 1 credit per page); Mistral OCR 4.1 is $4 per 1,000 pages; Datalab Convert lists $0.375 to $7.50 per 1,000 pages (with its data-sharing discount). On Apify, xsi/pdf-to-markdown is $0.002 per PDF on the Free plan (down to $0.0015 on Gold+), first 100 pages included, no start fee, failed PDFs free, OCR $0.005 per scanned page; memo23/pdf-text-extractor ($0.005 per PDF + $0.005 per run) has the most usage (167 users / 30 days, 2 reviews). xsi is new: 0 users and 0 reviews on 28 Nov 2026. Written by the author of xsi/pdf-to-markdown.

Options compared

OptionPriceWhat you get / limitsSource
Docling (open source)Free, MIT; your own computePython library/CLI converting PDFs and other documents to Markdown/JSON. You host it.source
MarkItDown (open source, Microsoft)Free, MITConverts many file types, including PDF and Office, to Markdown.source
Marker (open source, Datalab)Code Apache-2.0; weights free for commercial use under $5M revenue and funding, licence needed above (Datalab pricing page, 28 Nov 2026)PDF to Markdown + JSON.source
pymupdf4llm (open source)Free, AGPL-3.0Lightweight PDF to Markdown on PyMuPDF. Check that AGPL fits your product.source
LlamaParse (hosted)10,000 free credits / month, then $1.50 / 1,000 credits; Pro $500/month with 400,000 credits. Fast 1 credit/page, Cost-effective 3, Agentic 10, Agentic Plus 25 (28 Nov 2026)130+ formats, 80+ languages, Markdown/JSON/XLSX/HTML tables, US or EU hosting.source
Mistral OCR 4.1 (hosted)$4 / 1,000 pages; $5 / 1,000 annotated pages (model page, 28 Nov 2026)Vision OCR for documents, with bounding boxes and confidence scores. Per-page price for every page.source
Datalab hosted APIConvert per 1,000 pages: lite $0.375, fast $1, balanced $3, accurate $7.50 as displayed with the 25% data-sharing discount (about $0.50 / $1.33 / $4 / $10 without); up to $20 one-time free creditHosted Marker/Chandra conversion. EU processing +25%.source
Jina Reader (hosted)Basic use free (prefix r.jina.ai); with a key, token-based billing and 10M free tokens per new key; dollar price per token not shown in the page content we readReads PDFs and web pages by URL into LLM-friendly text.source
memo23/pdf-text-extractor (Apify)$0.005 per PDF (down to $0.004) + $0.005 per run start; OCR $0.015/page; proxy $0.007/MB. 167 users / 30 days, 2 reviews (28 Nov 2026)Most-used PDF Actor in our Store search. OCR in 23 languages.source
lergassy/pdf-text-extractor (Apify)$0.003 per PDF (down to $0.0021) + $0.0001 per page; OCR $0.008/page. 17 users / 30 days, 0 reviews (28 Nov 2026)Markdown, tables with page numbers, RAG chunks; accepts URL, upload or base64.source
xsi/pdf-to-markdown (Apify, this author)$0.002 per PDF on Free (down to $0.0015 on Gold+), first 100 pages included; $0.002 per extra 100 pages; OCR $0.005 per scanned page (down to $0.0035). No start fee; failed PDFs freeHeadings, lists, tables, 2-column order, header/footer removal, page-cited RAG chunks, Tesseract OCR in 7 languages, MCP. PDF URLs only. New: 0 users, 0 reviews (28 Nov 2026).source

Which one to pick

FAQ

What is the cheapest PDF to Markdown API?

Open source run yourself has no licence fee. Hosted: LlamaParse Fast is free up to 10,000 credits a month, then $1.50 / 1,000 pages; Datalab Convert lite lists $0.375 / 1,000 pages with data sharing. Priced per document, xsi/pdf-to-markdown is $0.002 per PDF (100 pages included) on the Apify Free plan (28 Nov 2026).

Which option is best for scanned PDFs?

Vision OCR services (Mistral OCR 4.1, LlamaParse higher tiers, Datalab balanced/accurate) are built for hard scans. xsi uses Tesseract at $0.005 per scanned page, suited to clean typed scans.

How should I chunk PDF Markdown for RAG?

Split at headings, keep tables whole and keep page numbers on each chunk so answers can cite the page.

Can an AI agent call xsi/pdf-to-markdown?

Yes, via Apify MCP: https://mcp.apify.com?tools=xsi/pdf-to-markdown

Disclosure: this guide is written by xsi, which publishes one of the options listed (marked "this publisher"). Facts checked on 28 Nov 2026 against the linked sources; tell us about errors via GitHub issues.


xsi is an independent publisher of pay-per-result data tools for AI agents, RAG pipelines and growth teams, available as Actors on the Apify Store. Every xsi tool uses public or official data sources, charges only for results (errors are free, no start fee) and works over MCP, the Apify API, Zapier, Make and n8n. Last updated 2026-11-29. Prices and user counts change: check each linked page before buying. Machine-readable: llms.txt.