PDF to Markdown & Office File Converter avatar

PDF to Markdown & Office File Converter

Pricing

Pay per event

Go to Apify Store
PDF to Markdown & Office File Converter

PDF to Markdown & Office File Converter

Convert PDF, DOCX, PPTX, XLSX, CSV, EPUB and HTML URLs to Markdown and tables. Supports text-based PDFs; no OCR. Pay per page, slide, sheet or text unit.

Pricing

Pay per event

Rating

0.0

(0)

Developer

mia.cx

mia.cx

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

19 hours ago

Last modified

Categories

Share

Give your agent a document's text and tables as Markdown, with one result row per file. Send public URLs of PDF, DOCX, PPTX, XLSX, CSV, EPUB or HTML files, or send the file content as base64. PDFs need a text layer; no OCR runs. Conversion costs $0.0009 per Page unit, plus $0.00005 per run start at default memory.

Try it

Paste this input into the Actor to convert a one-page PDF:

{"urls": ["https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"]}

An empty input {} runs the same one-page PDF example. No upstream API key is needed.

Use from an agent

Add https://mcp.apify.com?tools=miacx/pdf-to-markdown-office-converter to your MCP client and sign in to Apify. Call the dedicated Actor tool with the input above, then use get-dataset-items to read the completed run's dataset. Or set APIFY_TOKEN to your Apify API token and call the API, which returns JSON rows:

curl --fail-with-body 'https://api.apify.com/v2/actors/miacx~pdf-to-markdown-office-converter/run-sync-get-dataset-items' \
-H "Authorization: Bearer $APIFY_TOKEN" -H 'Content-Type: application/json' \
-d '{"urls":["https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"]}'

For an email attachment, SharePoint download or local file, send the content in files instead of a URL. The name becomes the row's input, so keep names unique within a run:

jq -n --arg b64 "$(base64 -w0 report.pdf)" '{files: [{name: "report.pdf", contentBase64: $b64}]}' |
curl --fail-with-body 'https://api.apify.com/v2/actors/miacx~pdf-to-markdown-office-converter/run-sync-get-dataset-items' \
-H "Authorization: Bearer $APIFY_TOKEN" -H 'Content-Type: application/json' -d @-

What you get

Read status first. On ok, use markdown and tables; on needs_ocr, send the PDF to an OCR tool. The dataset contains one row per unique canonical file URL, then one row per inline file. Repeated URLs, including fragment variants, share one conversion.

This output comes from the recorded fixture test/fixtures/dummy.pdf. The timestamp is illustrative.

{
"status": "ok",
"input": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
"source": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
"fetchedAt": "2026-10-31T00:00:00.000Z",
"title": "dummy.pdf",
"format": "pdf",
"pageCount": 1,
"markdown": "## Page 1\n\nDummy PDF file",
"tables": [],
"billablePages": 1,
"textlessPages": [],
"reason": null
}

input is the canonical URL, or the name of an inline file. source is the final URL after redirects, the input URL if fetching fails, or the inline file name. fetchedAt is the fetch time, retained on cache hits, or the time an inline file was read; failures use the attempt time. title, format and pageCount can be null when unknown. reason is null on success.

pageCount counts original PDF pages, slides or sheets before selection. Other formats use 3,000-character units. billablePages counts charged Page events. textlessPages lists selected PDF pages without extracted text, including blank pages. markdown contains text and tables in document order. It is empty on failure.

tables contains source, zero-based index, headers and rows. It is empty when no tables are extracted.

Table locations use a one-based page, one-based slide, or worksheet name in sheet. Formats without pagination use an empty location object. The first source row supplies the headers. Empty cells and merged continuation cells remain empty strings.

Input

FieldDefaultAccepted input
urlsThe example PDF URL, unless files is setUp to 10 public HTTP(S) file URLs. An empty list returns no_results.
files[]Up to 10 {"name", "contentBase64"} objects with unique names. The extension identifies CSV and other formats without a signature.
pageRange"", all unitsOne-based PDF pages, PPTX slides or XLSX sheets, such as "1-3,5". Values must be within 1–50.

URLs and inline files share the limit of 10 per run. Selected units stay in document order. A range on DOCX, CSV, EPUB or HTML returns invalid_page_range.

Pricing

A Page costs $0.0009. It counts one selected text-bearing PDF page, PPTX slide or XLSX sheet. For DOCX, EPUB, HTML and CSV, each started 3,000 Markdown characters counts as one Page.

A three-page text PDF costs $0.00275, including the $0.00005 run start at default 256 MB memory. One thousand Page events cost $0.90, plus $0.00005 per run start at default memory.

Text-unit counts include Markdown tables and delimiters. One document can incur several Page events. Failed conversions and textless PDF pages incur no Page events. Duplicate canonical URLs incur no additional Page events within a run. Cached conversions still incur Page events. The $0.00005 run start applies even with no billable Pages at default memory.

Limits and data freshness

  • Each file must fit 4 MiB, decoded for inline files, and 50 PDF pages, PPTX slides or XLSX sheets, even with a smaller range.
  • Office/EPUB ZIPs allow 12 MiB declared expansion and 1,000 entries. EPUBs allow 200 spine entries.
  • Output caps are 500,000 Markdown characters per document and 50,000 cells per table.
  • Legacy DOC, PPT and XLS files and encrypted documents are unsupported. HTML conversion neither crawls links nor renders scripts.
  • PDF tables need aligned text; ambiguous layouts remain text. XLSX uses stored formula results and serial dates. Styling is lost.

Eligible downloads up to 256 KiB can be reused for one hour from the named store file-to-markdown-cache-v1. Cache hits keep their original fetchedAt value. Cache expiry controls reuse; stored records remain until overwritten or deleted.

If a row fails

StatusNext step
needs_ocrUse an OCR tool. None of the selected PDF pages yielded text.
too_largeSupply a smaller document. A page range does not bypass whole-file limits.
invalid_page_rangeCheck the range and format. Use ranges only for PDF, PPTX or XLSX.
unsupported_formatSupply one of the seven supported formats.
http_error, fetch_error, rate_limitedCheck public access and the returned reason.
invalid_inputFor an inline file, send standard padded base64. Otherwise fix the input the reason names.
budget_exceededRaise the run budget or reduce the requested work. Processing stops at this document.

A mixed PDF can return ok while listing skipped pages in textlessPages. Input with no URLs or files returns no_results. Other failed rows carry a reason, empty content and zero billablePages.