Document to Markdown — PDF, DOCX & OCR for RAG
Pricing
from $3.00 / 1,000 document converteds
Document to Markdown — PDF, DOCX & OCR for RAG
Convert PDF, DOCX, HTML and text files to clean Markdown with headings, lists and tables. Scanned pages are OCR'd automatically. Get RAG-ready chunks for LLMs and vector databases. Pay only per document.
Pricing
from $3.00 / 1,000 document converteds
Rating
0.0
(0)
Developer
Casian Data
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
7 hours ago
Last modified
Categories
Share
Turn PDF, Word (DOCX), HTML and text files into clean Markdown — with headings, lists and tables preserved, automatic OCR for scanned pages, and RAG-ready chunks you can send straight to an embedding model or vector database.
What it does
- PDF → Markdown with real structure: headings are detected from font sizes, bullet lists are kept, hyphenated line breaks are joined, running headers/footers and page numbers are removed, and two-column papers are read in the right order.
- Automatic OCR: pages that have no text layer (scans, photos, image-only PDFs) are OCR'd with Tesseract. Choose
auto,forceoroff, and pick languages (English bundled; 100+ others supported). - DOCX → Markdown including tables (as GitHub-flavoured Markdown tables).
- HTML → Markdown keeping only the main content (navigation, scripts and footers dropped).
- Chunks for RAG: each document is split on heading and paragraph boundaries into chunks of your chosen size with overlap. Every chunk carries the nearest heading for context.
- Page ranges for long PDFs, a per-page output option, and file-size limits.
Typical uses
- Feed documents into LLM / RAG pipelines (LangChain, LlamaIndex, OpenAI, Pinecone, Qdrant, Weaviate).
- Convert invoices, contracts, reports and research papers to text you can search or analyse.
- Batch-convert a list of PDF links from a website, a spreadsheet or another Actor.
Input
| Field | Description |
|---|---|
urls | Direct links to PDF, DOCX, HTML or TXT/Markdown files |
pageRange | Optional, e.g. 1-20 |
ocr | auto (default), force, off |
ocrLanguages | Tesseract codes, e.g. ["eng","deu"] |
chunkSize / chunkOverlap | Characters per chunk (0 disables chunking) |
includePages | Also return Markdown per page |
{"urls": ["https://arxiv.org/pdf/1706.03762"],"pageRange": "1-2","ocr": "auto","chunkSize": 1500,"chunkOverlap": 150}
Output
One dataset item per document:
{"sourceUrl": "https://arxiv.org/pdf/1706.03762","type": "pdf","title": "Attention Is All You Need","pageCount": 15,"processedPages": 2,"ocrPages": 0,"characters": 7112,"markdown": "...\n\n# Attention Is All You Need\n\n...\n\n## Abstract\n\nThe dominant sequence transduction models are based on complex recurrent or convolutional neural networks ...","chunks": [{ "index": 0, "heading": "Attention Is All You Need", "text": "...", "chars": 780 }],"error": null}
(Real output for "pageRange": "1-2", shortened.)
Failed documents are returned with an error message and are not charged.
Pricing (pay per event)
You pay only for what is converted:
- Document: per converted document, includes the first 10 pages
- Extra page: each page beyond 10
- OCR page: each page that had to be OCR'd
No charge for failed or unsupported files. Set a maximum cost per run in the run options to cap spending.
Tips
- For scanned documents in other languages, set
ocrLanguages, e.g.["eng","fra"]. - Use
pageRangeto test on a few pages before converting a large file. - To convert private files, upload them to an Apify key-value store and use the record's URL.
Use it from your code or no-code tools
- API: call the Actor with one HTTP request and read the results as JSON, CSV or Excel. Python and JavaScript clients are available (
apify-client). - LangChain / LlamaIndex: load the dataset with the Apify dataset loaders and index the
chunksdirectly. - Make, n8n, Zapier: use the Apify integration to convert every new PDF from Google Drive, Dropbox or email attachments automatically.
- AI agents (MCP): agents connected to the Apify MCP server can call this Actor to read a PDF they were given a link to.
FAQ
Can it convert scanned PDFs to text? Yes. Pages without a text layer are OCR'd automatically (ocr: "auto"). Use force for PDFs whose text layer is broken.
How is this different from a plain PDF-to-text tool? You get Markdown with headings and lists instead of a wall of text, page headers and footers removed, two-column papers in reading order, and chunks ready for embeddings.
Which languages does OCR support? English is built in. Add any Tesseract language code in ocrLanguages, e.g. deu, fra, spa, tur, rus, ara, chi_sim.
How much does it cost? $3 per 1,000 documents (first 10 pages included), $0.30 per 1,000 extra pages, $3 per 1,000 OCR pages. Failed files are free.
Can I convert files from my computer? Upload them to an Apify key-value store, Google Drive (public link) or any file host and paste the direct link.
Limitations
- Complex PDF tables are output as text lines, not Markdown tables (DOCX and HTML tables are converted).
- Mathematical formulas are kept as plain text.
- Password-protected PDFs are not supported.
Privacy
Documents are processed only to produce your output and are not stored outside your own Apify storage.