Document to Markdown: PDF, Word, Excel & OCR for RAG avatar

Document to Markdown: PDF, Word, Excel & OCR for RAG

Pricing

from $3.00 / 1,000 document converteds

Go to Apify Store
Document to Markdown: PDF, Word, Excel & OCR for RAG

Document to Markdown: PDF, Word, Excel & OCR for RAG

Convert PDF, DOCX, PPTX, XLSX, HTML, EPUB and images to clean Markdown for LLMs and RAG. Scanned PDFs and photos are OCR'd automatically (image to text, PDF to text), and output can be split into chunks. Failed files are never charged.

Pricing

from $3.00 / 1,000 document converteds

Rating

0.0

(0)

Developer

VINFlow

VINFlow

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

6 days ago

Last modified

Share

Document to Markdown — PDF, Word, PowerPoint, Excel & OCR for RAG

Convert documents into clean Markdown that LLMs, RAG pipelines and AI agents can read. Give it links to the files; it returns one dataset item per file with the Markdown text and, if you ask, ready-made chunks.

What it handles

InputHow it is converted
PDF with a text layerText extracted page by page, hard-wrapped lines rejoined into paragraphs, hyphenated words repaired
Scanned PDFPages with no text layer are OCR'd automatically. A mixed PDF only pays OCR on the scanned pages
Word (DOCX)Headings, lists, tables, bold and italic preserved
PowerPoint (PPTX)One section per slide, including notes and tables
Excel (XLSX, XLS), CSVOne Markdown table per sheet
Images (PNG, JPG, TIFF, WebP, GIF, BMP)OCR, including multi-page TIFF
HTML, EPUB, JSON, XML, Outlook MSGConverted to Markdown

OCR languages: English, French, German, Spanish, Portuguese, Italian, Dutch, Simplified Chinese and Japanese. Combine them like eng+fra.

Input

{
"sources": [
{ "url": "https://arxiv.org/pdf/1706.03762" },
{ "url": "https://example.com/contract-scan.pdf" }
],
"ocrMode": "auto",
"ocrLanguages": "eng",
"chunkSize": 2000,
"chunkOverlap": 200
}
  • ocrMode: auto (default) OCRs only pages that have no text. always OCRs every page, which helps when a PDF's text layer is garbled. never skips OCR.
  • chunkSize: set it above 0 to also get a chunks array, split at headings and paragraphs. Each heading stays attached to the text under it.
  • To convert files on your computer, upload them to an Apify key-value store or any file host and pass the links.

Output

{
"url": "https://arxiv.org/pdf/1706.03762",
"success": true,
"fileName": "1706.03762",
"fileType": "pdf",
"pages": 15,
"ocrPages": 0,
"characters": 39518,
"markdown": "<!-- page 1 -->\n\nAttention Is All You Need ...",
"chunks": ["...", "..."]
}

A file that fails (broken link, too large, password-protected) still gets an item, with success: false and an error message. You are not charged for it.

Pricing

You pay per event:

  • Document converted: one charge per successful file
  • OCR page: one charge per page that needed OCR

Failed files are free. To cap spending, set a maximum cost per run in the run options; the actor stops cleanly when it reaches the cap.

Use with AI agents

The input and output are plain JSON, so it works as a tool for agents through the Apify MCP server, the API, LangChain, LlamaIndex, Make, Zapier or n8n. A typical pipeline is: find documents → convert them with this actor → embed the chunks → store them in a vector database.

Limits

  • Files up to 50 MB by default (maxFileSizeMb raises it to 500 MB)
  • Password-protected PDFs are not supported
  • Layout-heavy PDFs (multi-column magazines, forms) come out as reading-order text, not as a reproduction of the layout