PDF to Markdown with Tables for AI Agents
Pricing
from $2.00 / 1,000 page converteds
PDF to Markdown with Tables for AI Agents
Convert PDF, Word, PowerPoint and Excel files to clean Markdown plus every table as JSON rows and headers, page by page, with OCR for scanned pages. Built for AI agents and RAG: JSON in, JSON out, works through Apify's MCP server. $0.002 per page.
Pricing
from $2.00 / 1,000 page converteds
Rating
0.0
(0)
Developer
FFS Marketing
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
2 hours ago
Last modified
Categories
Security
Limited permissionsShare
Turn any PDF, Word, PowerPoint or Excel file into clean Markdown and real tables your AI agent can use. Give it a link; get back Markdown plus every table as JSON rows and headers, page by page. Scanned pages are read with OCR automatically.
Works as a tool for AI agents. Add it to Claude, ChatGPT, Cursor or any MCP client through Apify's MCP server (https://mcp.apify.com?tools=fluidfaith/pdf-to-markdown-tables), or call it with one API request. JSON in, JSON out.
Costs $0.008 per document, $0.002 per page and $0.002 per table ($0.01 per scanned page). A 10-page PDF with 2 tables is $0.032. Failed files are free, and your maximum charge per run is never exceeded.
Why use it
Tables come back as data, not flattened text
Most PDF tools pour a table into a stream of numbers with the columns lost. This Actor finds each table, keeps its rows and columns, and returns it as headers and rows you can load straight into code, plus a Markdown copy. Multi-row headers are flattened into one readable header row ("Sales / Total"). When the table model merges tightly packed rows, the Actor rebuilds them from the page's own text so each line of the source table is one row.
PDF, Word, PowerPoint and Excel in the same call
Send a mix of .pdf, .docx, .pptx and .xlsx links. The type is detected from the file itself, not the extension. Each slide and each sheet counts as a page.
Safe for agent context windows
Every result has a tokenEstimate. Long documents are not pushed into your agent's context: Markdown over the limit you set (inlineMarkdownMaxChars, default 200,000 characters) is returned as a link (markdownUrl) instead. Ask for chunks and you get RAG-ready pieces of about the size you choose, each with its page numbers.
Tested accuracy
We hand-checked 9,055 table cells in 10 public US government PDFs (Census Bureau, IRS, NIST) and compared against Microsoft's markitdown on the same files:
| Test set | This Actor | markitdown (tables only) | markitdown (any text line, generous) |
|---|---|---|---|
| Born-digital PDF tables (9,055 cells) | 97.7% | 0% (no tables found) | 54.0% |
| Scanned PDF tables, OCR (3,504 cells) | 79.6% | 0% (no text) | 0% |
| Word, PowerPoint, Excel tables (615 cells) | 100% | 100% | 100% |
| Body text words found, born-digital | 98.0% | n/a | 99.9% |
Cell accuracy is an exact match after trimming whitespace. Full method in the Accuracy section.
Input
| Field | Default | What it does |
|---|---|---|
urls | required unless files given | Public http(s) links to .pdf, .docx, .pptx or .xlsx files (up to 200). |
files | [] | Up to 5 files as { "name": "report.pdf", "base64": "..." }, 10 MB each, for agents that already hold the file. |
pages | all | Page range for PDFs and slides, for example "1-5,8". |
maxPagesPerDocument | 200 | 1 to 2000. Pages beyond it are skipped, listed and not charged. |
ocr | auto | auto reads only pages without a text layer with OCR; off; force (every page billed as scanned). |
ocrLanguages | ["eng"] | Tesseract codes. Shipped: eng, spa, fra, deu, por, ita. |
tableMode | accurate | fast is quicker, slightly less precise. |
tablesAs | both | Each entry in tables as json, markdown or both. Tables are always inline in the Markdown too. |
perPage | false | Also return pages[], each page's Markdown. |
chunkTokens | 0 | 200 to 8000: also return chunks[] of about that many tokens, with page numbers. |
inlineMarkdownMaxChars | 200000 | Longer Markdown is only available at markdownUrl. |
maxConcurrency | 2 | Documents converted at the same time (1 to 4). |
Output
One dataset row per document:
{"source": "https://www.census.gov/retail/mrts/www/data/pdf/ec_current.pdf","fileName": "ec_current.pdf","fileType": "pdf","status": "OK","error": null,"pageCount": 3,"pagesConverted": 3,"pagesSkipped": [],"ocrPages": [],"title": "QUARTERLY RETAIL E-COMMERCE SALES 2 nd QUARTER 2026","tokenEstimate": 3068,"markdown": "## QUARTERLY RETAIL E-COMMERCE SALES ...","markdownUrl": "https://api.apify.com/v2/key-value-stores/<id>/records/ec-current-pdf-998461.md?signature=<signature>","tables": [{"index": 0,"page": 2,"caption": null,"headers": ["Quarter", "Retail Sales (millions of dollars) / Total", "Retail Sales (millions of dollars) / E-commerce"],"rows": [["2nd quarter 2026(p)", "1,986,488", "340,244"], ["1st quarter 2026(r)", "1,929,759", "327,861"]],"nRows": 12,"nCols": 8,"markdown": "| Quarter | Retail Sales (millions of dollars) - Total | ... |"}],"pages": null,"chunks": null,"charged": { "documents": 1, "pages": 3, "ocrPages": 0, "usd": 0.01 },"warnings": []}
status is OK, PARTIAL (some pages failed or your spending limit was reached mid-document; only converted pages are charged) or ERROR (nothing converted, nothing charged, error says why). A run summary is saved as the OUTPUT record: documents, OK, partial and error counts, pages charged, total charged and whether the run stopped at your spending limit.
Use it from an agent
Any MCP client
Add Apify's MCP server with this Actor as a tool: https://mcp.apify.com?tools=fluidfaith/pdf-to-markdown-tables. Your agent can then call it with a list of links.
Claude Desktop
Settings > Connectors > Add custom connector, paste the MCP URL above and sign in to Apify. Then ask: "Read this PDF and give me the tables: ".
Claude Code
$claude mcp add --transport http apify "https://mcp.apify.com?tools=fluidfaith/pdf-to-markdown-tables" --header "Authorization: Bearer $APIFY_TOKEN"
One API request
curl -X POST "https://api.apify.com/v2/acts/fluidfaith~pdf-to-markdown-tables/run-sync-get-dataset-items?token=$APIFY_TOKEN" \-H "Content-Type: application/json" \-d '{"urls": ["https://www.census.gov/retail/mrts/www/data/pdf/ec_current.pdf"], "tablesAs": "json"}'
Pricing
| Event | Price | Charged when |
|---|---|---|
| Document converted | $0.008 | once per document that converts at least one page |
| Page converted | $0.002 | each page read from its text layer (a slide or a sheet is a page; a Word page is 3,000 characters of output) |
| Scanned page (OCR) | $0.01 | each page read with OCR, instead of the page price |
| Table extracted | $0.002 | each table returned as JSON rows and headers; tables past your maximum charge are returned free |
Examples: a 10-page text PDF with no tables costs $0.028, with 2 tables $0.032; a 3-page scanned letter $0.038; a 40-slide deck with no tables $0.088. Apify also adds its standard run start fee ($0.00005). Failed downloads, unsupported files, blocked links, errors and pages that return no text are free. Set a maximum charge on the run and the Actor converts only the pages that fit, marks the rest as skipped and never goes over it.
Accuracy
Born-digital set: 10 public-domain US government PDFs (Census Bureau economic indicator releases, IRS Form W-4 2026, a NIST SP 811 conversion table that spans two pages). Every body cell of every table was labeled from the PDF's own text and checked by eye: 9,055 cells. Scanned set: 5 of those PDFs rasterized to image-only pages at 200 dpi (3,504 cells). Office set: 5 Word, 3 PowerPoint and 3 Excel files we generated with known tables (615 cells).
| Measure | Result | Target |
|---|---|---|
| Table cells, born-digital PDFs | 97.7% | 90% |
| Table cells, Word, PowerPoint, Excel | 100% | 98% |
| Table cells, scanned PDFs | 79.6% exact (82.7% ignoring spacing) | 80% |
| Body text words, born-digital | 98.0% | 97% |
| Body text words, scanned | 91.4% | 90% |
Scanned tables are the hard case: OCR sometimes misreads a decimal point or a "±" sign. For scanned financial tables, check key figures against the page.
Limits
- Files up to 100 MB by link, 10 MB each as base64 (5 per run). Up to 200 links per run.
- Up to 2,000 pages per document (default 200).
- Time limits: 60 seconds to download, 2 minutes per page, 10 minutes per document. A stuck page is skipped. Pages that cannot finish within the document limit are listed in
pagesSkippedand not charged (statusPARTIAL); ask for them withpagesin another run. A document that hangs completely is an error and free. - Speed at the default 4 GB: about 2 to 3 seconds per text page, about 15 seconds per scanned page, and up to 30 seconds per page of dense tables, plus about 30 seconds to load the models once per run. More memory gives the run more CPU and makes it faster.
- OCR languages: English, Spanish, French, German, Portuguese, Italian.
- Password-protected PDFs and old binary Office formats (.doc, .xls, .ppt) are refused with a clear message (free).
- Only public web addresses: links to localhost, private networks or internal hosts are refused.
Privacy
Files are downloaded into the run, converted there and deleted when the run ends. Results are kept only in your own Apify run storage (dataset and key-value store), under your account's retention settings. Logs hold only the link, status and counts, never document content.
FAQ
Does it read scanned PDFs?
Yes. With ocr: "auto" (the default) any page without a text layer is read with Tesseract OCR and billed as a scanned page ($0.01). Pages that already have text are read directly and billed as normal pages.
Can I get only the tables?
Set tablesAs: "json" and inlineMarkdownMaxChars: 0. Each row then holds the tables as headers and rows, and the full Markdown stays available at markdownUrl.
How do I keep output small for my context window?
Lower inlineMarkdownMaxChars, use pages to pick the pages you need, or ask for chunks and read them one at a time. Every row has a tokenEstimate so your agent can decide before reading.
Which languages?
Text-layer PDFs and Office files work in any language. OCR for scanned pages ships English, Spanish, French, German, Portuguese and Italian; pass them in ocrLanguages.
What happens at my spending limit?
Before each document the Actor works out how many pages your remaining budget covers, converts only those, lists the rest in pagesSkipped, sets stoppedAtSpendingCap in the run summary and stops. You are never charged past your maximum.
Other Actors by Fluid Faith
- Mobile Website Test on iPhone & Android (Mobile QA Gate): PASS or FAIL per page on today's phones, with screenshots. $0.01 per page per phone.
- Lighthouse & Accessibility Audit: Lighthouse scores, Core Web Vitals and axe issues, median of 3 runs, PASS/FAIL and top fixes. $0.02 per URL per form factor.
- Video Frame Extractor & Media Probe: ffprobe metadata, frames, scene cuts, a contact sheet and loudness from direct video or audio links. $0.001 per frame.
Load them together as MCP tools: https://mcp.apify.com/?tools=fluidfaith/mobile-qa-gate,fluidfaith/lighthouse-gate,fluidfaith/pdf-to-markdown-tables,fluidfaith/media-probe
Credits
Built on docling (MIT) with its layout model (docling-layout-heron, Apache-2.0) and TableFormer (docling-models, CDLA-Permissive-2.0), and Tesseract OCR (Apache-2.0). Full list of components and licenses in LICENSES.md.