PDF & DOCX to Markdown and Text Extractor with OCR
Pricing
from $2.00 / 1,000 document processeds
PDF & DOCX to Markdown and Text Extractor with OCR
Convert PDF, Word (DOCX), PowerPoint, Excel, CSV and scanned images to clean Markdown or plain text. PDF OCR, tables as JSON, metadata and RAG-ready chunks. Multi-column PDFs, Google Drive and Dropbox links.
Pricing
from $2.00 / 1,000 document processeds
Rating
0.0
(0)
Developer
Oriol Bayó Llavall
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
5 days ago
Last modified
Categories
Security
Limited permissionsShare
What does Document to Markdown do?
Document to Markdown converts PDF, Word (DOCX), PowerPoint (PPTX), Excel (XLSX), CSV, TXT/Markdown and images into clean Markdown or plain text, ready for LLMs, RAG pipelines, search indexes and data analysis.
Give it a list of document URLs and get back structured JSON with:
- 📝 Full text as Markdown – headings, lists and tables preserved
- 📊 Tables as Markdown tables and as structured rows (
tables[].rows) - 📰 Correct reading order for multi-column PDFs (papers, forms, brochures)
- 🔍 OCR for scanned PDFs and images (9 languages) – only pages without a text layer are OCR'd in auto mode
- ✂️ RAG-ready chunks with configurable size, overlap and page references (
pageStart/pageEnd) - 🏷️ Metadata – title, author, subject, creation/modification dates, sheet names
- 🔗 Google Drive, Google Docs/Sheets/Slides and Dropbox share links work out of the box
- 💸 No proxies, no browser – fast and cheap
PDF to Markdown, DOCX to text and PDF OCR in one Actor
| You want to… | Use these settings |
|---|---|
| Convert PDF to Markdown (keep headings, lists and tables) | outputFormat: "markdown" |
| Convert DOCX to text (Word to plain text) | outputFormat: "text" |
| OCR scanned PDFs and images (PDF OCR) | ocr: "auto" (or "always") and the document languages in ocrLanguages |
| Extract text from PDF page by page | splitBy: "page" |
| Extract tables from PDF or Excel as JSON | extractTables: true → tables[].rows |
| Chunk documents for RAG and embeddings | splitBy: "chunk", chunkSize, chunkOverlap |
One input, any mix of formats: PDF, DOCX, PPTX, XLSX, CSV, TXT and images in the same run.
Why use it?
- Build a RAG chatbot or AI agent over PDFs, manuals, contracts or reports
- Feed documents to LLMs (ChatGPT, Claude, Gemini, Llama) as compact Markdown instead of raw PDFs
- Index documents in vector databases such as Pinecone, Qdrant, Weaviate, Chroma or pgvector
- Extract tables from PDF reports and spreadsheets into JSON/CSV/Excel
- Digitize scanned documents with OCR
- Automate document pipelines with the Apify API, Make, Zapier, n8n or LangChain
Supported formats
| Format | Extensions | Notes |
|---|---|---|
.pdf | Text, headings, tables, multi-column layouts, OCR for scanned pages | |
| Word | .docx | Headings, lists, tables, metadata |
| PowerPoint | .pptx | One page per slide, titles, bullet levels, tables, optional speaker notes |
| Excel | .xlsx | One page per sheet, each sheet as a table |
| CSV / TSV | .csv, .tsv | Delimiter auto-detected |
| Text | .txt, .md | Markdown headings preserved |
| Images | .png, .jpg, .tiff, .webp, .gif, .bmp | OCR (multi-page TIFF supported) |
Legacy binary Office formats (.doc, .xls, .ppt) are not supported – save them as .docx, .xlsx or .pptx first. Password-protected PDFs are reported as errors.
How much does it cost?
You only pay for documents that are processed successfully – failed downloads and unsupported files are free.
| Event | Price |
|---|---|
| Document processed | $0.002 per document |
| Page processed | $0.0005 per page (= $0.50 per 1,000 pages) |
| OCR page | additional $0.002 per OCR'd page |
A page is a PDF page, a slide or a sheet. For DOCX, CSV and text files every 3,000 characters count as one page.
Examples: a 10-page PDF costs $0.007. 1,000 single-page invoices cost $2.50. A 20-page scanned contract with OCR costs $0.052.
Use Max pages per document to cap the cost of very large files. Apify's free plan includes monthly credits, so you can try the Actor for free.
How to use it
- Click Try for free.
- Add document URLs in Document URLs (or upload a file).
- Choose the output format (Markdown or plain text) and one item per document, page or chunk.
- Click Start and download the results as JSON, CSV, Excel or HTML, or fetch them via the API.
Input example
{"startUrls": [{ "url": "https://arxiv.org/pdf/1706.03762" },{ "url": "https://drive.google.com/file/d/FILE_ID/view?usp=sharing" }],"outputFormat": "markdown","splitBy": "chunk","chunkSize": 1500,"chunkOverlap": 150,"extractTables": true,"ocr": "auto","ocrLanguages": ["eng", "spa"]}
Output example
One item per document (splitBy: "document"):
{"url": "https://arxiv.org/pdf/1706.03762","fileName": "1706.03762v7.pdf","fileType": "pdf","status": "success","pageCount": 15,"processedPages": 15,"ocrPages": 0,"charCount": 38374,"metadata": {"creator": "LaTeX with hyperref","producer": "pdfTeX-1.40.25","createdAt": "2024-04-10T21:11:43"},"text": "## Attention Is All You Need\n\nAshish Vaswani∗ Google Brain ...\n\n### Abstract\n\nThe dominant sequence transduction models ...","tables": [{ "page": 4, "rows": [["Region", "Q1", "Q2"], ["North", "100", "120"], ["South", "80", "95"]] }]}
One item per chunk (splitBy: "chunk") – ready to embed:
{"url": "https://arxiv.org/pdf/1706.03762","fileName": "1706.03762v7.pdf","fileType": "pdf","status": "success","pageCount": 15,"chunkIndex": 3,"chunkCount": 37,"pageStart": 2,"pageEnd": 3,"text": "... attention mechanisms, dispensing with recurrence ..."}
Errors never stop the run. Each failed document produces an item such as:
{ "url": "https://example.com/report.doc", "status": "error", "error": "Legacy Office format (.doc/.xls/.ppt) is not supported. Save the file as .docx/.xlsx/.pptx." }
Very large texts (over 4 million characters) are stored in the run's key-value store and linked in textUrl.
Tips
- RAG: use
splitBy: "chunk"withchunkSize1,000–2,000 andchunkOverlap10% of the chunk size. - Scanned PDFs: keep OCR on auto and select the document languages for better accuracy.
- Tables in PDFs: tables drawn with cell borders are detected best. Tables without borders are kept as text in reading order.
- Google Drive / Dropbox: the file must be shared as anyone with the link can view.
Integrations and API
Run the Actor from your code with the Apify API, the Python or JavaScript client, or connect it to Make, Zapier, n8n, LangChain, LlamaIndex and other tools through Apify integrations. It also works with AI agents via the Apify MCP server.
FAQ
Is my data stored? Documents are processed in memory during the run. Results are saved only in your own Apify storage, under your account's data retention settings.
Can it read handwriting? OCR is optimized for printed text. Handwriting accuracy is limited.
Something not working? Open an issue in the Issues tab with the document URL (if public) and we will fix it quickly.