PDF & DOCX to Markdown — Document Extractor for LLM/RAG
Pricing
from $3.00 / 1,000 document page processeds
PDF & DOCX to Markdown — Document Extractor for LLM/RAG
Convert PDF and Word (DOCX) documents into clean Markdown, text, or JSON. Smart PDF paragraph reflow, page markers for RAG citations, full DOCX structure (headings, lists, tables), custom auth headers. No browser — parses in seconds. Charged per page processed — no startup fee.
Pricing
from $3.00 / 1,000 document page processeds
Rating
0.0
(0)
Developer
Runlayer
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
15 hours ago
Last modified
Categories
Share
PDF & DOCX to Markdown — Document Text Extractor for LLMs
Convert PDF and Word (DOCX) documents into clean Markdown, plain text, or JSON — ready for RAG pipelines, LLM prompts, embeddings, and datasets. Point it at your document URLs and get back structured, chunk-ready content.
Billing is per page actually processed (about ⅓ the price of hosted parsing APIs). No startup fee. Failed documents cost $0.
Quick start
{"fileUrls": ["https://example.com/whitepaper.pdf"]}
→ one dataset item per document:
{"url": "https://example.com/whitepaper.pdf","fileType": "pdf","pages": 15,"wordCount": 6112,"title": "Attention Is All You Need","markdown": "The dominant sequence transduction models are based on…"}
What it does well
Page-aware text extraction with smart paragraph reflow (fixes the broken-mid-sentence line breaks raw PDF extractors produce); optional --- Page N --- markers so your chunks can cite pages; document title from PDF metadata | |
| DOCX | Full structure preserved — headings, lists, tables (GFM), links, bold/italic — via real .docx parsing, not text-dump |
| Outputs | Markdown / plain text / JSON (JSON includes per-page text array for PDFs) |
| Protected files | Custom request headers (e.g. Authorization: Bearer …) for presigned or authenticated URLs you have access to |
| Cost control | maxPagesPerDoc cap (default 500) so a giant PDF can't surprise you |
| Speed | No browser involved — documents parse in seconds on the lightweight runtime |
Built for AI pipelines
- RAG ingestion: fetch →
markdown→ chunk → embed. UsepageMarkersto keep page-level citations. - Whole knowledge bases: pass hundreds of URLs in one run; each becomes one clean dataset record.
- Agents: call via the Apify API or MCP server to give an agent readable documents instead of binary blobs.
- Pairs with Website to Markdown from the same publisher — web pages + documents, one uniform Markdown output for your whole ingestion pipeline.
curl -X POST "https://api.apify.com/v2/acts/runlayer~document-to-markdown/run-sync-get-dataset-items?token=YOUR_TOKEN" \-H "Content-Type: application/json" \-d '{"fileUrls": ["https://example.com/report.pdf"], "outputFormat": "json"}'
Pricing
A small fixed price per page processed (PDF pages; DOCX bills as ~500-word page equivalents, minimum 1), plus standard Apify platform usage — which is tiny here, since no browser is involved. Failed documents are never billed.
Current limits (roadmap)
- Scanned/image-only PDFs are not OCR'd yet — they return a clear error and are not billed. OCR support is planned; ask for it in the issues tab if you need it and it moves up the list.
- Complex multi-column PDF layouts extract in reading order on a best-effort basis (this is a hard limit of the PDF format itself).
- DOC (legacy Word), ODT and image formats are not yet supported.
FAQ
Where do my documents go? They're fetched, parsed in the run's container, and the extracted content is stored only in your own run's dataset. Nothing is retained by the actor. Only submit documents you have the right to process.
A document failed — was I charged? No. Only successfully processed pages are billed.
Need OCR, ODT, or another format? Open an issue — this actor iterates fast. If it saves you time, a ⭐ review helps others find it.
More tools by Runlayer
Part of a suite of fast, no-nonsense web utilities — all pay-per-result, charged only on success, no startup fee:
- Website Screenshot API — full-page PNG / JPEG / WebP / PDF
- Website to Markdown — clean Markdown for LLMs & RAG
- PDF & DOCX to Markdown — documents → Markdown for RAG
- SEO Audit + Core Web Vitals — scored on-page audit with fixes
- Website Performance Audit — bulk Core Web Vitals & page speed
- Tech Stack Detector — CMS, frameworks, analytics, hosting
- Domain, DNS & WHOIS Lookup — records, registration, SSL
- RSS Feed Reader — RSS / Atom / JSON → normalized JSON
- Job Postings API — Greenhouse, Lever, Ashby & more
Use with AI agents (MCP)
This Actor is callable by AI agents through the Apify MCP server. Agents in Claude, Cursor, Windsurf, LangGraph, CrewAI and others can discover it via search-actors and run it as a tool — its inputs and outputs are fully described in the schema for reliable agent use.