Extract Text from PDF: OCR, PDF to Text & Markdown avatar

Extract Text from PDF: OCR, PDF to Text & Markdown

Pricing

from $0.32 / 1,000 page converteds

Go to Apify Store
Extract Text from PDF: OCR, PDF to Text & Markdown

Extract Text from PDF: OCR, PDF to Text & Markdown

Convert PDF, Word, PowerPoint, Excel and image files to clean text or Markdown: PDF to text, PDF to Markdown, and OCR PDF for scanned PDF pages, automatically. Extract text from PDF URLs, plus tables as CSV-ready rows. Built for AI and RAG pipelines and data entry.

Pricing

from $0.32 / 1,000 page converteds

Rating

0.0

(0)

Developer

Data Done Right

Data Done Right

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

5 days ago

Last modified

Share

This PDF to text converter also handles Word, PowerPoint, Excel and images. It turns any document into clean text or Markdown, ready for AI, search or data entry. Give file URLs and get the text, the tables as rows, and OCR for scanned pages, all in one Actor.

What file types can it convert to text

InputWhat you get
PDFText with correct word spacing (PDFium engine), tables, metadata. Scanned pages are OCR'd automatically.
Word (.docx)Headings as # Markdown, lists, tables
PowerPoint (.pptx)Text per slide, slide tables, speaker notes
Excel (.xlsx)Every sheet as rows
Images (PNG, JPG, TIFF, WebP)OCR text (English, Spanish, French, German, Portuguese, Italian)
HTML / TXTMain content as Markdown

Why use this PDF to text converter

  • Auto OCR, only where needed. Pages with a text layer are read directly; only image-only pages go through OCR. That's faster, and you're billed for OCR only on those pages.
  • Tables you can use: each table is rows × cells, CSV-ready, plus a Markdown version inside the document text.
  • RAG-friendly: choose one row per page for chunking and page citations.
  • Robust batches: a broken link or corrupt file is listed in FAILED and never stops the run.

How to convert a PDF to text

Put the file links in urls and run. The defaults are Markdown output, table extraction on and OCR set to auto.

{
"urls": ["https://www.irs.gov/pub/irs-pdf/fw9.pdf"],
"outputFormat": "markdown",
"onePerPage": false,
"extractTables": true,
"ocr": "auto",
"ocrLanguages": ["eng"]
}

outputFormat can be markdown, text or both. Use pages (for example 1-5,8) to read only some PDF pages and maxPagesPerDocument to cap long files and cost.

Extract text from PDF files in bulk, by API

Call this Actor from the Apify API, Python, JavaScript, Make, Zapier, n8n or Power Automate to extract text from PDF files, scanned PDFs and images, and get JSON back. You can also export to CSV, Excel or Google Sheets. There's no software to install and no per-file upload.

Use it in Claude, ChatGPT and Cursor

Connect Apify's MCP server (mcp.apify.com) and your AI assistant can read documents itself. For example: "extract the text and tables from this PDF link and summarize it." The only required input is urls.

What data can you extract (output example)

{
"url": "https://www.irs.gov/pub/irs-pdf/fw9.pdf", "fileType": "pdf", "pageCount": 6, "pagesProcessed": 6,
"ocrPages": [], "wordCount": 6272,
"markdown": "<!-- page 1 -->\n\nForm W-9 (Rev. March 2024) Request for Taxpayer Identification Number ...",
"tables": [{"page": 1, "rows": [["Part I", "Taxpayer Identification Number (TIN)"], ["..."]]}]
}

How much does it cost

Pay per event: $0.0004 per page converted (1,000 pages ≈ $0.40), plus $0.005 per page only for pages that needed OCR. Apify Silver plans get 10% off, Gold and higher 20%.

FAQ

How do I convert a scanned PDF to text?

Leave ocr on auto. Pages that have a text layer are read directly, and only image-only pages go through OCR. Set ocr to always to force OCR on every page.

How do I extract text from a PDF?

Put the PDF link in urls and run. You get the whole document as clean text or Markdown in one field, or one row per page with onePerPage.

How do I extract text from a PDF to Excel?

Keep extractTables on. Each table comes back in the tables field as rows of cells, ready to save as CSV and open in Excel or Google Sheets.

How do I OCR a PDF?

Give the PDF link in urls. Choose the language codes in ocrLanguages (English, Spanish, French, German, Portuguese or Italian). The OCR text is returned in the same markdown field as the rest of the document, and ocrPages lists which pages needed OCR.

Can I convert PDF to Markdown for AI and RAG?

Yes. Markdown is the default output. Turn on onePerPage to get one row per page, which makes chunking and page citations easy.

Can it extract tables from a PDF?

Yes. Each table comes back as rows of cells you can load as CSV, plus a Markdown version inside the document text. Table quality depends on the layout of the source file.

Which file types does it support?

PDF, Word (.docx), PowerPoint (.pptx), Excel (.xlsx), images (PNG, JPG, TIFF, WebP), HTML and TXT. Old binary formats such as .doc are not in this list.

What happens if one file fails?

A broken link or corrupt file is listed in the FAILED record, and the rest of the batch is still converted.

  • File Converter API: PDF, Office, Images, Audio & Video converts, merges, splits and compresses files instead of reading their text.
  • Extract ZIP Files: Unzip Archives & Email Attachments pulls the documents out of archives and emails first.
  • AI Web Scraper: Any Page to JSON (Bring Your Own Key) turns the text of web pages into structured fields.