MarkItDown File to Markdown Converter
Pricing
from $0.02 / actor start
MarkItDown File to Markdown Converter
Convert PDF, Word (DOCX), Excel, PowerPoint, HTML and more to clean Markdown with Microsoft MarkItDown. Built for LLM ingestion, RAG pipelines, and bulk document preprocessing — no local install.
Pricing
from $0.02 / actor start
Rating
0.0
(0)
Developer
DataFusionX
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
8 days ago
Last modified
Categories
Share
Convert PDF, DOCX, PPTX, XLSX, HTML and more to clean Markdown using Microsoft MarkItDown. Built for LLM ingestion, RAG pipelines, and bulk document preprocessing on Apify — no local install.
What does this Actor do?
This Actor wraps Microsoft MarkItDown (the open-source tool behind high-volume searches for markitdown, markitdown github, microsoft markitdown) into a production API on Apify.
You pass file URLs (or document links). The Actor:
- Downloads each file safely
- Converts it to structured Markdown (headings, lists, tables, links)
- Optionally cleans HTML docs (nav/sidebar removed)
- Pushes results to the dataset and optionally stores full
.mdin the key-value store
Perfect when you need PDF to Markdown, DOCX to Markdown, or Office → Markdown for AI systems.
Why Markdown for LLMs and RAG?
- LLMs understand Markdown natively and use fewer tokens than raw HTML/PDF text
- Headings and tables improve chunking and retrieval quality
- One format for mixed corpora (PDF + Word + slides + sheets)
Use this Actor as the preprocessing step before embeddings, vector DBs, Copilot grounding, or agent tools.
Supported formats
| Type | Formats |
|---|---|
| Documents | PDF, Word (DOCX), PowerPoint (PPTX), Excel (XLSX/XLS) |
| Web | HTML (with optional main-content cleanup) |
| Data | CSV, JSON, XML, TXT |
| Media | Images (metadata / optional LLM captions), audio (transcription extras via MarkItDown) |
| Other | EPUB, ZIP (iterates contents), YouTube URLs (via MarkItDown) |
Powered by Microsoft MarkItDown — the same library used widely for LLM and RAG document pipelines.
Input
| Field | Type | Description |
|---|---|---|
fileUrls | array of strings | HTTP(S) URLs of files or pages to convert |
maxFileSizeMb | integer | Max download size (default 50) |
cleanHtml | boolean | Extract main article from HTML; drop nav/sidebar (default true) |
enableImageCaptions | boolean | Optional LLM captions for images/slides |
openaiApiKey | secret string | Only if image captions are enabled |
llmModel | string | e.g. gpt-4o |
storeMarkdownInKeyValue | boolean | Also save full Markdown in KV store |
Example input
{"fileUrls": ["https://example.com/report.pdf","https://example.com/policy.docx","https://docs.example.com/guide"],"maxFileSizeMb": 50,"cleanHtml": true,"storeMarkdownInKeyValue": true}
Output
One dataset row per file:
{"type": "document","ok": true,"sourceUrl": "https://example.com/report.pdf","fileName": "report.pdf","format": "pdf","contentType": "application/pdf","title": "Q3 Report","markdown": "# Q3 Report\n\n...","charCount": 15230,"error": null,"scrapedAt": "2026-08-29T14:00:00+00:00"}
markdown— clean Markdown ready for RAG / LLM context- Key-value (optional) — full
.mdunder keys likemarkdown-0-report.pdf
Primary use cases
| Use case | How this Actor helps |
|---|---|
| RAG preprocessing | PDF / DOCX / PPTX → Markdown → chunk → embed |
| LLM context / prompts | Feed models structured text instead of binary files |
| AI agents | Tool step: “given URL, return Markdown” |
| Knowledge bases | Bulk convert SharePoint / Drive style links to MD |
| Docs migration | HTML or Office → Markdown for docs-as-code |
| MarkItDown without ops | Same Microsoft MarkItDown quality, hosted on Apify |
How it works (technical)
- Downloads each URL to a temporary file (size-capped)
- For HTML: extracts main content (e.g. article /
theme-doc-markdown), strips chrome - Runs MarkItDown
convert_local()only (safe; no arbitrary remote convert) - Normalizes Markdown (code fences, relative links, noise lines, base64 image strip)
- Charges PPE event
file-convertedon success
Security-minded: user URLs are not passed into a permissive multi-source convert(); files are fetched then converted locally.
Pricing (PPE)
| Event | When |
|---|---|
file-converted | Each successful file conversion |
Failed downloads or conversions are not charged. Configure price per event in Apify Console.
FAQ
Is this the official Microsoft product?
No. It uses the open-source Microsoft MarkItDown library (MIT) packaged as an Apify Actor for batch API use.
PDF to Markdown quality?
Strong on digital text PDFs and Office files. Scanned or complex layout PDFs may need OCR / Azure options later; HTML pages benefit from cleanHtml.
DOCX / PPTX / XLSX to Markdown?
Yes — core MarkItDown converters for Word, PowerPoint, and Excel.
Can I use it for RAG and LLM pipelines?
Yes. That is the main design goal: structured Markdown for retrieval and model context.
MarkItDown MCP?
This Actor is the HTTP/batch equivalent for pipelines and automation (Make, n8n, LangChain, custom agents). For local MCP, see Microsoft’s markitdown-mcp package; for cloud batch conversion, use this Actor.
File size limits?
Controlled by maxFileSizeMb (default 50). Raise memory for very large PDFs.
Keywords
MarkItDown · Microsoft MarkItDown · markitdown github · PDF to Markdown · DOCX to Markdown · PPTX to Markdown · Excel to Markdown · HTML to Markdown · LLM preprocessing · RAG document converter · MarkItDown MCP alternative (batch) · Office to Markdown · AI document ingestion