PDF & DOCX to Text, Markdown & Tables - OCR for Scanned PDFs avatar

PDF & DOCX to Text, Markdown & Tables - OCR for Scanned PDFs

Pricing

from $1.40 / 1,000 documents converted

Go to Apify Store
PDF & DOCX to Text, Markdown & Tables - OCR for Scanned PDFs

PDF & DOCX to Text, Markdown & Tables - OCR for Scanned PDFs

Convert PDF, scanned PDF, DOCX and TXT URLs to clean text and LLM-ready Markdown. Tables become Markdown tables, scanned pages are OCR'd in 23 languages. Per-page output and metadata. Pay per document.

Pricing

from $1.40 / 1,000 documents converted

Rating

0.0

(0)

Developer

Michail

Michail

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

28 minutes ago

Last modified

Features

Limited permissions

Share

Give it PDF, scanned PDF or DOCX links → get clean text and LLM-ready Markdown, with tables kept as tables. OCR in 23 languages, only where a page has no text layer. $0.002 per document (+$0.002 per OCR page), failed files are free, no subscription.

📖 Step-by-step guide: Turn PDFs (even scanned ones) into clean Markdown for RAG in one API call · 💻 Code examples: GitHub

What does Document to Text do?

Document to Text converts PDF, scanned PDF, DOCX and TXT files into clean, structured text — ready for search, analysis and AI. Give it document URLs and get back:

  • 📝 Clean plain text — hyphenation and broken line wraps fixed, paragraphs preserved
  • 🤖 LLM-ready Markdown — headings, lists and tables converted to Markdown tables
  • 📄 Per-page content for PDFs, with a flag for pages that needed OCR
  • 🔎 OCR for scanned pages in 23 languages — applied only where a page has no text layer
  • 🏷️ Metadata — title, author, page count, word count

Why use it?

  • 💸 Cheap and fair — pay per document, plus a small fee only for pages that actually needed OCR. Failed downloads and unsupported files are never charged.
  • 🧠 Built for AI pipelines — Markdown output with real tables is what LLMs and RAG systems understand best.
  • 🖨️ Handles scans — invoices, contracts and old reports without a text layer are OCR'd automatically.
  • ⚡ Fast — text PDFs are parsed in seconds; many documents are processed in parallel.
  • 🛡️ Respects your budget — the Actor stops before exceeding your Max cost per run.

What can I use it for?

  • RAG and chatbots — turn PDFs and Word files into Markdown chunks for your vector database.
  • Document processing — extract text from invoices, contracts, reports and forms.
  • Research — convert papers and reports into searchable text.
  • Data extraction — pull tables out of PDFs as Markdown or tab-separated text.
  • Archiving and compliance — make scanned archives searchable.

How to use it

  1. Click Try for free.
  2. Paste document URLs (direct links to .pdf, .docx or .txt files).
  3. Choose output formats and, for scanned documents, the OCR languages.
  4. Click Start and download results as JSON, CSV, Excel or HTML — or get them via the API.

How much does it cost?

Pay-per-event pricing (see the Pricing tab):

  • Document processed — a small fixed price per successfully converted file.
  • OCR page — charged only for pages without a text layer that had to be OCR'd.

A 30-page text PDF costs one document event. A 10-page scanned PDF costs one document event plus 10 OCR pages. Apify platform usage is included.

Input example

{
"urls": [
{ "url": "https://arxiv.org/pdf/1706.03762" },
{ "url": "https://example.com/contract.docx" }
],
"outputFormats": ["text", "markdown"],
"ocr": "auto",
"ocrLanguages": ["eng"],
"extractTables": true
}

Output example (real test run)

From a real test run on https://arxiv.org/pdf/1706.03762 (long fields shortened, nothing else edited):

{
"status": "ok",
"url": "https://arxiv.org/pdf/1706.03762",
"fileType": "pdf",
"fileName": "1706.03762",
"sizeBytes": 2215244,
"pageCount": 15,
"processedPages": 15,
"ocrPages": 0,
"metadata": {
"Author": "",
"CreationDate": "D:20240410211143Z",
"Creator": "LaTeX with hyperref",
"Producer": "pdfTeX-1.40.25",
"Subject": "",
"Title": ""
},
"charCount": 41099,
"wordCount": 6343,
"text": "Provided proper attribution is provided, Google hereby grants permission to\nreproduce the tables and figures in this paper solely for use in...",
"markdown": "Provided proper attribution is provided, Google hereby grants permission to reproduce the tables and figures in this paper solely for use in...",
"processingSeconds": 2.1
}

Items that could not be processed are returned with "status": "error" and a clear error message — and are not charged.

Tips

  • OCR languages: choose only the languages you need — fewer languages means faster and more accurate OCR.
  • Large PDFs: use Max pages per PDF to process only the first pages.
  • Web pages are not documents: for HTML pages use a website crawler; this Actor needs a direct file link.
  • Integrations: connect it to Google Drive, Make, Zapier, n8n or LangChain via the Apify API.

FAQ

Which file types are supported? PDF (text and scanned), DOCX and plain text files. Password-protected PDFs are not supported.

How accurate is OCR? Very good for clean scans and printed text. Handwriting and low-quality photos give weaker results.

Something does not work? Open an issue in the Issues tab with the document URL. We fix reported problems quickly.

Integrations & API

Run it from Make, n8n, Zapier, Google Sheets, webhooks or your own code — results come back as clean JSON.

Python

from apify_client import ApifyClient
client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("michail-data-tools/document-to-text").call(run_input={...})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item)

AI agents (MCP): add this tool to Claude, Cursor or any MCP client via the Apify MCP server — https://mcp.apify.com?tools=michail-data-tools/document-to-text — and let your agent call it directly.

More tools from the same developer

Found a problem or need a feature? Open an issue — we usually reply within a day. If the tool saved you time, a short review helps others find it.