PDF to Markdown for AI & RAG: Tables, OCR, Chunks
Pricing
from $1.50 / 1,000 pdf converteds
PDF to Markdown for AI & RAG: Tables, OCR, Chunks
PDF to Markdown for LLMs and RAG: give PDF URLs, get clean Markdown with headings, lists, tables, 2-column papers in reading order, headers/footers removed, page-cited chunks, metadata and links. OCR for scans at $0.005/page. $2 per 1,000 PDFs (100 pages included), no start fee, failures free.
Pricing
from $1.50 / 1,000 pdf converteds
Rating
0.0
(0)
Developer
XSI
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
0
Monthly active users
2 hours ago
Last modified
Categories
Features
Share
PDF to Markdown for AI & RAG: tables, OCR, page-cited chunks
PDF to Markdown converts PDF links into clean Markdown with headings, lists, tables and two-column reading order, plus RAG-ready chunks that cite page numbers, with OCR for scanned pages in 7 languages.
What it does: Converts PDFs from URLs (including Drive, Dropbox and arXiv links) into clean Markdown with headings, lists and tables, plus RAG chunks that cite page numbers, with optional OCR for scanned pages in 7 languages.
Who it's for: AI engineers building RAG and document agents, analysts and researchers who need PDF text in a usable format.
Price: $0.002 / PDF (first 100 pages included), $0.005 per scanned page (OCR), no start fee, errors and failed items are not charged. Works through the Apify API, as an MCP tool (
https://mcp.apify.com?tools=xsi/pdf-to-markdown), and in Zapier, Make, n8n and LangChain via Apify's integrations.
Give PDF links, get clean Markdown ready for an LLM. The Actor downloads each PDF, rebuilds its structure (headings, paragraphs, lists, tables, 2-column reading order), removes running headers, footers and page numbers, reads scanned pages with OCR, and returns the full Markdown plus RAG-ready chunks that carry their section heading and page numbers, so your agent can cite "page 4".
Use it to feed papers, reports, contracts, manuals, invoices or tender documents to ChatGPT, Claude, a vector database (Pinecone, Qdrant, Weaviate…), LangChain, LlamaIndex, n8n or Make, or to an Apify AI agent through MCP.
Part of xsi: small, honest, pay-per-result tools.
- ✅ Structure, not a wall of text. Headings from font sizes, bold sub-headings, bullet and numbered lists, Markdown tables (sparse rows with empty cells included), words split by line-end hyphens re-joined, links kept.
- ✅ Reads papers in the right order. 2-column layouts are read column by column, with titles and abstracts that span both columns kept on top.
- ✅ No noise in your embeddings. Running headers, footers and "Page 3 of 12" are detected across pages and removed.
- ✅ Scanned PDFs too. Image-only pages are OCRed (Tesseract) in English, French, German, Spanish, Italian, Dutch or Portuguese. Pages with a text layer are never OCRed or billed as OCR.
- ✅ Chunks for RAG. ~800-token chunks (you choose), a new chunk at each heading, tables never split, overlap inside a section, each with
heading,pagesandtokens. - ✅ Any link. Direct PDF URLs, Google Drive and Dropbox share links, GitHub
bloblinks, arXiv abstract pages, and landing pages that point to their PDF (citation_pdf_url, as on most journals and repositories). - ✅ You only pay for converted PDFs. Failed downloads (403, 404, login pages), non-PDFs, password-protected, corrupt and empty PDFs are free, with a clear
errorType.
Pricing: $2 per 1,000 PDFs, first 100 pages included
| Event | Free plan | Bronze | Silver | Gold / Platinum / Diamond |
|---|---|---|---|---|
pdf-converted: one PDF, first 100 pages included | $0.002 | $0.0018 | $0.0016 | $0.0015 |
pages-100: only for long PDFs, each started block of 100 pages after the first 100 | $0.002 | $0.002 | $0.002 | $0.002 |
ocr-page: one scanned page read by OCR | $0.005 | $0.0045 | $0.004 | $0.0035 |
No start fee, no per-page fee for normal PDFs. A 15-page paper costs $0.002; a 250-page report costs $0.006; a 10-page scan costs $0.052. Pages you exclude (pages, maxPagesPerPdf) aren't counted, and OCR pages where nothing is found are free. Your Maximum cost per run is always respected: the Actor reserves the cost before working, converts only the pages it can pay for, and says so in notes.
For comparison (public Apify Store pages, 26 Nov 2026), popular PDF Actors charge $0.003–0.005 per PDF plus a start fee ($0.001–0.005 per run), some add $0.001 per page, and OCR costs up to $0.015 per page.
Quick start
{ "urls": ["https://arxiv.org/abs/1706.03762", "https://drive.google.com/file/d/<id>/view"] }
A scanned French document, pages 1-20 only, with plain text too:
{ "urls": ["https://example.org/scan.pdf"], "ocrLanguages": ["fra"], "pages": "1-20", "includeText": true }
| Input | Default | What it does |
|---|---|---|
urls | — | PDF links (direct, share links, landing pages). |
pages | all | Page range, e.g. 1-5, 8, 10-. |
ocr | auto | auto = only image-only pages; always; off. |
ocrLanguages | ["eng"] | Up to 3 of eng, fra, deu, spa, ita, nld, por. |
chunkSizeTokens / chunkOverlapTokens | 800 / 100 | 0 = no chunks. |
includePages / includeText / includeLinks | true / false / true | Per-page Markdown, plain text, links. |
maxPagesPerPdf / maxOcrPagesPerPdf | 500 / 50 | Safety limits per PDF. |
password | — | For password-protected PDFs you own. |
maxFileSizeMb | 50 | Bigger files are skipped for free (give the run 2-4 GB of memory for files over 50 MB). |
maxConcurrency | 2 | PDFs in parallel (~300 MB each). |
requestTimeoutSecs / maxSecondsPerPdf | 120 / 600 | Download timeout, time budget per PDF. |
Output (one row per PDF)
Real row from a platform run (26 Nov 2026, build 1.0.8), markdown, pages and chunks shortened:
{"input": "https://arxiv.org/abs/1512.03385","url": "https://arxiv.org/pdf/1512.03385","resolvedFrom": "arXiv abstract page converted to its PDF","fileName": "1512.03385v1.pdf","fileSizeBytes": 819383,"sha256": "1e0651b6810ecba34a3dbc5b5b0209226f889004607c1f203540a48d64e5a93a","title": "Deep Residual Learning for Image Recognition","pageCount": 12,"pagesConverted": 12,"language": "en","wordCount": 8373,"tokensEstimate": 15343,"markdown": "# Deep Residual Learning for Image Recognition\n\n…\n\n## Abstract\n\nDeeper neural networks are more difficult to train. …","pages": [{ "page": 1, "markdown": "…", "ocr": false, "chars": 4407, "links": ["http://image-net.org/challenges/LSVRC/2015/"] }],"chunks": [{ "index": 2, "heading": "1. Introduction", "pages": [1, 2], "text": "## 1. Introduction\n\nDeep convolutional neural networks …", "tokens": 763 }],"links": ["http://image-net.org/challenges/LSVRC/2015/", "…"],"metadata": { "creator": "LaTeX with hyperref package", "producer": "pdfTeX-1.40.12", "createdAt": "2015-12-11T01:13:45.000Z", "pdfVersion": "1.5" },"ocrPages": [],"pagesNotRead": [],"notes": [],"seconds": 0.5,"charged": true}
Other platform runs the same day: the 15-page "Attention Is All You Need" paper → 9,674 tokens and 24 chunks in 2.1 s, its results table rebuilt as a Markdown table; a 1946 typewritten scan (2 image-only pages) read by OCR in 79 s in total on 1 GB of memory (more memory = faster OCR); a password-protected file and a 404 link returned free error rows.
PDFs that can't be converted get one free row with errorType: invalid_input, invalid_url, dns_error, connection_error, tls_error, timeout, too_many_redirects, access_denied (401/403 or a login page), not_found, http_error, file_too_large, not_a_pdf, password_protected, corrupt_pdf, no_text, scanned_no_text (OCR off or unavailable) or max_cost_reached. The OUTPUT record summarises PDFs converted, pages, OCR pages and free rows.
The dataset has two views: Overview (one row per PDF) and Chunks (one row per chunk, ready to embed).
AI agent use cases (MCP, LLM frameworks, automation)
- Read a PDF found during research: an agent passes the link through the MCP tool and gets Markdown it can quote with page numbers.
- RAG ingestion: send the
chunks(with section heading and pages) to a vector database through LangChain, LlamaIndex or your own code. - Document pipelines: n8n or Make picks up new PDF links (tenders, reports, invoices) and stores the Markdown.
- Scanned documents: turn on OCR only when needed; pages where OCR finds nothing are free.
How to connect it:
- Any MCP client (Claude Desktop, Cursor, ChatGPT connectors, your own agent): add the Apify MCP server
https://mcp.apify.com/?tools=xsi/pdf-to-markdownand the Actor becomes a tool. - LLM frameworks: call it from LangChain or LlamaIndex with Apify's integrations, or from any code through the Apify API (one POST, JSON back).
- No-code automation: n8n, Make and Zapier have Apify nodes: run it on a schedule or a trigger and send the rows to Sheets, a CRM or Slack.
Use with AI agents (MCP)
Available through the Apify MCP server (https://mcp.apify.com/?tools=xsi/pdf-to-markdown). An agent can pass a link it found and get back Markdown it can quote with page numbers; errors come back as data, never as a crashed run.
Why this one? (problems we fixed from other PDF Actors)
| Problem seen with PDF extractors | What this Actor does | Regression test |
|---|---|---|
| Start fee on every run, extra per-page fees, OCR at $0.015/page | No start fee, 100 pages included, OCR $0.005/page | P4, P9 |
| Paying for failures (login pages, 404s, encrypted files) | All failures are free, with a typed error | P3, P6, P8, P14 |
| 2-column papers come out interleaved line by line | Column detection, read left then right | P10, unit test |
| Tables flattened into one line; sparse rows split into fragments | Column-grid table rebuild, empty cells kept | P1, unit tests |
| Page headers/footers repeated in every chunk | Removed when repeated on most pages (but never a page's only content) | unit tests |
| Big-type notices and author footnote markers turned into headings and fake tables (seen in our own first run on arXiv 1706.03762) | Multi-line big-type blocks are paragraphs; superscripts stay on their line | unit tests |
| Heading-only chunks ("title" chunk of 12 tokens) | Consecutive headings stay with their text | unit test |
| Share links (Drive, Dropbox, arXiv, journal pages) return HTML, not the PDF | Links normalised, citation_pdf_url followed | P5, P7, unit test |
| Runs over budget on long documents | Cost reserved before work; partial conversion explained | P11, P12 |
36 automated tests (20 unit + 16 integration) run before every build, on generated PDFs: structured report, 2-column paper, scan, encrypted, blank, 250 pages, corrupt, and an arXiv-like first page.
Limits (honest)
- Structure is rebuilt with layout heuristics: complex tables (merged cells, multi-line cells, rotated headers) and math formulas can come out simplified; superscripts are written inline (
10^20reads1020). - OCR quality depends on the scan; Tesseract supports the 7 languages listed. Handwriting isn't supported.
- Password-protected PDFs need the
password; we never try to break protections.
Questions people ask
How do I convert a PDF to Markdown for an LLM?
Give PDF URLs. Each document returns Markdown and heading-aware chunks with page references.
How do I extract tables from a PDF?
Tables are rebuilt as Markdown tables, including rows with empty cells and two-column layouts.
Can it read scanned PDFs?
Yes, turn on OCR; it is billed per OCR page ($0.005).
How much does PDF to Markdown conversion cost?
$0.002 per PDF (first 100 pages included), $0.002 per extra 100 pages, $0.005 per scanned page (OCR). No start fee; failed downloads and pages where OCR finds no text are free.
Can ChatGPT, Claude or my own AI agent use this tool?
Yes. Add Apify's MCP server (https://mcp.apify.com?tools=xsi/pdf-to-markdown) to Claude, ChatGPT, Cursor or any MCP client and authenticate with your Apify token. Agents can also call it with the Apify API, or pay without an account by buying a capped prepaid token at agi.apify.com (x402, card).
Is there a free trial?
Apify's free plan includes monthly platform credit, which covers many runs at these prices. You only pay for results; failures are free.
Comparison with alternatives
| Tool | Price | Start fee | Users (30 days) |
|---|---|---|---|
| xsi/pdf-to-markdown (this Actor) | $0.002 / PDF | no | new |
| memo23/pdf-text-extractor | $0.005 / PDF, OCR $0.015 / page | $0.005 | 177 |
| gochujang/pdf-text-extractor | $0.005 / PDF + $0.001 / page | $0.001 | 30 |
Competitor prices and 30-day user counts: public Apify Store API, checked 26 Nov 2026. Prices change, so check each page before buying.
Keywords: pdf to markdown, pdf to text api, pdf for rag, extract tables from pdf, pdf ocr api, document parsing for llm
FAQ
Is it legal? The Actor downloads only the links you give (or the PDF a landing page declares), with an honest user agent and no login. Convert documents you're allowed to use.
What runs inside? pdf.js (Apache-2.0) for text and layout, Poppler and Tesseract (Apache-2.0) for OCR. Files are processed in the run's container and not kept after the run.
A PDF comes out badly? Open an issue on the Issues tab with the link: every confirmed case becomes a regression test.
Changelog
- 1.0.13 (29 Nov 2026): Docs only: the input schema and README now state the live OCR price ($0.005 per scanned page on the Free plan, matching the
ocr-pageevent). Prices and PPE unchanged.