PDF to Markdown: DOCX, PPTX, XLSX, OCR & RAG Chunks avatar

PDF to Markdown: DOCX, PPTX, XLSX, OCR & RAG Chunks

Pricing

from $5.00 / 1,000 document processeds

Go to Apify Store
PDF to Markdown: DOCX, PPTX, XLSX, OCR & RAG Chunks

PDF to Markdown: DOCX, PPTX, XLSX, OCR & RAG Chunks

Convert PDF, DOCX, PPTX, XLSX, and HTML to clean Markdown that preserves tables and headings. Optional Tesseract OCR for scanned pages and heading-aware RAG chunks with source, page, and section metadata.

Pricing

from $5.00 / 1,000 document processeds

Rating

0.0

(0)

Developer

Sunburst

Sunburst

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

16 hours ago

Last modified

Share

Convert PDF, DOCX, PPTX, XLSX and HTML files into clean Markdown and heading-aware RAG chunks, with optional OCR for scanned PDFs. The output is GitHub-flavored Markdown with headings, pipe tables and page markers kept, and each chunk is tagged with source, page and section, ready for an embedding model or vector store. OCR uses Tesseract (English only) and is off by default. Conversion runs inside the Actor on open-source libraries, with no paid parsing APIs. You pay per successful document, and failed documents are free.

Features

  • Formats: PDF, DOCX, PPTX, XLSX, HTML, plus PNG/JPEG/TIFF/WebP when OCR is on
  • Sources: URL list, Console file upload, or an existing Apify key-value store
  • Tables and headings as | pipe tables and ATX # headings
  • Page markers in the Markdown (<!-- page:3 -->) so you can cite a page
  • Quality modes
    • auto (default) — MarkItDown for office/HTML, PyMuPDF for born-digital PDFs
    • fast — the same Fast converters
    • accurate — Docling layout and table reconstruction if Docling is installed in the image. This Store build does not include Docling, so Accurate falls back to Fast and still returns Markdown
  • OCR off by default. English only (eng)
  • RAG chunking — configurable size / overlap, heading-aware, tables kept whole
  • Per-document errors — one corrupt file does not fail the run
  • Size, page, and timeout caps so a huge upload cannot blow the run

What’s new in 1.1.0

Titles come from PDF metadata or the first real heading, never a page marker like <!-- page:1 -->. PDF tables keep multi-level headers and colspans (no more BL|EU splits). Math decimals such as 0 _._ 1 are cleaned to 0.1.

Input

Provide at least one of: document URLs, uploaded files, or a key-value store.

FieldDefaultWhat it does
startUrls(prefilled example PDF)HTTP(S) links to documents or HTML pages
files—Console file upload (PDF / Office / HTML)
keyValueStoreId + keyValueStoreKeys—Read records from an existing store. Empty keys = every supported record
qualityautoauto / fast / accurate (Accurate falls back to Fast on this build)
enableOcrfalseTesseract on pages with no text layer
ocrLanguageengEnglish only on this build
enableChunkingtrueBuild RAG chunks
chunkSize1000Target characters per chunk
chunkOverlap150Overlap between windows
headingAwaretrueSplit on heading changes; store heading path as section
pushChunksAsItemsfalseAlso emit one dataset row per chunk
saveMarkdownToKvstrueWrite document-*.md files to the default key-value store
maxFileSizeMb50Skip oversized files
maxPages100PDF pages / PPTX slides / XLSX sheets
timeoutSeconds300Per-document timeout
maxDocuments50Cap sources in input order

Example input

{
"startUrls": [
{ "url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" },
{ "url": "https://example.com" }
],
"quality": "auto",
"enableOcr": false,
"enableChunking": true,
"chunkSize": 1000,
"chunkOverlap": 150
}

Output

Each document becomes one dataset item. Failed files become status: "error" rows with an error message; the run continues.

{
"type": "document",
"status": "success",
"source": "https://example.com/report.pdf",
"sourceType": "url",
"format": "pdf",
"title": "Annual Report",
"markdown": "<!-- page:1 -->\n\n# Annual Report\n\n| Metric | 2025 |\n| --- | --- |\n| Revenue | 14 |\n",
"markdownKey": "document-report-1.md",
"pageCount": 12,
"ocrPages": 0,
"converter": "pymupdf4llm",
"chunkCount": 8,
"chunks": [
{
"text": "# Annual Report\n\n...",
"source": "https://example.com/report.pdf",
"page": 1,
"section": "Annual Report > Financials",
"chunkIndex": 0,
"startChar": 0,
"endChar": 980
}
]
}

When saveMarkdownToKvs is on, the same Markdown is also a downloadable key-value store record.

Pricing (pay-per-event)

Users pay only for these events — not extra platform usage on top.

EventWhen it firesPrice
document-processedOnce per successful document (up to 10 pages)$0.005
extra-pageEach page after the first 10$0.001
ocr-pageEach page that actually ran OCR$0.008

Failed documents are free.

Examples:

  • 8-page DOCX, no OCR → $0.005
  • 24-page PDF, no OCR → $0.005 + 14 × $0.001 = $0.019
  • 12-page scanned PDF, all pages OCR’d → $0.005 + 2 × $0.001 + 12 × $0.008 = $0.103

Default run memory is 2048 MB. For OCR on many pages, raise the run to 4096 MB.

How it works

  1. Download each source (URL, upload, or key-value store) with a streaming size cap.
  2. Detect format from extension / Content-Type.
  3. Convert:
    • Office & HTML → MarkItDown (HTML first goes through readability)
    • Born-digital PDF → PyMuPDF (Markdown tables, page markers)
    • Scanned PDF / image → Tesseract OCR when enableOcr is on (English)
    • quality=accurate → Docling when present, otherwise the Fast path above
  4. Optionally chunk on headings, keeping pipe tables atomic.
  5. Charge the events above, push the dataset row, save the .md file.

Limits

  • Default 50 MB / 100 pages / 180 s / 50 documents per run — raise in input if you need more
  • .doc / .ppt / .xls (legacy binary) are best-effort; prefer OOXML
  • OCR is English only
  • Accurate/Docling is not in this Store image; the Fast converter is used instead
  • This Actor does not call Unstructured, Azure Document Intelligence, or any other paid parser

More actors from this developer

License

MIT. Third-party libraries keep their own licenses (MIT MarkItDown, Apache-2.0 PyMuPDF, Apache-2.0 Tesseract).