PDF to Text, Tables & Markdown (OCR)
Pricing
from $0.40 / 1,000 pages
PDF to Text, Tables & Markdown (OCR)
Pull text, tables and Markdown out of PDFs in bulk, with OCR for scanned pages and invoices. One row per page, tables come back as rows you can use straight away, and failed PDFs are never charged.
Pricing
from $0.40 / 1,000 pages
Rating
0.0
(0)
Developer
Tidyrun
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
14 hours ago
Last modified
Categories
Share
Turn PDF links into clean text, Markdown and real table cells, with OCR for scanned pages (English, Thai, Spanish, French, German and more). Each PDF becomes one row with its title, author and dates, a page-1 preview image, the full text, LLM-ready Markdown and every ruled table as rows and columns.
$0.40 per 1,000 pages, $8 per 1,000 OCR pages, $0.0001 per run. Failed PDFs are free.
Quick start
- Paste your PDF URLs (direct links that download the
.pdffile). - Leave OCR on Auto: pages that already contain text are read directly, and only scanned pages go through OCR.
- Scanned pages in Thai or another language? Pick it in OCR languages.
- Click Start. The Output tab shows a preview of page 1, page and table counts and the first lines of text for every PDF.
The prefilled example runs a current IRS form (text and tables) and a scanned 1945 tax form (OCR), so your first run shows both.
Input example:
{"urls": [{ "url": "https://www.irs.gov/pub/irs-pdf/fw4.pdf" }, { "url": "https://www.irs.gov/pub/irs-prior/f1040--1945.pdf" }],"ocr": "auto","ocrLanguages": ["eng"],"pageRange": "1-10"}
One output row per PDF (text and markdown shortened here):
{"url": "https://www.irs.gov/pub/irs-pdf/fw4.pdf","fileName": "fw4.pdf","fileSizeBytes": 208845,"title": "2026 Form W-4","pageCount": 5,"pagesProcessed": 5,"ocrPages": 0,"tableCount": 5,"previewImageUrl": "https://api.apify.com/v2/key-value-stores/.../records/fw4-bac2c79c3f-page1.png","metadata": { "title": "2026 Form W-4", "author": "C:DC:TS:CAR:MP", "subject": "Employee's Withholding Certificate", "creator": "Designer 6.5", "producer": "Designer 6.5", "created": "2025-12-11T07:15:41-06:00", "modified": "2025-12-11T07:15:41-06:00" },"snippet": "W-4 Employee’s Withholding Certificate OMB No. 1545-0074 Form Complete Form W-4 so that ...","text": "W-4 Employee’s Withholding Certificate\nOMB No. 1545-0074\n...","markdown": "<!-- page 1 -->\n\n## W-4 Employee’s Withholding Certificate\n\n...\n\n| $0 - 9,999 | $10,000 - 19,999 | ... |\n|---|---|---|","tables": [{ "page": 5, "rows": [["$0 - 9,999", "$10,000 - 19,999", "..."], ["$0", "$280", "..."]] }],"textTruncated": false,"markdownTruncated": false,"truncatedAtMaxPages": false,"error": null}
Why this one
| Common problem | What happens here |
|---|---|
| Scanned PDFs come back empty | Auto OCR reads scanned pages with Tesseract. Pages with a text layer are never OCR'd, so you only pay OCR prices where OCR was needed. |
Thai PDFs come out as @ล!A ล01C symbol soup | Pages whose text layer is unreadable (broken font maps) are detected and OCR'd instead. Thai OCR keeps words intact and fixes the split ำ vowel. |
| Tables flattened into lines of text | Ruled tables come back as rows of cells and as Markdown tables, placed where they appear on the page. |
| Two- and three-column layouts read across columns | Columns are detected and read top to bottom, column by column. |
| Hard to check results | The Output tab shows a page-1 thumbnail next to page, OCR and table counts. |
| Paying for broken links | Downloads that fail, web pages instead of PDFs, password-protected and damaged files are never charged, and the error says what to fix. |
Pricing
| Event | Price |
|---|---|
| Page read from the PDF's text layer | $0.0004 |
| Page read with OCR (instead of the page price) | $0.008 |
| Run start | $0.0001 per run |
So a run with a 10-page report costs $0.0001 + $0.004, and a 4-page scanned form costs $0.0001 + $0.032. Put many PDFs in one run to pay the start only once. Blank pages count as normal pages. Pages outside Pages or past Max pages per PDF are skipped and free. The run stops cleanly at your maximum charge limit.
Options
- OCR: Auto (recommended), Always (also OCR pages that have text, e.g. text hidden under a scan that is wrong) or Off.
- Pages:
1-5,1, 3, 10-and so on. Max pages per PDF (200 by default) is a safety cap; rows cut by it havetruncatedAtMaxPages: true. - PDF URLs from a dataset: chain after a scraper by giving its dataset ID and the field that holds the PDF link.
- Very long documents:
textandmarkdownhold up to 200,000 characters each. Longer ones are cut, flagged withtextTruncated/markdownTruncated, and the full versions are linked intextUrl/markdownUrl.
Use it from n8n
Install the Apify community node @apify/n8n-nodes-apify (it is already built into n8n Cloud), add an Apify node and point it at tidyrun/pdf-to-text. Two flows people build with it:
Invoice tables into Google Sheets, every hour
Schedule → Read a queue tab → Keep rows with no status → Apify: tidyrun/pdf-to-text → Flatten tables into rows → Append to a Tables tab → Mark each PDF done
One run handles every new PDF at once, and extractTables gives you the rows ready to append.
Ask questions about your PDFs
Form upload → Apify: tidyrun/pdf-to-text → Split into chunks → Embed into a vector store → AI agent answers from it
Markdown output keeps headings and tables, which is what makes the chunks worth retrieving.
Call it from your code
curl -X POST "https://api.apify.com/v2/acts/tidyrun~pdf-to-text/run-sync-get-dataset-items?token=YOUR_TOKEN" \-H "Content-Type: application/json" \-d '{"urls":[{"url":"https://www.irs.gov/pub/irs-pdf/fw4.pdf"}]}'
Good to know
- Tables are found from their grid lines. Tables drawn without lines (only spacing, or only horizontal rules as in many scientific papers) stay in
textandmarkdownas lines, not as cells. - OCR pages give text and Markdown paragraphs, not table cells.
- OCR quality depends on the scan. Clean 300 dpi scans read very well; faint typewriter copies and handwriting do not.
- Files up to 50 MB. Downloads time out after 2 minutes.
- Speed at the default 2 GB memory: about 0.3–1.5 s per text page and 6–20 s per OCR page. Each extra OCR language roughly doubles OCR time.
- PDFs whose own text layer is wrong but readable (for example a bad OCR layer added by a scanner) are kept as they are in Auto mode; use OCR Always for those.
Responsible use
Only process documents you have the right to use. The Actor downloads public PDFs like a browser would; it does not log in, bypass paywalls or solve CAPTCHAs, and links that need a login are reported as errors and not charged. Files are deleted when each PDF is done; the only copies kept are the results in your own run's dataset and key-value store.