Document to Markdown for AI Agents: PDF, Word, Excel, OCR
Pricing
from $5.00 / 1,000 documents
Document to Markdown for AI Agents: PDF, Word, Excel, OCR
Convert PDF, DOCX, PPTX, XLSX, EPUB, HTML and scanned images to clean Markdown with tables, page markers and OCR. Built for LLMs, RAG pipelines and AI agents via MCP. Failed downloads and unsupported files are free.
Pricing
from $5.00 / 1,000 documents
Rating
0.0
(0)
Developer
Greenrun
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
15 hours ago
Last modified
Categories
Features
Share
Document to Markdown for AI Agents
Convert PDF, Word, PowerPoint, Excel, EPUB, HTML, CSV and scanned images into clean Markdown that LLMs can read. Give it links, get back one Markdown document per link, with tables, page markers and OCR for scans. Failed downloads and unsupported files are free.
What it does
- PDF to Markdown page by page, with
<!-- page N -->markers so your agent can cite page numbers. - PDF tables to Markdown tables in reading order, without duplicating the table text. Works for fully ruled tables and for tables ruled only horizontally; layout boxes and figures stay as text.
- OCR for scanned PDFs and images (Tesseract) in
automode: only pages without a text layer are OCR-ed, so you pay for OCR only where it is needed. - Word, PowerPoint, Excel, EPUB, HTML, CSV, JSON, XML to Markdown, tables included.
- One dataset item per URL, in input order, with
status,error, page counts and the exact events you were charged for.
Why use it
- Made for agents and RAG. Output is plain Markdown plus a few numbers, small enough to drop into a prompt or a vector store.
- Pay per document and page. A typical document costs $0.005; links that fail to download and unsupported files cost nothing.
- Limited permissions. The Actor only touches its own run storage, nothing else in your Apify account.
- No tricks. It downloads exactly the links you give it, without proxies or CAPTCHA solving. Links behind a login or bot protection fail with a clear error, free of charge.
Supported formats
| Format | Notes |
|---|---|
| Text, ruled tables, page markers, OCR for scanned pages | |
| DOCX, PPTX, XLSX, XLS | Text and tables |
| EPUB, HTML, CSV, JSON, XML, TXT, IPYNB | Converted to Markdown |
| PNG, JPEG, TIFF (multi-page), GIF, BMP, WEBP | OCR |
Not supported: legacy .doc and .ppt, ZIP archives, password-protected PDFs.
How to use
In Apify Console
Paste document links into Document URLs and press Start. Each link becomes one row in the dataset.
From an AI agent (MCP)
Connect any MCP client to the Apify MCP server with only this Actor as a tool:
https://mcp.apify.com?tools=greenrun/document-to-markdown
The agent passes urls and reads markdown from the result.
Through the API
curl -X POST "https://api.apify.com/v2/acts/greenrun~document-to-markdown/run-sync-get-dataset-items" \-H "Authorization: Bearer <APIFY_TOKEN>" \-H "Content-Type: application/json" \-d '{"urls": ["https://arxiv.org/pdf/1706.03762"]}'
Input
| Field | Default | Description |
|---|---|---|
urls | Document links (http or https), one dataset item each | |
ocr | auto | auto: only scans and images; force: every page; off: never |
ocrLanguages | eng | Tesseract codes joined with +. Available: eng, pol, deu, fra, spa, ita, por, nld |
extractTables | true | Render ruled PDF tables as Markdown tables |
pageMarkers | true | Insert <!-- page N --> before each PDF page |
maxPages | 200 | Stop converting a PDF after this many pages |
maxFileSizeMb | 50 | Larger files fail with an error, free of charge |
timeoutSecsPerDocument | 600 | PDFs and scans stop at the next page after this time and return the pages done so far, with a warning. A conversion that hangs is stopped 120 s later and returns the pages done |
Output
{"url": "https://arxiv.org/pdf/1706.03762","status": "success","format": "pdf","fileName": "1706.03762v7.pdf","contentType": "application/pdf","sizeBytes": 2215244,"title": null,"pageCount": 15,"pagesProcessed": 15,"truncated": false,"tablesFound": 0,"ocrPages": 0,"characters": 39971,"markdown": "<!-- page 1 -->\n\nProvided proper attribution is provided, Google hereby grants permission to ...","markdownUrl": null,"warnings": [],"billableEvents": { "document": 1, "extra-page": 0, "ocr-page": 0 },"workGbSecs": 9.6,"processingMs": 2701,"error": null}
This is real output from a run on 16 November 2026, with the Markdown shortened (workGbSecs, the run time the document used, comes from a run on 21 November 2026). title comes from the document's metadata and is null when the file has none, as here. The tables of this paper are drawn with three rules and merged headers, so they come out as text rather than as a broken table. When the Markdown is larger than 5 MB, markdown holds a preview and markdownUrl links to the full text in the run's key-value store.
Pricing
Pay per event, no subscription:
| Event | Price | When |
|---|---|---|
| Actor start | $0.0045 per GB of memory | Each run: $0.009 at the default 2 GB |
| Document | $0.005 | Each document downloaded and recognized as a supported format, including up to 20 PDF pages and 48 GB-seconds of work (24 s at 2 GB); one more for each further started 48 GB-seconds that its page events do not cover (a very slow download, very complex pages, a large Office file) |
| Extra PDF page | $0.0002 | Each PDF page above 20 |
| OCR page | $0.01 | Each page read with OCR, charged before the OCR runs |
Free: links that fail to download, files over maxFileSizeMb and unsupported formats. A document is charged once its file is recognized, also when the conversion then fails (a damaged or password-protected file) or stops at timeoutSecsPerDocument (you get the pages done so far). billableEvents and workGbSecs in each item show what it was charged for.
Examples: 100 text PDFs of up to 20 pages cost $0.50 plus the start. A 71-page PDF full of tables (IRS Publication 15-T) costs $0.005 + 51 × $0.0002 = $0.0152. A 120-page PDF costs $0.005 + 100 × $0.0002 = $0.025. A 10-page scan costs $0.005 + 10 × $0.01 = $0.105.
Every run stays within what its charges pay for. A run whose links only fail (dead hosts, missing files) stops once its Actor start is used up and lists the links it did not try in the RUN-REPORT record (notProcessedInputs); start them again in a new run. You can cap the cost of a run with the maximum charge in the run options (at least $0.025); the Actor stops cleanly at that limit and does not start documents it cannot charge for.
Limits
- Tables are detected in PDFs that draw ruled lines; tables without lines, and tables too sparse or irregular to rebuild reliably, come out as text.
- HTML pages are converted whole, navigation included. To crawl websites, use a web crawler Actor.
- OCR quality depends on the scan; 300 dpi scans work best.
- Links must be publicly downloadable; private networks and local addresses are blocked.
FAQ
Do you keep my documents? No. Files are downloaded into the run's temporary storage and deleted after conversion. The Markdown stays in your run's dataset in your own Apify account, under your data retention settings.
Can my agent use it without code? Yes, through the Apify MCP server link above.
Something does not convert well? Open an issue on the Actor's Issues tab with the link (if it is public), and it will be looked at.