PDF Text Extractor — Text, Markdown, Tables and OCR
Pricing
from $2.10 / 1,000 pdf processeds
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
Maintained by CommunityActor stats
0
Bookmarked
4
Total users
3
Monthly active users
2 days ago
Last modified
Categories
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 it | What you get back |
|---|---|
| A PDF link, an uploaded PDF or base64 data | Full text, per-page text, Markdown, metadata |
| A report or paper with tables | Each table as Markdown and as a row array |
| A scanned PDF | OCR text for the pages that have no text layer |
| A password-protected PDF | The same output, with the password you pass |
| Hundreds of PDF links | One 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?
| Field | Type | Example |
|---|---|---|
source / fileName | string | https://arxiv.org/pdf/1706.03762 |
pageCount / pagesProcessed | integer | 15 / 15 |
title, author, subject, creator, producer | string | Annual Operations Report 2026 |
documentCreatedAt / documentModifiedAt | string | 2026-09-05T00:07:28+08:00 |
text | string | the whole document as plain text |
markdown | string | headings, lists and tables kept |
pages | array | [{"number": 1, "text": "…", "markdown": "…", "ocr": false}] |
tables / tableCount | array / integer | `[{"page": 3, "markdown": " |
chunks / chunkCount | array / integer | when Split into RAG chunks is on |
wordCount, charCount, ocrPageCount | integer | 6002, 39811, 0 |
status / errorCode / errorMessage | string | ok, or why a file failed |
warnings | array | ["2 scanned page(s) were not processed because the OCR page limit was reached."] |
How much does it cost?
| Event | Price | When it is charged |
|---|---|---|
| PDF processed | $0.003 | Once per PDF that returned text |
| Page parsed | $0.0001 | Per page of text |
| Scanned page read with OCR | $0.008 | Only for pages with no text layer, and only when OCR found text |
| Job | Cost |
|---|---|
| 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
- Click Try for free and sign in to Apify.
- Paste PDF links into PDF URLs, or use Upload a file.
- Leave Markdown output on if the text goes to an LLM; switch on Split into RAG chunks for a vector database.
- For scans in another language, pick the OCR language.
- 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"}
| Field | What it does |
|---|---|
urls | Direct links to the PDF files (not to a viewer page) |
documentFile | Upload one file from your computer |
base64Files | Base64 strings or {"fileName", "data"} objects, for API and agent calls |
includeMarkdown / includeFullText / includePages | Which text fields to return (all on by default) |
extractTables | Detect tables and return them as Markdown and rows |
chunkForRag, chunkSize, chunkOverlap | Split into retrieval chunks that keep their heading path |
pageRange | Read only some pages, e.g. 1-5, 8 or 12- |
password | Password for a protected PDF |
ocrScannedPages, ocrLanguage, ocrMaxPagesPerDocument | OCR for pages without a text layer (on by default, capped at 20 pages per PDF) |
maxConcurrency, maxFileSizeMb, timeoutPerDocumentSecs | Advanced 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
errorCode | Meaning |
|---|---|
http-error / network-error / timeout | The file could not be downloaded, even after retries |
too-large | Above the size limit (50 MB by default, up to 200 MB) |
password-required | The PDF needs a password |
corrupt-file | The file is damaged or not a PDF |
no-text-content | No text found — a scan with OCR switched off, or an empty document |
unsupported-format | Not 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;
statusisokorerror. markdownis the field to give a model;chunksis 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 ApifyClientitems = 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
| Actor | What it does |
|---|---|
| Document Text Extractor | The main Actor: PDF, Word, Excel, PowerPoint, EPUB to Markdown and RAG chunks |
| OCR Text Extractor | Scanned PDFs and images with confidence scores and word boxes |
| Image to Text | Screenshots 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.