Document to Markdown for RAG: PDF, DOCX, PPTX, XLSX, HTML
Pricing
from $2.00 / 1,000 document converteds
Document to Markdown for RAG: PDF, DOCX, PPTX, XLSX, HTML
Convert PDF, Word (DOCX), PowerPoint (PPTX), Excel (XLSX), HTML and TXT files from URLs into clean markdown and plain text with headings, lists and tables, plus ready-to-embed chunks for RAG and AI agents. Optional OCR for scanned pages. Pay per page.
Pricing
from $2.00 / 1,000 document converteds
Rating
0.0
(0)
Developer
UnaData
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
9 days ago
Last modified
Categories
Features
Share
Convert PDF, Word (DOCX), PowerPoint (PPTX), Excel (XLSX), HTML pages and text files into clean markdown and plain text, with ready-to-embed chunks for RAG pipelines, vector databases and AI agents. Headings, lists and tables are preserved, every chunk knows its page number, and OCR for scanned pages and images is available when you need it.
Paste document URLs → get one JSON row per document: markdown, text, chunks[], tables[], title, language, pages, wordCount, sha256.
Who is it for?
- RAG / LLM developers: turn PDFs and Office files into markdown chunks that you can embed straight into Pinecone, Qdrant, Weaviate, pgvector, Chroma or OpenAI vector stores.
- AI agents (MCP): a "read this document" tool. Give the agent a URL and it gets clean markdown back.
- Legal, finance and procurement teams: convert annual reports, contracts and tender documents to searchable text.
- Data teams: extract tables from DOCX, PPTX, XLSX and HTML as arrays of rows.
Features
- One actor, many formats: PDF, DOCX, PPTX, XLSX, HTML, TXT/MD/CSV/JSON, and PNG/JPG/TIFF/WebP images (with OCR). The type is detected from the file content, so URLs without an extension work too.
- Markdown that keeps structure:
- PDF: titles and section headings (font size + numbered headings such as
3.2.1), paragraphs, bullet lists, de-hyphenation, page numbers removed. - DOCX: headings, lists, bold/italic, links, tables.
- PPTX: one
## Slide N: titlesection per slide, bullets, tables, optional speaker notes. - XLSX: one markdown table per sheet, hidden sheets skipped.
- PDF: titles and section headings (font size + numbered headings such as
- RAG chunks: paragraph- and sentence-aware splitting with configurable
chunkSizeandchunkOverlap. Each chunk hasindex,text,pageandtokensEstimate. - Tables as data:
tables[]withrows: string[][](DOCX, PPTX, XLSX, HTML). - OCR only when needed:
ocr: "auto"reads only pages with no text layer (scanned PDFs) and images. Tesseract, 100+ languages. - Privacy by default: e-mail addresses and international phone numbers are masked (
[email removed]) so personal contact data does not end up in your index. You can turn this off. - Cost control:
maxPagesPerDocument,maxOcrPages,maxFileSizeMb, and the run's maximum charge are all respected. The actor stops cleanly when the budget is used up. - No browser, no proxies: plain HTTP downloads, fast and cheap. A 15-page PDF converts in about 1 second.
Input example
{"urls": ["https://arxiv.org/pdf/1706.03762v7","https://example.com/annual-report.docx","https://example.com/slides.pptx"],"outputFormat": "markdown","chunkSize": 1500,"chunkOverlap": 150,"maxPagesPerDocument": 50,"ocr": "auto","ocrLanguages": ["eng"]}
| Field | Default | Description |
|---|---|---|
urls | – | Public document URLs. To convert your own file, upload it to an Apify key-value store and pass the record URL (the actor authenticates automatically for your own stores). |
outputFormat | markdown | markdown, text or both. |
chunkSize / chunkOverlap | 1500 / 150 | Chunk length and overlap in characters. chunkSize: 0 disables chunking. |
maxPagesPerDocument | 200 | PDF pages / PPTX slides / XLSX sheets per document. For DOCX, HTML and TXT one page = 3,000 characters. |
ocr | off | off, auto (only pages without text + images), force (every PDF page). |
ocrLanguages | ["eng"] | Tesseract codes: eng, deu, fra, spa, ita, por, nld, pol, rus, ukr, chi_sim, jpn, … |
maxOcrPages | 20 | OCR page cap for the whole run. |
includeTables | true | Return tables as rows arrays as well. |
includeSpeakerNotes | false | Add PowerPoint speaker notes. |
maxRowsPerSheet | 1000 | Rows read per Excel sheet. |
redactContacts | true | Mask e-mails and phone numbers. |
maxFileSizeMb | 50 | Bigger files return an error row. |
maxItems | 100 | Documents per run. |
Output example
{"sourceUrl": "https://arxiv.org/pdf/1706.03762v7","fileName": "1706.03762v7.pdf","fileType": "pdf","mimeType": "application/pdf","fileSizeBytes": 2215244,"pages": 15,"pagesConverted": 15,"billedPages": 15,"title": "Attention Is All You Need","language": "eng","markdown": "# Attention Is All You Need\n\n...\n\n## Abstract\n\nThe dominant sequence transduction models ...\n\n## 1 Introduction\n\n...\n\n#### 3.2.1 Scaled Dot-Product Attention\n\n...","text": null,"chunks": [{ "index": 0, "text": "## Provided proper attribution ...", "page": 1, "tokensEstimate": 147 },{ "index": 1, "text": "## Abstract\n\nThe dominant sequence ...", "page": 1, "tokensEstimate": 321 }],"chunkCount": 35,"tables": [],"tableCount": 0,"ocrPages": [],"wordCount": 6245,"charCount": 39997,"sha256": "…","warnings": [],"convertedAt": "2026-11-16T03:00:00.000Z","error": null}
Every row has the same fields; a missing value is null (or an empty array). If a document cannot be converted, you get a row with error filled in (for example Download failed: HTTP 404 or Legacy binary Office format (.doc/.xls/.ppt) is not supported), and you are not charged for it. A RUN_SUMMARY record in the key-value store lists converted/failed documents, pages, OCR pages and chunks.
Output fields
sourceUrl, fileName, fileType (pdf, docx, pptx, xlsx, html, text, image), mimeType, fileSizeBytes, pages (native page/slide/sheet count), pagesConverted, billedPages, title, language (ISO 639-3), markdown, text, chunks[] {index, text, page, tokensEstimate}, chunkCount, tables[] {index, page, rows}, tableCount, ocrPages[], wordCount, charCount, sha256 (to detect changed files), warnings[], convertedAt, error.
Pricing (pay per event)
| Event | Price | When |
|---|---|---|
| Document converted | $0.002 | each successfully converted document |
| Page converted | $0.0005 | each PDF page, PPTX slide, XLSX sheet, or 3,000 characters of DOCX/HTML/TXT |
| OCR page | $0.003 | each page or image read with OCR (instead of the page charge) |
Examples: a 15-page PDF costs $0.0095; 1,000 ten-page PDFs cost $7; a 2-page Word memo costs $0.003; a scanned 10-page PDF with OCR costs $0.032. Failed documents are free. Platform usage is included.
Use with AI agents / MCP
This actor works as a tool for AI agents through the Apify MCP server. Add unadata/docs-to-markdown to your MCP client (Claude Desktop, Cursor, VS Code, LangGraph, OpenAI Agents) and the agent can call it with a list of URLs to get markdown and chunks back. Keep chunkSize: 0 and outputFormat: "markdown" when the agent should read the whole document, or use chunks when it should index it.
It also works from code: the Apify API, the Python/JavaScript clients, LangChain (ApifyDatasetLoader), LlamaIndex, Make, Zapier and n8n.
Limitations
- PDF tables are kept as text in reading order, not as markdown tables (DOCX, PPTX, XLSX and HTML tables are real tables). Multi-column layouts follow the PDF's reading order, which is usually correct for papers and reports.
- Math formulas come out as plain text approximations.
- Images inside documents are not described or OCRed (only scanned pages and image files are).
- Legacy .doc/.xls/.ppt and OpenDocument (ODT/ODS/ODP) files are not supported yet. Save them as DOCX/XLSX/PPTX or PDF.
- Password-protected PDFs and files behind a login are not supported. URLs must be publicly reachable.
- HTML: the actor converts the page as delivered by the server (no JavaScript rendering). For JavaScript-heavy websites use a web crawler first.
- OCR quality depends on the scan; it takes about 3–20 seconds per page. Use 2–4 GB memory for large OCR jobs.
- You are responsible for having the right to process the documents you submit. The actor does not store your documents after the run (results stay in your own dataset).
FAQ
How do I convert a PDF to markdown for RAG? Put the PDF URL into urls, keep outputFormat: "markdown" and set chunkSize (1,000–2,000 characters works well for most embedding models). Each dataset row then has chunks[] that you can embed directly.
Can I convert files from my computer? Yes. Upload the file to an Apify key-value store (Console → Storage → Key-value stores, or the API) and use the record URL as input.
How are pages counted for Word and HTML files? These formats have no fixed pages, so every 3,000 characters of extracted text count as one page (at least one page per document).
Does it OCR every PDF? No. With ocr: "auto" only pages without a text layer are OCRed. With ocr: "off" (default) you get a warning when a PDF looks scanned.
Which languages are supported? Text extraction works for any language. OCR supports all Tesseract languages; set ocrLanguages, for example ["deu", "eng"].
How do I detect changed documents? Compare the sha256 field between runs.
Is it a PDF text extractor or a full document parser? Both: you get plain text for search and markdown with structure for LLMs, plus tables as data for DOCX, PPTX, XLSX and HTML.
Keywords: pdf to markdown, docx to markdown, document to markdown, pdf text extractor, pdf parser api, convert pdf to text, rag document loader, chunking for embeddings, pptx to text, excel to markdown, html to markdown, ocr pdf, scanned pdf to text, llm document ingestion, mcp document tool.