PDF to Markdown, Tables & RAG Chunks
Turn PDF, Word (DOCX) and image files into clean Markdown, tables (rows and CSV) and RAG-ready chunks with page numbers. Scanned pages are read automatically with OCR. No API keys, no LLM calls, nothing to configure.
Run it on ApifyUse it from an agentWhat you get for each document
| Field | What it is |
|---|---|
markdown | The whole document as Markdown: headings, paragraphs, bullet lists, tables and <!-- page N --> markers |
tables | Every detected table with its page, rows (list of lists) and csv |
chunks | Text split for embeddings: text, page_start, page_end, nearest heading, char_count |
metadata | Title, author, subject and dates from the file properties |
warnings, error | Plain-language notes and stable error codes such as PDF_ENCRYPTED, DOWNLOAD_FAILED or NO_TEXT_FOUND |
Each document's Markdown is also saved as a .md file in the run's key-value store. One bad file never stops the rest of the batch.
Example: RAG ingestion
One dataset item per chunk, ready for a vector database:
{"documentUrls": ["https://example.com/handbook.pdf", "https://example.com/policy.docx"],
"outputMode": "chunks",
"chunkMaxChars": 1200,
"chunkOverlapChars": 150,
"includeMarkdown": false}
Agents and back ends that already hold the file can send it inline: {"documents": [{"name": "invoice.pdf", "content_base64": "..."}]}.
Options
- Inputs: links to PDF, DOCX, PNG, JPEG, TIFF, GIF, BMP or WEBP files, an uploaded file, or base64 content.
- OCR:
auto(only pages without a text layer),forceoroff. Languages: English, Spanish, French, German, Portuguese, Italian, or combinations such aseng+spa. - Pages: pick a range such as
1-3,7; a per-document page cap (default 500) keeps costs predictable. - Tables: ruled tables in PDFs and all DOCX tables. Chunked tables repeat their header row.
Use it
In the Apify Console
Open the Actor page on Apify, fill in the input form and click Start. Results land in the run's dataset (JSON, CSV or Excel download).
From an AI agent (MCP)
Apify's hosted MCP server exposes the Actor as a tool to Claude, Cursor, VS Code and other MCP clients. Server URL:
https://mcp.apify.com/?tools=errandkit/pdf-to-markdown-tables
For example, in Claude Code (sign in to Apify when asked, or add --header "Authorization: Bearer YOUR_APIFY_TOKEN"):
claude mcp add --transport http errandkit "https://mcp.apify.com/?tools=errandkit/pdf-to-markdown-tables"
Copy-paste config for Claude Desktop, Cursor, VS Code, Windsurf and ChatGPT →
From code (Apify API)
curl -X POST "https://api.apify.com/v2/acts/errandkit~pdf-to-markdown-tables/run-sync-get-dataset-items" \
-H "Authorization: Bearer YOUR_APIFY_TOKEN" -H "Content-Type: application/json" \
-d '{"documentUrls":["https://www.irs.gov/pub/irs-pdf/fw9.pdf"],"outputMode":"documents"}'
Errandkit doesn't run its own hosted API yet. Every way of using this tool goes through your Apify account.
Pricing
| Event | Price | Per 1,000 |
|---|---|---|
| Page processed (text layer; DOCX counts 1 page per 3,000 characters) | $0.0005 | $0.50 |
| Page or image read with OCR | $0.003 | $3.00 |
| Actor start (Apify standard) | $0.00005 | $0.05 |
Examples: a 10-page digital PDF costs $0.005; a 10-page scan costs $0.03. Blank pages, failed downloads, encrypted or broken files aren't charged. Set a maximum cost per run and the tool stops before going over it, keeping everything already finished.
Launch prices. The price shown on the Apify Store page is the one you are charged, and Apify shows it before every run.
Good to know
- PDF tables are found from their drawn cell borders. Tables made only of aligned text come through as paragraphs.
- Two-column pages are read left column first, then right. Complex magazine layouts may still mix.
- OCR works well on typed documents and poorly on handwriting.
- Not supported: password-protected PDFs, legacy
.doc, PowerPoint, spreadsheets (use Spreadsheet Doctor) and web pages.
Your data
Files are processed inside your own Apify run. Nothing is sent to any third-party service or AI model, and nothing is kept by us. Output lives in your run storage under your account's retention settings. Details: privacy.