PDF Text Extractor — Text, Markdown, Tables and OCR avatar

PDF Text Extractor — Text, Markdown, Tables and OCR

Pricing

from $2.10 / 1,000 pdf processeds

Go to Apify Store
PDF Text Extractor — Text, Markdown, Tables and OCR

PDF Text Extractor — Text, Markdown, Tables and OCR

[$0.003/PDF] Extract text from PDF files by URL, upload or base64: full text, per-page text, Markdown, tables and metadata. Scanned pages are read with OCR in 19 languages. Password PDFs, page ranges, RAG chunks. No fee per run.

Pricing

from $2.10 / 1,000 pdf processeds

Rating

0.0

(0)

Developer

Matvey

Matvey

Maintained by Community

Actor stats

0

Bookmarked

4

Total users

3

Monthly active users

2 days ago

Last modified

Share

Extract text from PDF files: full text, page-by-page text, clean Markdown, tables and document metadata. Scanned pages without a text layer are read with OCR in 19 languages. Password-protected PDFs, page ranges and RAG chunks are supported. $0.003 per PDF + $0.0001 per page, no fee per run, no login, no API key.

It is the Document Text Extractor engine with the form set up for PDFs; anything that works there works here, including Word, Excel, PowerPoint, EPUB, HTML, CSV and TXT links.

What it is for

What you give itWhat you get back
A PDF link, an uploaded PDF or base64 dataFull text, per-page text, Markdown, metadata
A report or paper with tablesEach table as Markdown and as a row array
A scanned PDFOCR text for the pages that have no text layer
A password-protected PDFThe same output, with the password you pass
Hundreds of PDF linksOne row per PDF, same fields for all of them

An empty call ({}) reads a two-page sample PDF, so you can see the output shape before sending your own files.

What data does it return?

FieldTypeExample
source / fileNamestringhttps://arxiv.org/pdf/1706.03762
pageCount / pagesProcessedinteger15 / 15
title, author, subject, creator, producerstringAnnual Operations Report 2026
documentCreatedAt / documentModifiedAtstring2026-09-05T00:07:28+08:00
textstringthe whole document as plain text
markdownstringheadings, lists and tables kept
pagesarray[{"number": 1, "text": "…", "markdown": "…", "ocr": false}]
tables / tableCountarray / integer`[{"page": 3, "markdown": "
chunks / chunkCountarray / integerwhen Split into RAG chunks is on
wordCount, charCount, ocrPageCountinteger6002, 39811, 0
status / errorCode / errorMessagestringok, or why a file failed
warningsarray["2 scanned page(s) were not processed because the OCR page limit was reached."]

How much does it cost?

EventPriceWhen it is charged
PDF processed$0.003Once per PDF that returned text
Page parsed$0.0001Per page of text
Scanned page read with OCR$0.008Only for pages with no text layer, and only when OCR found text
JobCost
1 PDF of 10 pages$0.004
1,000 PDFs of 10 pages$4.00
50 scanned PDFs of 5 pages, OCR$2.18

There is no fee per run. A dead link, a corrupt file or a PDF with no readable text comes back as an error row and is never charged. Pages that already contain text are never OCR-ed. Switch OCR pages without a text layer off and scanned pages are skipped at no cost.

How to extract text from a PDF

  1. Click Try for free and sign in to Apify.
  2. Paste PDF links into PDF URLs, or use Upload a file.
  3. Leave Markdown output on if the text goes to an LLM; switch on Split into RAG chunks for a vector database.
  4. For scans in another language, pick the OCR language.
  5. Press Start, then read the Output tab or export JSON, CSV or Excel.

⬇️ Input

{
"urls": ["https://raw.githubusercontent.com/lergassy/apify-actor-assets/main/document-text-extractor/sample-report.pdf"],
"includePages": true,
"extractTables": true,
"ocrScannedPages": true,
"ocrLanguage": "eng"
}
FieldWhat it does
urlsDirect links to the PDF files (not to a viewer page)
documentFileUpload one file from your computer
base64FilesBase64 strings or {"fileName", "data"} objects, for API and agent calls
includeMarkdown / includeFullText / includePagesWhich text fields to return (all on by default)
extractTablesDetect tables and return them as Markdown and rows
chunkForRag, chunkSize, chunkOverlapSplit into retrieval chunks that keep their heading path
pageRangeRead only some pages, e.g. 1-5, 8 or 12-
passwordPassword for a protected PDF
ocrScannedPages, ocrLanguage, ocrMaxPagesPerDocumentOCR for pages without a text layer (on by default, capped at 20 pages per PDF)
maxConcurrency, maxFileSizeMb, timeoutPerDocumentSecsAdvanced limits

If a host refuses the download (rate limit, block), the Actor retries with a pause and then through a residential proxy before giving up on the file. You are not charged for that.

⬆️ Output

{
"source": "https://…/sample-report.pdf",
"format": "pdf",
"pageCount": 2,
"title": "Annual Operations Report 2026",
"author": "Malina Data",
"wordCount": 198,
"ocrPageCount": 0,
"markdown": "# Annual Operations Report 2026\n\n## Executive summary\n…",
"pages": [{ "number": 1, "text": "Annual Operations Report 2026…", "ocr": false }],
"tableCount": 1,
"status": "ok"
}

Error rows

errorCodeMeaning
http-error / network-error / timeoutThe file could not be downloaded, even after retries
too-largeAbove the size limit (50 MB by default, up to 200 MB)
password-requiredThe PDF needs a password
corrupt-fileThe file is damaged or not a PDF
no-text-contentNo text found — a scan with OCR switched off, or an empty document
unsupported-formatNot a supported file type

Limitations, stated plainly

  • OCR is built for printed text; handwriting and heavy stamps read poorly.
  • Tables are detected from the PDF's layout. Tables drawn without lines, or split across pages, may come back merged or partial.
  • At most 20 scanned pages per PDF are OCR-ed by default (adjustable up to 500), so a long scan cannot surprise you.
  • Google Docs or Dropbox viewer links are web pages, not files — use the direct download link.

Use cases

  • RAG and knowledge bases — Markdown and chunks with their heading path go straight into embeddings.
  • Contract, invoice and report review — full text plus metadata and tables for search or an LLM.
  • Research papers — per-page text and tables from arXiv and journal PDFs.
  • Scanned archives — OCR only where needed, billed per scanned page.

🤖 For AI agents and LLM apps

{ "urls": ["https://example.com/report.pdf"] }
  • One row per PDF; status is ok or error.
  • markdown is the field to give a model; chunks is the field to embed.
  • Files can be passed as base64; an empty call returns a sample result instead of an error.

Use via API

curl -X POST "https://api.apify.com/v2/acts/lergassy~pdf-text-extractor/run-sync-get-dataset-items?token=YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"urls": ["https://example.com/report.pdf"]}'
from apify_client import ApifyClient
items = ApifyClient("YOUR_TOKEN").actor("lergassy/pdf-text-extractor").call(
run_input={"urls": ["https://example.com/report.pdf"]}
).iterate_items()

Works the same from JavaScript, n8n, Make, Zapier and the Apify MCP server.

❓ FAQ

Does one row mean one PDF or one page?

One PDF. Pages are inside the row in pages.

Can it read password-protected PDFs?

Yes, pass the password in PDF password.

What is the difference from Document Text Extractor?

None in the engine. Document Text Extractor is the main Actor, framed around every document format; this one is set up for PDFs, with per-page output and OCR on by default.

I only have images, not PDFs.

Use Image to Text — the same OCR engine, with confidence scores and word positions.

You might also like

ActorWhat it does
Document Text ExtractorThe main Actor: PDF, Word, Excel, PowerPoint, EPUB to Markdown and RAG chunks
OCR Text ExtractorScanned PDFs and images with confidence scores and word boxes
Image to TextScreenshots and photos to text

Also known as

PDF to text, PDF text extraction API, PDF parser, PDF to Markdown, extract text from PDF, PDF OCR, PDF scraper.