PDF & Document to Markdown: OCR, Tables, RAG Chunks
Pricing
from $4.00 / 1,000 document extracteds
PDF & Document to Markdown: OCR, Tables, RAG Chunks
Convert PDFs, scanned images, Word, PowerPoint, Excel, CSV and HTML into clean Markdown or text with tables, OCR for scanned pages (12 languages preinstalled) and token-sized chunks for RAG and LLM pipelines.
Pricing
from $4.00 / 1,000 document extracteds
Rating
0.0
(0)
Developer
Victor Berg
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
3 days ago
Last modified
Categories
Share
Turn PDFs, scanned documents, images, Word, PowerPoint, Excel, CSV and HTML into clean Markdown or plain text – with tables, OCR for scanned pages and token-sized chunks for RAG and LLM pipelines. Paste document URLs or upload files, then get one clean JSON item per document.
- Markdown that keeps the structure – headings, paragraphs, bullet and numbered lists, and tables in reading order. Multi-column PDF pages are read column by column.
- Tables – detected in PDFs and returned separately as Markdown and CSV (and kept in the Markdown).
- OCR only where needed – pages without a text layer (scans, photos, image-only PDFs) are read with Tesseract; normal text pages are not OCR'd and not charged for OCR. 12 languages preinstalled (English, Norwegian, Swedish, Danish, Finnish, German, French, Spanish, Italian, Portuguese, Dutch, Polish); other Tesseract languages are downloaded automatically.
- RAG-ready chunks – optional chunks of ~N tokens with overlap that keep headings, paragraphs and tables together, each with its page range and section heading.
- Pay only for what works – a failed document is returned with its error and never charged.
- Private processing – downloaded content is processed in memory during the run; private and internal network addresses are refused. Uploaded files and output stay in your Apify storage according to its retention settings.
Use cases
- RAG and AI agents: feed PDFs, reports, manuals and policies into embeddings and vector databases.
- Document automation: pull text and tables out of invoices, statements, price lists and reports.
- Scanned archives: make scanned PDFs and images searchable.
- Content migration: convert Word/PowerPoint/HTML to Markdown for docs sites and knowledge bases.
Input
| Field | Default | What it does |
|---|---|---|
urls | – | Public document URLs (PDF, PNG/JPG/TIFF, DOCX, PPTX, XLSX, CSV, TXT/MD, HTML). The type is detected from the file itself. |
files | – | Upload files in the input form, or pass Apify key-value-store record URLs. Use alone or with urls; duplicate links are converted once. |
outputFormat | markdown | markdown, text or both. |
ocr | auto | auto (only pages without text), always, off. |
ocrLanguages | ["eng"] | Tesseract codes, e.g. ["eng", "nor"]. |
pageRange | all | e.g. 1-5,8,10-. |
maxPages | 200 | Pages per document. |
extractTables | true | Return tables as Markdown and CSV. |
includePages | true | Add per-page text. |
chunkSize / chunkOverlap | 0 / 100 | Chunks for RAG, in tokens (0 = no chunks). |
maxFileSizeMb | 50 | Bigger files are skipped (not charged). |
maxConcurrency | 2 | Documents in parallel. |
{"urls": ["https://www.nhc.noaa.gov/data/tcr/AL022023_Arlene.pdf"],"outputFormat": "markdown","ocr": "auto","ocrLanguages": ["eng"],"chunkSize": 500,"chunkOverlap": 50}
Output
One item per document:
{"url": "https://arxiv.org/pdf/1706.03762","status": "ok","documentType": "pdf","fileName": "1706.03762","pageCount": 15,"pagesExtracted": 15,"ocrPages": 0,"language": "en","wordCount": 6012,"markdown": "# Attention Is All You Need\n\nAshish Vaswani ...\n\n## Abstract\n\nThe dominant sequence transduction models ...","pages": [{ "page": 1, "text": "...", "ocr": false, "ocrConfidence": null }],"tables": [{ "page": 8, "index": 0, "rows": 9, "columns": 5, "markdown": "| Model | BLEU ... |", "csv": "Model,BLEU..." }],"chunks": [{ "index": 0, "text": "# Attention Is All You Need ...", "tokens": 498, "pageStart": 1, "pageEnd": 2, "section": "Abstract" }],"metadata": { "title": "...", "author": "...", "created": "..." },"sha256": "…","warnings": null}
A failed document: { "url": "...", "status": "error", "error": "download failed with HTTP 404" } – not charged.
Pricing
Pay per event – you pay only for results:
| Event | Price |
|---|---|
| Document (successful document) | $0.004 |
| OCR page (only pages that needed OCR) | $0.008 |
| Actor start | $0.002 |
1,000 text PDFs cost about $4; a 10-page scanned PDF costs $0.084. Set a maximum cost per run in the run options: the Actor stops cleanly when it is reached and tells you which documents were skipped.
FAQ
Does it work on scanned PDFs? Yes. With ocr: auto, every page without a text layer is OCR'd; text pages are extracted directly.
Which languages does OCR support? 12 are preinstalled; any other Tesseract language code (e.g. jpn, chi_sim, ara, hin) is downloaded on first use in the run.
How are tables handled? PDF tables are detected from ruling lines and cell layout and returned as Markdown and CSV. Spreadsheet sheets and CSV files become tables directly. Word and HTML tables come through the Markdown.
Can I use it from AI agents? Yes – call it through the Apify API, the Apify MCP server, or Claude's Apify connector, and pass chunkSize to get embedding-ready chunks.
Is my data stored? Downloaded content is processed in memory during the run. Uploads are records in a key-value store you choose: temporary storage expires according to your Apify retention settings, while named permanent storage stays until you delete it. Converted output is saved in your run dataset. Deleting a run does not delete an upload from a separate named store.
Limits
- Password-protected PDFs cannot be read. Very complex layouts (heavy multi-column magazines, math-heavy formulas) are approximations.
- OCR quality depends on the scan; the per-page
ocrConfidence(0–100) helps you spot weak pages. - Document links must be public (no website logins). Uploaded files must be readable from the run’s Apify account and permissions. If a temporary upload expires, upload it again.
Legal and privacy
Process only documents you are allowed to use. Private and internal network addresses are refused. The Actor does not keep a separate document copy. Uploads and converted output remain in your Apify storage as described above.