Document to Text, Markdown & Tables (PDF, Office, OCR)
Pricing
from $0.25 / 1,000 text pages
Document to Text, Markdown & Tables (PDF, Office, OCR)
Convert PDF, Word, Excel, PowerPoint, HTML and images to clean Markdown, text and tables with metadata. Free built-in OCR for scans in 29 languages, RAG chunks, $0.30 per 1,000 pages.
Pricing
from $0.25 / 1,000 text pages
Rating
0.0
(0)
Developer
Nicholas Powers
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
19 hours ago
Last modified
Categories
Share
Convert PDF, Word (DOCX), Excel (XLSX), PowerPoint (PPTX), HTML, TXT/CSV and images into clean Markdown, plain text, tables (JSON + CSV) and metadata, one page at a time. Scanned pages and images are read with free, built-in Tesseract OCR in 29 languages. OCR only runs on pages that have no text layer, so digital PDFs stay fast and cheap. Optional RAG chunks with page numbers and heading paths are ready for a vector database.
No API keys, no external OCR service, no browser. You pay per page, and documents that fail are free.
What it does
| Input | What you get |
|---|---|
| PDF (digital) | Text in reading order (works with two-column papers), Markdown headings detected from font size and weight, bullet lists, tables with ruling lines as rows/CSV/Markdown, and metadata (title, author, dates, producer) |
| PDF (scanned) | OCR text with paragraphs and a confidence score per page. Mixed PDFs get OCR only on their scanned pages |
| DOCX | Headings, lists, bold, tables (merged cells handled), core properties |
| XLSX | Every worksheet as a table (dates, numbers and formula values), plus sheet names |
| PPTX | One page per slide: title, text boxes in visual order, tables and speaker notes |
| HTML | The main content as Markdown (navigation, footers, scripts and cookie banners removed), absolute links and tables |
| TXT / MD / CSV | Text, or a table for CSV/TSV (the delimiter is detected) |
| Images (PNG, JPG, TIFF incl. multi-page, WebP, BMP, GIF) | OCR text with confidence |
Where the documents come from
- URLs. Paste direct file links. Redirects are followed.
- A dataset. Pick a dataset whose items contain file URLs, for example the output of a scraper that collects PDF links. The URL field is detected automatically (
url,fileUrl,pdfUrl,documentUrl,downloadUrl,link,href,src), or you can set URL field, which accepts dot paths. - A key-value store. Pick a store with uploaded files and, if you want, list specific record keys.
Use it in an integration
Add this Actor under Integrations → Run another Actor when a run succeeds on your scraper, and set the input to:
{ "datasetId": "{{resource.defaultDatasetId}}", "urlField": "pdfUrl" }
Each time your scraper finishes, every linked document is converted. The Actor runs with limited permissions: it can read only the dataset or store you pass in, and it writes only to its own run storage.
Output
Choose how rows are shaped with Output rows:
- One row per document (default):
markdown,text,tables,metadata, apagesarray, and counts of text and OCR pages. - One row per page / slide / sheet: suited to search indexes and page-level citations.
- One row per chunk: overlapping chunks (default 2,000 characters with 200 overlap) that break at paragraph and sentence boundaries. Each chunk carries
pageStart,pageEndandheadings, the section path. You can load the rows straight into Pinecone, Qdrant, pgvector and similar stores.
Sample row (document mode, trimmed):
{"url": "https://arxiv.org/pdf/1706.03762","fileName": "1706.03762v7.pdf","fileType": "pdf","status": "ok","pageCount": 15,"textPages": 15,"ocrPages": 0,"metadata": { "creator": "LaTeX with hyperref", "producer": "pdfTeX-1.40.25", "createdAt": "2024-04-10T21:11:43" },"markdown": "# Attention Is All You Need\n\n...\n\n### Abstract\n\nThe dominant sequence transduction models...","wordCount": 6205,"tables": [],"pages": [ { "page": 1, "method": "text", "wordCount": 412, "markdown": "..." } ]}
A table, here from IRS Form W-9 page 3:
{ "index": 0, "page": 3, "rowCount": 6, "columnCount": 2,"rows": [["IF the entity/individual on line 1 is a(n) . . .", "THEN check the box for . . ."],["• Corporation", "Corporation."], ["• Individual or • Sole proprietorship", "Individual/sole proprietor."]],"csv": "IF the entity/individual on line 1 is a(n) . . .,THEN check the box for . . .\n• Corporation,Corporation.\n..." }
A scanned page shows "method": "ocr" and "ocrConfidence": 93.9 (the mean Tesseract word confidence, 0 to 100).
The run's Output tab links to the results as JSON, an overview table, CSV, Excel, optional .md files and a run summary. Very large documents that would exceed the 9 MB dataset item limit are trimmed automatically. The full Markdown is saved as a .md file and linked in markdownFileUrl.
Pricing (pay per event)
| Event | Price |
|---|---|
| Document extracted | $0.001 |
| Text page (PDF page with a text layer, slide, sheet, DOCX/HTML/TXT file) | $0.30 per 1,000 pages ($0.25 on Gold and higher plans) |
| OCR page (scanned page or image) | $3.00 per 1,000 pages ($2.50 on Gold and higher plans) |
| Actor start | Apify's standard start fee ($0.00005 per GB) |
You are never charged for failed documents. That includes 404s, blocked or private addresses, password-protected files, unsupported formats, files that are too large and documents with no text. Blank pages are not charged either.
Examples:
- 1,000 digital PDFs, 10 pages each: 1,000 × $0.001 + 10,000 × $0.0003 = $4.00
- One 300-page report: $0.001 + 300 × $0.0003 = $0.09
- 500 scanned invoices, 2 pages each: 500 × $0.001 + 1,000 × $0.003 = $3.50
- 2,000 receipt photos: 2,000 × ($0.001 + $0.003) = $8.00
- Mixed 50-page PDF with 5 scanned pages: $0.001 + 45 × $0.0003 + 5 × $0.003 = $0.03
Set Maximum cost per run in the run options to cap spending. The Actor checks the budget before every page and stops cleanly when the cap is reached. Unfinished documents are marked BUDGET_LIMIT and are not charged.
Limits and settings
- Pages:
pageRange(e.g.1-5,8,10-) andmaxPagesPerDocument(default 500). - Size:
maxFileSizeMb(default 50 MB). Larger files fail fast withFILE_TOO_LARGE. - Time:
documentTimeoutSecs(default 600). Pages finished before the timeout are kept and the row is markedtruncated: "timeout". - OCR:
auto(default),offoralways. Pick up to 5 languages and the render DPI (default 200; use 300 for small print). - Speed: the default 2 GB of memory handles about 2 documents in parallel. For big batches or long PDFs, use 4 to 8 GB.
- Proxy: off by default. Turn it on for sites that block data-center IPs or are geo-restricted.
Error codes
Every failed document produces a row with status: "failed", an errorCode and a readable errorMessage:
| Code | Meaning |
|---|---|
INVALID_URL | Malformed URL, a non-http(s) scheme or embedded credentials |
BLOCKED_ADDRESS | The host resolves to a private, loopback, link-local or metadata address (SSRF protection; every redirect hop is checked) |
DNS_FAILED | The host name could not be resolved |
HTTP_ERROR | The server returned 4xx or 5xx |
DOWNLOAD_FAILED / TIMEOUT | Network failure or timeout |
FILE_TOO_LARGE / EMPTY_FILE | Over maxFileSizeMb, or zero bytes |
UNSUPPORTED_FORMAT | Not a supported type. This includes legacy .doc/.xls/.ppt, and login or error pages served instead of the file |
ENCRYPTED | Password-protected PDF |
CORRUPT_FILE | The file is damaged or truncated |
NO_TEXT_FOUND | No text layer, and OCR was off or found nothing |
RECORD_NOT_FOUND / ACCESS_DENIED | Problem with the key-value store record or storage access |
BUDGET_LIMIT | Skipped because the run hit its maximum cost |
Good to know
- PDF tables are detected from their ruling lines. Borderless tables, common in academic papers, stay as readable text. Diagrams that only look like grids are filtered out.
- Text that is rotated in the margins (arXiv stamps, form sidebars) is skipped so it does not break sentences.
- OCR quality depends on the scan. Check
ocrConfidence: above 85 is usually very clean. Handwriting is not supported. - DOCX files have no fixed pages, so the whole document counts as page 1 and is charged as one page.
- Downloads are capped and checked against private networks, and nothing is sent to third-party services. Files are processed inside the run and are not kept beyond your run storage.
FAQ
Can it read scanned PDFs? Yes. Pages without a text layer go through OCR automatically. Pages that already have text are never OCR'd unless you choose always.
Which languages? English, German, French, Spanish, Italian, Portuguese, Dutch, Polish, Czech, Swedish, Danish, Norwegian, Finnish, Romanian, Hungarian, Turkish, Russian, Ukrainian, Greek, Arabic, Hebrew, Hindi, Chinese (Simplified and Traditional), Japanese, Korean, Vietnamese, Indonesian and Thai. Text-layer extraction works for any language.
Can I call it from code or an AI agent? Yes, through the Apify API, the Python or JavaScript client, or the Apify MCP server. Use the chunk mode for RAG pipelines.
Is the output good for LLMs? The Markdown keeps headings, lists and tables, which helps chunking and retrieval. Each chunk records the pages it came from, so answers can cite pages.