Document to Markdown & JSON API: PDF, DOCX, PPTX, HTML, OCR avatar

Document to Markdown & JSON API: PDF, DOCX, PPTX, HTML, OCR

Pricing

from $2.80 / 1,000 documents converted

Go to Apify Store
Document to Markdown & JSON API: PDF, DOCX, PPTX, HTML, OCR

Document to Markdown & JSON API: PDF, DOCX, PPTX, HTML, OCR

Convert a PDF, Word, PowerPoint, HTML page or scanned image to clean Markdown for LLMs and RAG. Input: document URLs. Output: one JSON row per document with Markdown, tables as JSON, OCR text and ready-to-embed chunks with heading paths and page numbers.

Pricing

from $2.80 / 1,000 documents converted

Rating

0.0

(0)

Developer

Plainprobe

Plainprobe

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

2 hours ago

Last modified

Features

Limited permissions

Share

Turn public PDF, Word, PowerPoint, HTML and image files into clean Markdown and structured JSON that an LLM or a RAG pipeline can use directly: headings, paragraphs, tables as JSON records, correct reading order on two-column papers, built-in OCR for scanned pages, and optional ready-to-embed chunks with their heading path and page range.

Everything runs inside the Actor (no third-party conversion API, no AI model calls): your documents are not sent anywhere else.

Real output: an arXiv PDF converted to Markdown, with a table returned as JSON

Switching from memo23/pdf-text-extractor or automation-lab/pdf-text-extractor? Keep your input and your automation: urls, urlsText, pageRange starting at page 1, firstNPages and maxPages are understood, and each result also carries their field names (text, charCount, fileName; or pdfUrl, fullText, textExtractionStatus). Only the Actor ID changes in n8n, Make or your code.

Price: $4.00 per 1,000 documents (up to 50 pages each) on the free plan (less on paid plans), no start fee; failures are free. memo23/pdf-text-extractor: $5.00 per 1,000 PDFs plus $0.005 per run; automation-lab/pdf-text-extractor: $3.00 per 1,000 PDFs plus $0.005 per run (public Store prices, 4 December 2026).

Launch offer: your first 25 documents are free on every Apify account until 31 January 2027.

For AI agents (MCP)

  • Add it to any MCP client: https://mcp.apify.com/?tools=plainprobe/document-to-markdown
  • Minimal input: {"urls": [{"url": "https://arxiv.org/pdf/1706.03762"}]}. Add "chunking": true to get RAG chunks.
  • Key fields: status (ok / failed), title, markdown, pages[].tables, chunks[].text, chunks[].headings, truncated, error.code, error.retryable.
  • Cost: $0.004 per converted document (first 50 pages included), $0.0001 per extra page, $0.002 per page read with OCR. Failed documents are free.
  • Time: about 1 to 10 s per document (a 15-page paper: about 2 s). Measured batch: 20 PDFs, 502 pages, in 56 s.
  • Limits: up to 1,000 URLs per run, 50 MB per file (configurable), 500 pages per document (configurable). Public URLs only.

What does Document to Markdown do?

FieldTypeMeaning
urlstringThe URL you sent
statusok | failedfailed results are never charged
formatstringDetected from the file content, not the extension: pdf, docx, pptx, html, image
titlestring | nullFrom metadata, or the first large heading when metadata is empty or useless ("untitled", "Microsoft Word - …")
pageCount, pagesConverted, truncatedinteger, integer, booleantruncated: true when maxPages cut the document
wordCount, ocrPagesintegerWords in the Markdown; pages read with OCR
markdownstringThe whole document: #/##/### headings, paragraphs, lists, Markdown tables
pagesarray | nullPer page: page, markdown, tables (records with header and rows), ocr (confidence 0-100, words, error)
chunksarray | nullWhen chunking is on: index, text, word_count, headings (path), page_start, page_end
errorobject | nullcode, message, retryable
durationMs, convertedAtinteger, ISO 8601Processing time and UTC timestamp

What the converter handles for you:

  • Tables: ruled tables and "booktabs" tables (horizontal rules only, as in most papers) become Markdown tables and JSON records, with multi-line headers merged.
  • Reading order: two-column layouts are read column by column; full-width blocks stay in place.
  • Clean text: words split by end-of-line hyphens are rejoined ("pre-trained" is kept when the compound form exists elsewhere), rotated margin stamps are removed, paragraphs are rebuilt from line spacing.
  • Headings: by font size, plus numbered bold section titles ("2.1 Model Architecture").
  • OCR: Tesseract 5, run automatically on pages with no text layer (ocr: "auto"), or on every page (always), or never (off). Languages: English, French, German, Spanish, Italian, Portuguese, Dutch (up to 4 at once).
  • HTML: scripts, styles, forms and hidden elements dropped, links made absolute; htmlMainContentOnly also drops navigation, header, footer and sidebars.
  • Chunks: split on paragraph boundaries; a paragraph that fits is never cut; each chunk carries its heading path and pages, so citations point to the right place.

Runs on Apify: call it from the API or an AI agent (MCP), schedule it, connect it to Make, Zapier or n8n, and export results as JSON, CSV or Excel.

How to use Document to Markdown (start in 30 seconds)

  1. Click Try for free.
  2. Keep the default input (the "Attention Is All You Need" paper on arXiv) or paste the URLs of your own public PDF, DOCX, PPTX, HTML or image files.
  3. Click Start. The Markdown and the tables appear in the Output tab; export them as JSON, CSV or Excel, or copy the markdown field straight into your LLM prompt.
  4. Building a RAG index? Turn on chunking to get ready-to-embed pieces with their heading path and page range.

Use it from your code, an AI agent or a no-code tool

  • API: POST https://api.apify.com/v2/acts/plainprobe~document-to-markdown/run-sync-get-dataset-items?token=<YOUR_TOKEN> with {"urls": [{"url": "https://arxiv.org/pdf/1706.03762"}]} as JSON body; the converted documents come back in the response.
  • AI agents (MCP): add the Apify MCP server (https://mcp.apify.com) to Claude, Cursor or any MCP client; the Actor is callable as a tool (details in the section above).
  • No-code and RAG pipelines: n8n, Make and Zapier have official Apify integrations (Run Actor, then Get dataset items); LangChain and LlamaIndex have Apify loaders that read the dataset directly.

When to use it, and when not

Use it to feed papers, reports, manuals, slide decks, contracts or web pages to an LLM, to build a RAG index, or to extract the tables of a public PDF as JSON.

Do not use it for: files behind a login (only public URLs are fetched), handwriting, complex formulas (they come out as plain text), or pixel-perfect layout reproduction. Charts are not described in words; chart-heavy pages are read for their text only. Password-protected PDFs return ENCRYPTED_PDF.

Input and output example

Input (the one used in the benchmark, per-page output off):

{"urls": [{"url": "https://arxiv.org/pdf/1706.03762"}], "includePages": false}

Output (real run iUFbeVWEdTYjKqCTR, build 0.1.6; markdown shortened):

{
"url": "https://arxiv.org/pdf/1706.03762",
"status": "ok",
"format": "pdf",
"title": "Attention Is All You Need",
"pageCount": 15,
"pagesConverted": 15,
"truncated": false,
"wordCount": 6383,
"ocrPages": 0,
"markdown": "Provided proper attribution is provided, Google hereby grants permission to\nreproduce the tables and figures in this paper solely for use in journalis…",
"pages": null,
"chunks": null,
"error": null,
"durationMs": 2126,
"convertedAt": "2026-12-01T09:47:45Z"
}

With includePages (default on), each pages[] item is {"page", "markdown", "tables": [{"header": [...], "rows": [{"<header>": "<cell>", ...}]}], "ocr"}. With chunking: true, each chunks[] item is {"index", "text", "word_count", "headings": [...], "page_start", "page_end"}.

Input

FieldDefaultWhat it does
urlsrequiredPublic URLs of PDF, DOCX, PPTX, HTML or image files (PNG, JPEG, TIFF, WebP), up to 1,000 per run.
ocr, ocrLanguagesauto, ["eng"]auto runs OCR only on scanned pages without a text layer; up to 4 languages.
maxPages500Longer documents are cut and marked truncated: true (max 500).
maxFileSizeMb50Larger files return FILE_TOO_LARGE, not billed (max 100).
chunking, chunkMaxWords, chunkOverlapWordsoff, 300, 40RAG chunks split on paragraph boundaries, with heading path and page range.
includePagestruePer-page Markdown, tables as JSON and OCR confidence.
htmlMainContentOnlyoffDrop navigation, header, footer and sidebars from HTML pages.

Limits

  • 1,000 files per run, 500 pages and 100 MB per file at most; one bad file never stops the batch.
  • Runs use 8 GB of memory by default (2 CPUs, pages converted in parallel); see the FAQ to lower it.
  • Only public http(s) URLs; private and internal addresses are refused. No password-protected files.

Errors

Errors are per document: one bad URL never stops the batch. Failed documents are not charged.

CodeMeaningWhat to do
INVALID_URLNot an http(s) URLFix the URL
UNSAFE_URLPoints to a private or internal addressUse a public URL
DOWNLOAD_FAILEDThe server answered with an error (retryable tells you if a retry may help)Check the URL in a browser
FILE_TOO_LARGEBigger than maxFileSizeMbRaise the limit (memory permitting)
TIMEOUTDownload or conversion took too longRetry; split very large files
UNSUPPORTED_FORMATNot a PDF, DOCX, PPTX, HTML or image fileConvert the file first
INVALID_DOCUMENT / INVALID_PDFDamaged or unreadable file—
ENCRYPTED_PDFPassword-protected PDFNot supported
INVALID_LANGUAGEOCR language not in the listUse eng, fra, deu, spa, ita, por, nld
OCR_TIMEOUT / OCR_FAILEDOne page could not be read by OCRThe rest of the document is still returned

Benchmarks

Measured on 2026-12-01 with the same 20 public PDFs (502 pages: research papers, government forms, manuals). Raw data and script: benchmarks/.

Plainprobe Document to Markdownmemo23/pdf-text-extractor
Documents converted20/2020/20
Tables returned as Markdown / JSON1180
Text recovered on two-column papers (LLaMA-2)47.4k words42.6k words
Words extractedwithin ±5 %within ±5 %
Run time for 20 PDFs56 s (8 GB)14 s
Price for these 20 PDFs$0.08 + start fee$0.105

memo23 is faster because it extracts plain text only, without table detection or layout analysis. If you only need raw text and speed matters more than structure, it is a good choice.

How much does it cost to convert documents to Markdown?

Launch offer: the first 25 documents of each Apify account are free until 31 January 2027 (the count is kept in a small key-value store named document-to-markdown-launch-offer in your own account; if the Actor cannot open it, the normal price applies).

Free to try: the Apify free plan includes $5 of platform credit every month, enough for about 1,000 text documents (in batches) with this Actor.

Pay per event:

  • $0.004 per document converted (status ok), first 50 pages included;
  • $0.0001 per page beyond 50;
  • $0.002 per page read with OCR (scanned pages and images only);
  • plus Apify's start fee ($0.00005 per GB of memory, so $0.0004 at the default 8 GB).

Failed documents are free. A 30-page text PDF costs $0.004; a 200-page manual $0.019; a 10-page scan $0.024.

Privacy and licences

Files are downloaded, converted in memory and not kept after the run, except the results in your own dataset. Author names from document metadata are never returned. Make sure you have the right to process the documents you send. Built with pdfplumber (MIT), pypdfium2 (Apache-2.0/BSD), python-docx (MIT), python-pptx (MIT) and Tesseract (Apache-2.0).

FAQ, disclaimers and support

Does it use an AI model? No. Conversion is deterministic: the same file gives the same output, and nothing is sent to an LLM provider.

Why 8 GB of memory by default? Pages are converted in parallel processes and Apify gives 1 CPU per 4 GB. At 8 GB our 20-PDF batch took 56 s instead of 119 s at 4 GB, for about 17 % more compute. At 1 GB (a quarter of a CPU) a 15-page paper took 55 s instead of 5 s. Lower it if you convert a few small files and are not in a hurry.

Can I send local files? Upload them to any public storage (for example an Apify key-value store record with a public URL) and pass that URL.

Is this affiliated with arXiv, Microsoft or Tesseract? No. Plainprobe is independent.

Disclaimer. Conversion is automatic and deterministic; check key figures and tables against the original document before any legal or financial use. Plainprobe is independent and not affiliated with the publishers of the files you convert.

Support. Found a wrong result or need a field? Open an issue in the Issues tab: we read issues every day.

Switching from another Actor

Send the input you already use with memo23/pdf-text-extractor or automation-lab/pdf-text-extractor: urls, urlsText, pageRange starting at page 1, firstNPages and maxPages are understood, and each result also carries their field names (text, charCount, fileName; or pdfUrl, fullText, textExtractionStatus). The field outputFormat (default auto) picks the compatible output from the field names you send; set it to plainprobe to get only our own fields.

Public reliability of those Actors (Apify API publicActorRunStats30Days, 4 December 2026, runs that failed, timed out or were aborted): memo23/pdf-text-extractor 0.1 % of 21,405 runs, automation-lab/pdf-text-extractor 0.6 % of 1,465 runs.

Like it?

If this Actor saves you time, a short rating on its Reviews tab helps other users find it. Something missing or wrong? Open an issue on the Issues tab: it is answered and fixed quickly.

More from Plainprobe

Step-by-step guides: PDF to Markdown for LLMs, convert DOCX to Markdown, convert HTML to Markdown.

Other Plainprobe tools (company records from official registers, website screenshots and visual monitoring, SEO and AI readiness audits) and how to call them from an AI agent: plainprobe.github.io.