PDF & Document to Markdown (OCR)
Pricing
from $1.00 / 1,000 text page converteds
PDF & Document to Markdown (OCR)
Convert PDFs, DOCX and images you supply into clean Markdown or plain text, with OCR for scanned pages and RAG-ready chunks.
Pricing
from $1.00 / 1,000 text page converteds
Rating
0.0
(0)
Developer
Merrowick Tools
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
3 days ago
Last modified
Categories
Features
Share
Turn PDFs, Word (DOCX) files and images into clean Markdown or plain text, ready for LLMs, RAG pipelines, search indexes and data entry. Scanned pages are read with OCR automatically, and you can get the output pre-split into overlapping chunks for embeddings.
Use cases
- Feed reports, papers, manuals and contracts into RAG / vector databases
- Convert scanned invoices, letters or forms to searchable text
- Bulk-convert DOCX documentation to Markdown (headings, lists, tables kept)
- Extract text from screenshots and photos of documents
Input example
{"fileUrls": ["https://arxiv.org/pdf/1706.03762", "https://example.com/scan.png"],"kvStoreFiles": ["my-store-id/contract.docx"],"outputFormat": "markdown","ocr": "auto","language": "eng","chunkSize": 1500,"chunkOverlap": 200}
ocr:auto(only pages without a text layer),on(every page),offlanguage: Tesseract codes, combine with+(installed: eng, deu, fra, spa, ita, por, nld)chunkSize0 disables chunking; chunks prefer paragraph/sentence boundaries
Output (one item per file)
source, status (ok | blocked | failed), fileType, httpStatus, pages, textPages, ocrPages, chars, content, chunks, error. PDF Markdown output has a ## Page N heading per page.
Pricing (pay per event)
| Event | Price | When |
|---|---|---|
text-page | $0.001 | each PDF page read from its text layer, or each ~3,000 characters of DOCX |
ocr-page | $0.005 | each scanned page or image read with OCR |
No start fee. Failed, blocked or unsupported files and pages above maxPages are not charged. Standard Apify platform usage applies according to your plan.
Privacy and responsible use
- Only the exact URLs / store keys you provide are fetched; nothing is crawled, no proxies or anti-bot evasion are used, and an honest user agent identifies the Actor.
- If a server answers 401, 403 or 429 the file is marked
blocked, not retried around, and not charged. - Documents can contain personal data. Files are processed in memory for the run only; their content is never written to logs. The extracted text goes only to your own run dataset, which follows your Apify data retention settings. Only process files you have the right to process.
Limits
- Max 100 MB per file; default 500 pages per file.
- Password-protected PDFs, legacy .doc, XLSX/PPTX are not supported yet.
- OCR quality depends on scan quality; handwriting is not reliably recognised.
- PDF Markdown is text-per-page (no table reconstruction yet); DOCX keeps headings, lists and tables.
Open-source components (all permissive, commercial use OK)
| Library | License |
|---|---|
| pypdfium2 / PDFium | Apache-2.0 / BSD-3-Clause |
| python-docx | MIT |
| pytesseract | Apache-2.0 |
| Tesseract OCR | Apache-2.0 |
| Pillow | MIT-CMU (HPND) |
| httpx | BSD-3-Clause |
| Apify SDK for Python | Apache-2.0 |
PyMuPDF / pymupdf4llm were deliberately not used because they are AGPL-3.0.
Use with AI agents (MCP)
This Actor works as a tool in any MCP client (Claude, Cursor, VS Code, LangGraph, etc.) through Apify's hosted MCP server.
Add it to your MCP client config (OAuth sign-in opens on first use):
{"mcpServers": {"pdf-to-markdown": { "url": "https://mcp.apify.com?tools=merrowick/pdf-to-markdown" }}}
Or with a token header: "headers": { "Authorization": "Bearer <APIFY_TOKEN>" }. The CLI can write the config for you: apify mcp install cursor.
The tool appears as merrowick--pdf-to-markdown. Only fileUrls is needed. Set a small maxPages to preview long documents cheaply, and chunkSize (e.g. 2000) for RAG-ready chunks.
Example tool-call input:
{ "fileUrls": ["https://arxiv.org/pdf/1706.03762"], "maxPages": 2 }
Example output item (one per input):
{"source": "https://arxiv.org/pdf/1706.03762","status": "ok","fileType": "pdf","httpStatus": 200,"pages": 15,"textPages": 2,"ocrPages": 0,"chars": 7132,"content": "## Page 1\n\n...Attention Is All You Need\nAshish Vaswani...","chunks": null,"error": null}
The tool returns the run status and dataset ID; read the items with get-dataset-items (added automatically by the MCP server). Failed and blocked items are never charged.
Call it from code
API (sync, returns dataset items):
curl -X POST "https://api.apify.com/v2/acts/merrowick~pdf-to-markdown/run-sync-get-dataset-items" \-H "Authorization: Bearer $APIFY_TOKEN" -H "Content-Type: application/json" \-d '{ "fileUrls": ["https://arxiv.org/pdf/1706.03762"], "maxPages": 2 }'
Python (pip install apify-client):
from apify_client import ApifyClientclient = ApifyClient("<APIFY_TOKEN>")run = client.actor("merrowick/pdf-to-markdown").call(run_input={ "fileUrls": ["https://arxiv.org/pdf/1706.03762"], "maxPages": 2 })items = client.dataset(run["defaultDatasetId"]).list_items().items
JavaScript (npm i apify-client):
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: process.env.APIFY_TOKEN });const run = await client.actor('merrowick/pdf-to-markdown').call({ "fileUrls": ["https://arxiv.org/pdf/1706.03762"], "maxPages": 2 });const { items } = await client.dataset(run.defaultDatasetId).listItems();