Document to Markdown & Text: PDF, OCR, Word, PowerPoint avatar

Document to Markdown & Text: PDF, OCR, Word, PowerPoint

Pricing

from $4.00 / 1,000 document converteds

Go to Apify Store
Document to Markdown & Text: PDF, OCR, Word, PowerPoint

Document to Markdown & Text: PDF, OCR, Word, PowerPoint

Convert PDFs, scans, images, DOCX, PPTX, XLSX and HTML to clean Markdown and text for LLMs and RAG. Tables become Markdown tables; scanned pages are read with Tesseract OCR (24 languages). $0.004 per document, $0.002 per OCR page or image; failed files free.

Pricing

from $4.00 / 1,000 document converteds

Rating

0.0

(0)

Developer

Webstack Labs

Webstack Labs

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Security

Limited permissions

Share

Turn PDFs, scanned pages, images, Word, PowerPoint, Excel and HTML files into clean Markdown and plain text that you can feed straight into an LLM, a RAG pipeline or a search index. Tables come out as Markdown tables, and pages without a text layer (scans, photos of documents) are read with Tesseract OCR in 24 languages (image to text OCR for photos, screenshots and scans). One row per file, failed files are free.

What it does

  • PDF with a text layer: extracts the text page by page (pypdfium2) and detects tables (pdfplumber), which are returned as Markdown tables in reading order.
  • Scanned PDF pages and images (PNG, JPEG, TIFF incl. multi-page, WebP, BMP, GIF): OCR with Tesseract, with a confidence score per page. In auto mode only the pages that need it are OCR'd, so you never pay OCR for a page that already has text.
  • Word (DOCX): headings (#), lists (-), paragraphs and tables in document order.
  • PowerPoint (PPTX): one ## Slide N: title section per slide, bullet points, tables, speaker notes.
  • Excel (XLSX): one Markdown table per sheet (cell values, not formulas).
  • HTML, CSV, TXT, Markdown: main content to Markdown (scripts, menus and forms removed), CSV to a table.
  • Every result is also saved as a .md file in the run's key-value store (markdownUrl).

Everything runs inside the Actor on Apify: your files are not sent to any third-party AI or OCR API.

Who uses it

  • Developers building RAG / chatbots / AI agents that need documents as Markdown chunks.
  • Teams digitising scans, invoices, receipts and forms (text only; no field extraction).
  • Automations in Make, n8n, Zapier or LangChain that receive files as links.

Input

{
"fileUrls": [
"https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
"https://example.com/scanned-contract.pdf",
"https://example.com/slides.pptx"
],
"ocr": "auto",
"ocrLanguages": ["eng", "deu"],
"pageRange": "1-20"
}
FieldDefaultWhat it does
fileUrls–Direct links to the files. Empty: a free 2-page sample PDF is converted.
ocrautoauto: OCR only pages without a text layer, and images. always: OCR every PDF page. never: no OCR.
ocrLanguages["eng"]1–4 languages: eng, deu, fra, spa, ita, por, nld, pol, rus, ukr, tur, jpn, chi_sim, chi_tra, kor, ara, hin, vie, ind, swe, dan, nor, fin, ces (ISO codes like de, ja work too).
pageRangeallPages or slides, e.g. 1-5, 8, 12-.
maxPagesPerFile200Stop after this many pages of one file (row marked truncated).
extractTablestrueTables on PDF text pages as Markdown tables.
includePagestruePer-page text, OCR flag and confidence in pages.
includePlainTexttruePlain text in text (Markdown is always returned).
ocrDpi200Render resolution for scanned pages (100–400).
maxFileSizeMb100Larger files are skipped for free.
respectRobotsTxttrueCheck the site's robots.txt before downloading.

Output

One row per file (every row has the same fields; unknown values are null):

{
"url": "sample",
"fileName": "sample.pdf",
"fileType": "pdf",
"status": "ok",
"title": "Sample document",
"pageCount": 2,
"pagesConverted": 2,
"ocrPages": 1,
"ocrLanguages": "eng",
"ocrConfidence": 95.8,
"tables": 1,
"markdown": "# Sample document\n\n<!-- page 1 -->\n\nQuarterly report (sample)\n...\n\n| Region | Revenue | Growth |\n| --- | --- | --- |\n| Europe | 120 | 8% |\n| Asia | 95 | 12% |\n\n<!-- page 2 -->\n\nScanned page (sample)\n\nThis page is a picture of text, like a scan or a photo.\n...",
"text": "Quarterly report (sample)\n...",
"pages": [
{"page": 1, "text": "Quarterly report (sample)...", "ocr": false, "ocrConfidence": null, "tables": 1, "charCount": 254},
{"page": 2, "text": "Scanned page (sample)...", "ocr": true, "ocrConfidence": 95.8, "tables": 0, "charCount": 190}
],
"markdownUrl": "https://api.apify.com/v2/key-value-stores/<id>/records/doc-00001-sample.md",
"billedDocument": 0,
"billedOcrPages": 0,
"error": null
}

Failed files get a row with status: "failed", an error code (blocked_by_robots_txt, http_error, file_too_large, unsupported_file_type, password_protected, unreadable_pdf, no_text_found, ...) and a plain errorMessage. They are not charged. A run summary is saved as SUMMARY in the key-value store.

Pricing

Pay per event, no subscription:

  • $0.004 per document: a PDF, Word, PowerPoint, Excel, HTML, CSV or text file converted, with all its text-layer pages ($4 per 1,000 documents).
  • $0.002 per OCR page: an image, or a scanned PDF page without a text layer ($2 per 1,000 pages).
  • Plus Apify's small run start fee. Failed files and the built-in sample are free.

Examples: a 30-page digital PDF = $0.004. A single photo or screenshot = $0.002. A 10-page scanned PDF = $0.004 + 10 × $0.002 = $0.024. You can cap the cost of a run with Apify's "maximum cost per run" setting; the Actor stops when it is reached.

Use it from AI agents (MCP)

The Actor is available to AI agents (Claude, ChatGPT, Cursor and others) through Apify's MCP server (mcp.apify.com) and the API. Minimal input:

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

First rows of the output:

{"fileType": "pdf", "status": "ok", "pagesConverted": 1, "ocrPages": 0, "markdown": "<!-- page 1 -->\n\nDummy PDF file", ...}
. Cost of this example: $0.004 plus the start fee. Read markdown (or markdownUrl for long documents); check status and error on every row.

How it compares

Image to text OCR, PDF text extraction and Office conversion usually need two or three different Actors. This one does all three with one row shape. Other popular Actors, as described on their Store pages on 2026-11-05 (check their pages for changes):

This ActorImage-OCR Actors (e.g. steadydata/image-ocr-text, zenomastro/image-ocr-text-extractor)PDF extractors (e.g. memo23/pdf-text-extractor)
Images (PNG, JPEG, TIFF, WebP …)yes, OCRyesno
Scanned PDFsyes, OCR only on pages without textyesyes, OCR only where needed
PDFs with a text layeryes, one fee per documentOCR'd page by pageyes
Word, PowerPoint, Excel, HTML, CSVyesnot mentionedno
TablesMarkdown tablestext, line or word boxestext lines
Markdown outputalways, plus a .md fileoptional or not mentionedyes
Price$0.004 per document, $0.002 per OCR page or image$0.00195–0.005 per image or pagefrom $0.005 per PDF plus OCR pages

Choose an image-OCR Actor if you need word or line bounding boxes or more than 24 languages; choose this one when the input is a mix of PDFs, scans and Office files and the output goes to an LLM or RAG pipeline.

How it works

  1. Downloads each link (robots.txt respected by default, honest User-Agent, size and time limits).
  2. Detects the real file type from its content, not only the extension.
  3. Converts it: text layer first, OCR only where needed, tables kept as tables.
  4. Saves one dataset row and one .md file per document.

FAQ

Does it keep headings in PDFs? Word, PowerPoint and HTML headings are kept. PDFs carry no reliable heading information, so PDF text is returned as paragraphs and tables, with page markers.

Handwriting? Tesseract reads printed text well; handwriting poorly.

Password-protected PDFs? Not supported (free failed row).

Can I upload files instead of links? Use any direct link: a file in your own storage, an Apify key-value store record, or a signed URL. Pages of file-sharing viewers (not the file itself) are not supported.

Limitations

  • Layout-heavy PDFs (multi-column magazines) can come out in a mixed reading order.
  • Table detection on PDFs is heuristic; tables without ruling lines may stay as text.
  • Images inside PDFs that also have a text layer are not OCR'd in auto mode (use ocr: "always").
  • Excel formulas are returned as their last saved values.

Credits

Tesseract OCR (Apache-2.0), pypdfium2 / PDFium (Apache-2.0, BSD-3-Clause), pdfplumber and pdfminer.six (MIT), python-docx, python-pptx, openpyxl, BeautifulSoup, markdownify (MIT), Pillow (HPND).