Document processing

Document Text Extractor: PDF, Word and Excel to clean text and Markdown

Extract text, Markdown, tables and metadata from PDF, Word, Excel, PowerPoint, EPUB, HTML and CSV files. Scanned pages are read with OCR in 19 languages, and documents can be split into RAG-ready chunks for LLM pipelines.

19 users97.3% successful runs (30 days)

What data you get

markdownClean Markdown with headings, lists and tables
fullTextWhole document as plain text
tablesEach table as Markdown and as a row array
metadataDocument metadata
pagesOptional page-by-page text and Markdown
ragChunksOptional retrieval chunks with heading path
ocrTextText read from scanned pages with OCR

How it works

  1. Open the scraper on Apify and sign up (free).
  2. Enter routes, dates and options in the form.
  3. Click Start and download results as JSON, CSV or Excel, or call the API.

Pricing

$0.15 per 1,000 rows

Pay per event: you are charged per document processed and per page parsed, plus per OCR page when you turn on OCR for scanned pages.

Apify gives $5 free credits every month — enough to test this scraper at no cost.

Example tasks

Ready-made inputs. Copy one into the scraper form or send it through the API.

Convert PDF to Markdown with tables

Markdown output with every table extracted.

{
  "urls": [
    "https://raw.githubusercontent.com/lergassy/apify-actor-assets/main/document-text-extractor/sample-report.pdf"
  ],
  "includeMarkdown": true,
  "extractTables": true
}
Run this task →

Split PDF and Word files into RAG chunks

1,200-character chunks with 120 overlap.

{
  "urls": [
    "https://raw.githubusercontent.com/lergassy/apify-actor-assets/main/document-text-extractor/sample-report.pdf",
    "https://raw.githubusercontent.com/lergassy/apify-actor-assets/main/document-text-extractor/sample-contract.docx"
  ],
  "chunkForRag": true,
  "chunkSize": 1200,
  "chunkOverlap": 120
}
Run this task →

OCR scanned pages of a PDF

Read up to 20 pages without a text layer.

{
  "urls": [
    "https://raw.githubusercontent.com/lergassy/apify-actor-assets/main/document-text-extractor/sample-report.pdf"
  ],
  "ocrScannedPages": true,
  "ocrLanguage": "eng",
  "ocrMaxPagesPerDocument": 20
}
Run this task →

Extract text from the first 5 pages of a PDF

Page-by-page text for pages 1 to 5.

{
  "urls": [
    "https://raw.githubusercontent.com/lergassy/apify-actor-assets/main/document-text-extractor/sample-report.pdf"
  ],
  "pageRange": "1-5",
  "includePages": true
}
Run this task →

Use cases

FAQ

Which file types are supported?

PDF, DOCX, XLSX, PPTX, EPUB, HTML, CSV and TXT, via URL, upload or base64.

Can it read scanned PDFs?

Yes. Turn on OCR for scanned pages and pick one of 19 languages.

Can it handle password-protected PDFs?

Yes, if you provide the password.

Is it legal to extract text from documents?

The tool only processes the files you give it. Make sure you have the right to use those documents and that processing any personal data in them complies with applicable law.

How do I get the data into my app?

Use the Apify API, Python or JavaScript clients, or integrations with Make, n8n, Zapier and Google Sheets.

More scrapers

Turn any document into clean text

Run on Apify — free trial