PDF OCR to Markdown - Scanned PDF & Image to Text for RAG
Pricing
from $4.00 / 1,000 page read with ocrs
PDF OCR to Markdown - Scanned PDF & Image to Text for RAG
Convert PDFs, scanned documents and images to text and clean Markdown for LLMs and RAG. Uses the text layer when present, Tesseract OCR for scans (EN, NL, DE, FR, ES, IT, PT, German Fraktur), per-page confidence. $0.001 per text page, $0.004 per OCR page.
Pricing
from $4.00 / 1,000 page read with ocrs
Rating
0.0
(0)
Developer
DigiVibeTech
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
3 days ago
Last modified
Categories
Share
What does Document to Markdown OCR do?
It turns PDFs, scanned documents, images, Word (DOCX, with headings, lists and tables) and PowerPoint (PPTX) files into clean Markdown that you can feed to an LLM, a RAG pipeline, a search index or a spreadsheet.
- Pages with a real text layer (born-digital PDFs) are extracted directly: fast, exact and cheap.
- Scanned pages and images are read with Tesseract 5 OCR, the open-source engine, which runs entirely inside the Actor. Your files are not sent to any third-party AI service.
- Every page gets an OCR confidence score. Pages that can't be read (blank, handwriting, very poor scans) are flagged and not charged.
- RAG-ready: optional
chunks(paragraph-aware, with page numbers) at no extra cost. - German Fraktur (blackletter) is supported, alongside English, Dutch, German, French, Spanish, Italian and Portuguese.
Quick start: example input, output and cost
OCR for scanned PDFs and images: text and Markdown for RAG and LLMs, per-page confidence, German Fraktur. $0.001 per text page, $0.004 per OCR page, blank pages free.
Example input
{"fileUrls": ["https://upload.wikimedia.org/wikipedia/commons/3/33/CAB_Accident_Report%2C_National_Airlines_Flight_23.pdf"],"pageRange": "1-3"}
Cost example: A 50-page scanned PDF x $0.004 = $0.20; a 50-page digital PDF x $0.001 = $0.05.
Why use it?
| This Actor | |
|---|---|
| Price per scanned (OCR) page | $0.004 |
| Price per text-layer page | $0.001 |
| Start fee per run | none |
| Blank, unreadable or failed pages | free |
| Accuracy | published (see the benchmark below) |
| Per-page confidence | yes |
| Historic German Fraktur | yes |
How much does it cost?
You pay per successfully extracted page, and only after the result is saved:
| Event | Price | When |
|---|---|---|
page-text | $0.001 | the page has a usable PDF text layer; also each PPTX slide or ~3,000 characters of DOCX text |
page-ocr | $0.004 | the page was read with OCR |
Some examples:
- 100 born-digital PDF pages cost $0.10.
- 100 scanned pages cost $0.40.
- A 300-page scanned book costs $1.20.
Set a maximum cost per run and the Actor will never go over it. Pages that don't fit are skipped and explained, not charged. Apify's free plan credit covers about 1,000+ scanned pages a month.
Input
{"fileUrls": ["https://example.com/scan.pdf", "https://example.com/photo-of-page.jpg"],"languages": ["nl", "en"],"ocrMode": "auto","pageRange": "","maxPagesPerFile": 200}
- fileUrls: direct links to PDF, DOCX, PPTX, PNG, JPG, TIFF (including multi-page), WEBP, GIF or BMP files, up to 200 MB each. Share links to public Google Drive and Dropbox files are converted automatically.
- languages: up to 3 languages. Choose
de-frakturfor old German print. - ocrMode:
autouses the text layer when present and OCR otherwise;alwaysOCRs every page;neveruses the text layer only. - pageRange: for example
1-5,2,4,9or10-. - chunkSize / chunkOverlap: set e.g. 1500 / 150 to get a
chunksarray for embeddings. Each chunk lists its source pages.
Output
You get one dataset item per document:
{"sourceUrl": "https://example.com/scan.pdf","status": "ok","fileType": "pdf","pageCount": 12,"pagesOcr": 12,"pagesLowConfidence": 1,"meanOcrConfidence": 0.91,"billedPages": {"page-text": 0, "page-ocr": 11},"markdown": "<!-- page 1 -->\n\nFirst paragraph ...","pages": [{"page": 1, "method": "ocr", "confidence": 0.93, "markdown": "...", "billedAs": "page-ocr", "lowConfidence": false}],"warnings": ["page 7: low OCR confidence 0.41 (...) - not charged"]}
- Each page starts with an invisible
<!-- page N -->marker, so you can cite or split by page. - Very large documents (over 2 million characters) store the full Markdown in the run's key-value store, and the dataset item links to it.
- Files that fail are listed in the
ERRORSkey-value record with the reason. They are never charged.
Accuracy benchmark (real scans, not generated pages)
We measured the Actor on 35 real book and archive pages from Wikisource. The scans are public domain, and the ground truth is human-proofread ("validated") text under CC BY-SA. The metric is character error rate (CER); lower is better.
| Material | Pages | Median CER | Median word error | Median confidence |
|---|---|---|---|---|
| English, 19th–20th c. print | 14 | 4.8% | 8.1% | 0.92 |
| Dutch, modern print | 5 | 1.8% | 9.0% | 0.94 |
| German, modern print | 4 | 6.3% | 13% | 0.90 |
German Fraktur, de-fraktur | 6 | 5.8% | 28% | 0.86 |
German Fraktur, plain de (for comparison) | 6 | 13.6% | 50% | 0.66 |
| Dutch, 17th–18th c. print | 2 | 13.8% | 40% | 0.81 |
| Handwriting (Kurrent) | 4 | ~71%, not supported | – | 0.33 (not charged) |
Some of the remaining error comes from page headers, footnotes and multi-column layouts that the proofread text arranges differently.
Limitations (honest list)
- Handwriting is not supported. It is detected by low confidence and not charged.
- Layout: the output is paragraphs in reading order. Tables come out as text lines rather than Markdown tables, and complex multi-column pages may mix columns.
- No images or formulas: pictures are skipped, and math is OCR'd as plain text.
- Speed: about 1.5–4 seconds per scanned page per vCPU with one language. Every extra language adds time (with 3 languages it is about 6 s per page). Give the Actor more memory (1 vCPU per 4 GB) to process pages in parallel.
- Downloads: files must be reachable by a direct link. Servers that block automated downloads (HTTP 403) are reported, not charged.
Privacy and legal
- Documents are processed inside your Apify run and are not sent to any external API.
- Only process documents you have the right to process.
- It uses Tesseract (Apache-2.0), tessdata_fast models (Apache-2.0) and PDFium via pypdfium2 (Apache-2.0/BSD).
FAQ
Does it work with photos of documents? Yes, as long as they're reasonably sharp and flat. Rotation is detected automatically.
Can I use it through the API, Make, Zapier or n8n? Yes. It works like any Apify Actor: call it with the input JSON and read the dataset.
Found a problem? Open an issue on the Issues tab. We read every one.