Documents · Apify actor
Turn PDFs and office files into LLM-ready Markdown
Give it links to PDF, Word, PowerPoint, Excel, EPUB or HTML files. Get back clean Markdown, page counts, metadata and ready-to-embed chunks for your LLM, vector database or RAG pipeline.
What it does
Document to Markdown, in short
- One actor for PDF, DOCX, PPTX, XLSX, XLS, EPUB, HTML, CSV, JSON, XML, IPYNB, MSG, TXT and ZIP
- Headings stay headings, tables become Markdown tables, PDF pages are marked
<!-- Page N -->so answers can cite a page - Page or slide count, word and character counts, file name, format, size and a SHA-256 hash
- Optional heading-aware RAG chunks of the size you choose, each with its
headingPath - Detects the real file type from the bytes, so links without an extension work
- Optional downloadable
.mdfile per document
Who it's for
Built for
sha256 to detect when a document really changed.Example
Input and output
One dataset row per result, downloadable as JSON, CSV or Excel, or read through the Apify API.
{
"documentUrls": ["https://arxiv.org/pdf/1706.03762"],
"chunkSize": 1500,
"chunkOverlap": 150
}From a real cloud run on the 15-page “Attention Is All You Need” paper (converted in 277 ms), shortened.
{
"url": "https://arxiv.org/pdf/1706.03762",
"fileName": "1706.03762v7.pdf",
"format": "PDF",
"fileSizeBytes": 2215244,
"pageCount": 15,
"wordCount": 6177,
"markdown": "<!-- Page 1 -->\nProvided proper attribution is provided, ...\nAttention Is All You Need ...",
"chunks": [
{ "index": 0, "text": "<!-- Page 1 -->\nProvided proper attribution ...",
"headingPath": [], "charCount": 1475 }
],
"processingTimeMs": 277,
"error": null
}Pricing
Pay per result. Failures are free.
No subscription, no monthly minimum. Apify platform compute is included in the price; Apify also adds a tiny start fee per run ($0.00005 per GB of run memory).
| You run | You pay |
|---|---|
| 1 document | $0.004 |
| 50 PDFs | $0.20 |
| 1,000 documents | $4.00 |
| 20,000 documents | $80.00 |
30 scans = $0.00
Not charged:
- Downloads that fail
- Files over the size limit and unsupported types
- Scanned PDFs with no text layer, conversion errors and timeouts
The price is the same for a 1-page memo and a 300-page manual. You can set Maximum cost per run in the run options and the actor stops cleanly when it is reached.
FAQ
Questions
Does it do OCR on scanned PDFs?
No. Digitally created PDFs have a text layer and work. A pure image scan is returned with an error and is not charged. For scans, use Image to Text OCR.
Do I pay for files that fail?
No. Only documents that produced Markdown are charged. Every failure is listed with its reason.
How are PDFs handled?
With PDFium (the PDF engine inside Chrome, via pypdfium2), which keeps word spacing intact and marks each page. Other formats use Microsoft's open-source MarkItDown converter.
Do links without a file extension work?
Yes. The type is detected from the downloaded bytes, and servers that send the wrong Content-Type are handled.
Is my data stored?
Only in your own Apify run storage (dataset and key-value store), which you control and can delete.
Try Document to Markdown on Apify
Apify's free plan includes monthly platform credit you can use to try it. Also callable from AI assistants through the Kanto Labs MCP server.
Other Kanto Labs tools
Tech Stack Detector
CMS, ecommerce, analytics, frameworks, CDN and hosting for any list of domains.
Website SEO Audit
0-100 score and a prioritized fix list per page, broken links and AI crawler checks.
Image to Text OCR
Photos, screenshots and scanned PDFs to text, with line boxes and confidence.