Doc to Markdown for AI Agents — PDF, Word, PowerPoint, Excel avatar

Doc to Markdown for AI Agents — PDF, Word, PowerPoint, Excel

Pricing

from $5.00 / 1,000 document converteds

Go to Apify Store
Doc to Markdown for AI Agents — PDF, Word, PowerPoint, Excel

Doc to Markdown for AI Agents — PDF, Word, PowerPoint, Excel

Convert PDF, DOCX, PPTX, XLSX and HTML links into clean, LLM-ready Markdown with tables preserved, metadata and RAG-ready chunks. Predictable JSON, scanned-PDF detection, and failed files are never charged. Built for AI agents, MCP and RAG.

Pricing

from $5.00 / 1,000 document converteds

Rating

0.0

(0)

Developer

Curtis Still

Curtis Still

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 hours ago

Last modified

Share

Doc to Markdown for AI Agents — PDF, Word, PowerPoint & Excel to clean Markdown

By SourceWire — clean, agent-ready data tools.

Turn any public PDF, DOCX, PPTX, XLSX/XLS, HTML, CSV or TXT link into clean, LLM-ready Markdown — with tables preserved, document metadata, and RAG-ready chunks in one predictable JSON record per file. Built for AI agents, RAG pipelines and LLM apps that need the content of a document, not a pile of broken text.

You only pay for documents that convert. Bad links, files that are too large, unsupported formats, password-protected files and scanned PDFs without a text layer are reported with a clear error code — and are never charged.

Why use it

  • Tables that stay tables. Ruled tables and borderless "booktabs" tables (research papers, financial reports) are rebuilt as GitHub-flavoured Markdown tables. Excel sheets keep multi-row headers, and Word tables keep their header row.
  • Correct reading order. Multi-column PDFs (papers, brochures, IRS publications) are read column by column, not line-interleaved. Running headers, footers, crop marks and rotated side stamps are removed.
  • Real headings. Font-size analysis turns PDF titles into #/##/### headings, so chunks carry a meaningful headingPath.
  • RAG chunks built in. Heading-aware chunks of a size you pick (default ~512 tokens, 50 overlap). Tables are never cut mid-row; long tables are split by rows with the header repeated. Every chunk has page, headingPath, tokenEstimate.
  • One predictable schema. The same fields for every format and every outcome: status, errorCode, title, pageCount, wordCount, estimatedTokens, tableCount, markdown, chunks. No guessing in your agent code.
  • Reliable at scale. Each document is parsed in an isolated process with a timeout, so one broken file can't stall or crash your run. File size is checked before download completes.
  • Share links just work. Google Docs / Sheets / Slides, Google Drive, Dropbox and GitHub file links are converted to direct downloads automatically (the file must be shared publicly).
  • Private by design. Files are processed in memory/temp storage for the run and deleted right after conversion.

Use cases

  • RAG ingestion: feed PDFs, manuals, policies and slide decks straight into a vector database using the chunks array.
  • AI agents & MCP tools: give Claude, ChatGPT, Cursor or your own agent a "read this document" tool that returns compact Markdown instead of raw bytes.
  • Spreadsheet-to-LLM: convert Excel reports into Markdown tables an LLM can actually reason over.
  • Research & due diligence: turn filings, papers and reports into searchable text with page numbers for citations (includePages).
  • Knowledge-base migration: bulk-convert Word and PowerPoint libraries into Markdown for docs sites, wikis or Notion-style tools.
  • Change monitoring: use sha256 to skip documents that haven't changed since the last run.

Supported formats

FormatWhat you get
PDF (text-based)Headings, paragraphs in reading order, ruled + borderless tables, per-page output, metadata
Word (.docx)Headings, lists, bold/italic, links, tables, metadata, page count
PowerPoint (.pptx)One section per slide (## Slide N), text, tables, speaker notes
Excel (.xlsx, .xls)One Markdown table per sheet with merged multi-row headers, title/notes rows kept as text
HTML pagesMain content only (navigation, menus, footers and scripts removed), absolute links
CSV, TXT, MarkdownClean Markdown / Markdown table

Scanned PDFs (images only) are detected and returned with status: "needs_ocr" — not charged. Partly scanned PDFs are converted and the image-only pages are listed in scannedPages.

Input

FieldDefaultDescription
urls—List of public document links (required)
chunkStrategysizesize (heading-aware, recommended), section, page or none
chunkSize512Target chunk size in estimated tokens
chunkOverlap50Overlap between size chunks (never inside tables)
includeMarkdowntrueReturn the full document Markdown
includePagesfalseAlso return Markdown per PDF page / slide / sheet
detectTablestrueRebuild PDF tables as Markdown tables
saveMarkdownFilefalseAlso save a .md file and return its link
maxPages500Max pages converted per PDF
maxFileSizeMb50Larger files are rejected (not charged)
maxDocuments100Max URLs per run
timeoutSecs180Per-document conversion timeout
maxConcurrency2Documents converted in parallel
{
"urls": [
"https://www.irs.gov/pub/irs-pdf/fw9.pdf",
"https://docs.google.com/document/d/YOUR_PUBLIC_DOC_ID/edit"
],
"chunkStrategy": "size",
"chunkSize": 512,
"chunkOverlap": 50
}

Output

One dataset item per URL:

{
"url": "https://www.irs.gov/pub/irs-pdf/fw9.pdf",
"status": "ok",
"success": true,
"errorCode": null,
"format": "pdf",
"title": "Form W-9 (Rev. March 2024)",
"pageCount": 6,
"pagesConverted": 6,
"pageLabel": "page",
"wordCount": 6370,
"estimatedTokens": 9491,
"tableCount": 2,
"markdown": "# W-9\n\n# Request for Taxpayer\n\n...",
"chunks": [
{
"index": 0,
"text": "# W-9\n\n# Request for Taxpayer ...",
"page": 1,
"pageEnd": 1,
"headingPath": "W-9 > Request for Taxpayer",
"hasTable": false,
"charCount": 1890,
"tokenEstimate": 472
}
],
"scannedPages": [],
"warnings": [],
"charged": true,
"billedUnits": 1
}

Failed items use the same shape with status: "error" (or needs_ocr), an errorCode such as NOT_FOUND, ACCESS_DENIED, FILE_TOO_LARGE, UNSUPPORTED_FORMAT, ENCRYPTED_PDF, SCANNED_PDF or TIMEOUT, a readable errorMessage, and charged: false.

Very large documents that don't fit in one dataset item are saved as a .md file in the run's key-value store and returned as markdownUrl.

Pricing

Pay per event — document-converted: one event per successfully converted document. Long documents count one extra event per additional 50 PDF pages or slides (or per 25,000 words for other formats), so a 10-page PDF is 1 event and a 120-page PDF is 3. Failed, scanned and skipped documents are free. Set a maximum cost per run in the Console and the Actor stops cleanly when it's reached.

For AI agents (MCP)

Use this Actor as a tool in any MCP client (Claude Desktop, Cursor, VS Code, ChatGPT connectors and others) through the Apify MCP server:

https://mcp.apify.com/?actors=SourceWire/doc-to-markdown

Tips for agents:

  • Pass one or more urls; read markdown for a quick answer or chunks for retrieval.
  • Check status first: ok, error (see errorCode), or needs_ocr.
  • Use estimatedTokens to decide whether to summarise or chunk before putting the document in context.
  • Use chunkStrategy: "none" and includeMarkdown: true for the smallest response.

You can also call it from code with the Apify API or client libraries (Python, JavaScript) and from Make, Zapier, n8n and LangChain/LlamaIndex Apify integrations.

Privacy

Only the URLs you submit are downloaded. Files are kept in temporary storage for the duration of the conversion and deleted immediately after. Private or internal network addresses are blocked. The Actor does not log in to any site — links must be publicly accessible.

Limitations

  • No OCR: image-only (scanned) PDF pages are detected and flagged, not read.
  • Legacy binary .doc and .ppt files and password-protected files are not supported — re-save as .docx / .pptx.
  • Charts and images are not described; images are dropped (alt text is kept for HTML/Word where available).
  • Very complex PDF tables (nested headers, cells spanning many rows) may need light clean-up.
  • Pages behind logins, paywalls or bot protection can't be fetched.

SourceWire builds focused, reliable data tools for AI agents and automation. Questions or a format that doesn't convert well? Open an issue on the Actor's Issues tab — we read every one.