PDF Text Extractor — Markdown, OCR & Metadata
Pricing
from $5.00 / 1,000 pdf processeds
PDF Text Extractor — Markdown, OCR & Metadata
Turn any PDF URL into clean data: full text, LLM-ready Markdown, per-page content, and metadata. Reads scanned PDFs via OCR (23 languages), supports page ranges, and processes files in parallel. Export JSON, CSV, or Excel. Ideal for RAG pipelines, invoices, and research.
Pricing
from $5.00 / 1,000 pdf processeds
Rating
0.0
(0)
Developer
Muhamed Didovic
Maintained by CommunityActor stats
0
Bookmarked
3
Total users
2
Monthly active users
a day ago
Last modified
Categories
Share
PDF Text Extractor — Markdown, OCR & Metadata 📄
Turn any PDF URL into clean, structured data: full text, LLM-ready Markdown, per-page content, and document metadata — with an OCR fallback that reads scanned, image-only PDFs. No browser, no proxies, no setup. Paste URLs, get JSON, CSV, or Excel.

Why use PDF Text Extractor?
- 🧾 Markdown output built for LLMs and RAG — headings, paragraphs, and bullet lists are reconstructed from the PDF layout, so you can feed documents straight into embeddings, vector stores, or prompts without cleanup.
- 🔍 OCR for scanned documents — pages with no text layer (scans, faxes, image-only invoices) are rendered and OCRed automatically in 23 languages. Only the pages that need it are OCRed, and only those are billed.
- 📑 Page ranges — extract just
1-5, 8, 12-instead of paying to process a 400-page manual you need 3 pages from. - 🗂️ Rich metadata — title, author, subject, keywords, creator, producer, creation and modification dates (normalized to ISO 8601).
- 📎 Three input modes — URLs, direct file upload, or base64 (for API calls). The only extractor in the niche that also opens password-protected PDFs (
pdfPasswordinput). - 🌐 Proxy support — route downloads through Apify Proxy when a host blocks datacenter IPs or geo-restricts files.
- ⚡ Fast and parallel — processes up to 20 PDFs concurrently; a typical text PDF takes under a second.
- 💰 Pay per PDF, not per compute unit — transparent pay-per-event pricing; failed downloads are never charged.
What data can you extract?
| Field | Description |
|---|---|
text | Complete plain text of the document (or selected page range) |
markdown | Markdown rendition with reconstructed headings, paragraphs, and lists |
pages | Optional per-page array: page number, text, and whether OCR was used |
metadata | Title, author, subject, keywords, creator, producer, creation/modification dates |
pageCount / extractedPageCount | Total pages vs. pages actually extracted |
charCount / wordCount | Size of the extracted text |
ocr | Whether OCR ran, how many pages were OCRed, and the language used |
status / error | success or failed with the exact reason (HTTP error, not a PDF, too large, timeout) |
Use cases
- RAG pipelines & AI agents — convert reports, papers, and manuals into Markdown chunks for vector search.
- Invoice & document processing — pull text out of supplier invoices, including scanned ones, for downstream parsing.
- Research & academia — batch-extract text from arXiv papers, theses, and journal PDFs.
- Legal & compliance — make contract archives and court filings searchable.
- Data pipelines — feed the dataset into Zapier, Make, LangChain, LlamaIndex, or your own code via the Apify API.
How to extract text from PDF files
- Provide PDFs any way you like: paste direct URLs, upload a file from your computer, or pass base64 data via the API.
- (Optional) Set a page range, a password for protected files, toggle Markdown / per-page text, or enable OCR for scanned documents.
- Run the Actor and download results as JSON, CSV, Excel, or XML — or fetch them via API.
Example input
{"urls": ["https://arxiv.org/pdf/1706.03762","https://example.com/scanned-invoice.pdf"],"pageRange": "1-10","includeMarkdown": true,"ocrScannedPages": true,"ocrLanguage": "eng"}
Input parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
urls | array | — | Direct URLs to PDF files; redirects are followed |
pdfFile | file | — | Upload a single PDF directly in Apify Console |
base64Pdfs | array | — | Base64 PDFs: plain strings or {"filename", "data"} objects (for API calls) |
pdfPassword | string (secret) | — | Password for opening protected PDFs |
pageRange | string | all pages | e.g. 1-5, 8, 12- (12- = page 12 to the end) |
includeFullText | boolean | true | Include complete plain text |
includeMarkdown | boolean | true | Include the Markdown rendition |
includePerPageText | boolean | false | Include the per-page pages array |
ocrScannedPages | boolean | false | OCR pages that have no text layer |
ocrLanguage | string | eng | OCR language (23 supported, incl. deu, fra, spa, jpn, chi_sim) |
maxConcurrency | integer | 5 | PDFs processed in parallel (1–20) |
timeoutPerPdfSecs | integer | 90 | Download timeout per PDF |
maxPdfSizeMb | integer | 100 | Larger PDFs are skipped as failed rows |
proxyConfiguration | object | auto | Blocked downloads auto-retry via proxy; set this to force proxy for every download |
At least one of urls, pdfFile, or base64Pdfs is required; all sources are processed together in one run.
Output example
{"url": "https://arxiv.org/pdf/1706.03762","fileName": "1706.03762","status": "success","pageCount": 15,"extractedPageCount": 15,"metadata": {"title": "Attention Is All You Need","author": null,"creationDate": "2024-04-10T21:11:43Z","producer": "pdfTeX-1.40.25"},"text": "Attention Is All You Need. The dominant sequence transduction models...","markdown": "# Attention Is All You Need\n\nThe dominant sequence transduction models...","pages": [{ "page": 1, "text": "...", "ocr": false }],"ocr": { "enabled": true, "pagesOcred": 0, "language": "eng" },"charCount": 40026,"wordCount": 6527,"processedAt": "2026-07-11T10:00:00.000Z"}
Tips for best results
- URLs must point at the PDF file itself, not a viewer page around it. If the link opens a browser preview, look for the direct
.pdfdownload URL. - Turn OCR on only when you expect scanned pages — it is slower and billed per OCR page. Text-layer pages are never OCRed.
- For very large PDFs, use
pageRangeand disableincludePerPageTextto keep dataset rows small. - The Markdown structure is heuristic (PDFs carry no real semantics): headings are detected from font sizes. It is tuned for reports, papers, and invoices; heavily designed layouts may come out flatter.
FAQ
Can it read scanned PDFs?
Yes — enable ocrScannedPages. Pages without a usable text layer are rendered and OCRed (Tesseract engine, 23 languages). Pages that already have text are never OCRed, so mixed documents are handled efficiently.
Does it handle password-protected PDFs?
Yes — set the pdfPassword input and protected documents are decrypted and processed like any other. Without the password (or with a wrong one), the file is reported as a failed row with a clear message.
Can I upload local files?
Yes — use the Upload a PDF file field in Apify Console, or pass base64Pdfs when calling via API. URLs, uploads, and base64 items can all be mixed in a single run.
A host keeps rejecting the download (403) — what can I do?
Usually nothing — blocked downloads (401/403/407/429) are automatically retried through a proxy. If a host needs the proxy for every request (e.g. geo-restricted files), set proxyConfiguration to force it for all downloads.
Does it extract tables or images? Tables come out as text lines (not structured cells) and images are not extracted. If you need structured table extraction, contact us — see Support below.
What happens when a URL fails?
You still get a dataset row with status: "failed" and the exact error. Failed PDFs are not charged.
Use with AI agents via MCP
This Actor works out of the box with AI agents through the Apify MCP server — let Claude, Cursor, or any MCP-capable agent read PDFs for you.
Claude Code:
$claude mcp add apify --transport http https://mcp.apify.com --header "Authorization: Bearer YOUR_APIFY_TOKEN"
Claude Desktop / Cursor / VS Code — add to your MCP config:
{"mcpServers": {"apify": {"url": "https://mcp.apify.com","headers": { "Authorization": "Bearer YOUR_APIFY_TOKEN" }}}}
Example prompts:
"Extract the text from https://example.com/report.pdf and summarize the key findings."
"Get pages 1–10 of this PDF as Markdown and list every dollar amount mentioned."
Support & feedback
Found a bug or missing a feature? Open an issue on the Actor's Issues tab in Apify Console — issues are typically answered within 24 hours. For custom extraction logic (structured tables, specific invoice formats, private storage integrations), reach out via the contact form on my profile.
Explore more scrapers
Check out my other Actors: apify.com/memo23 — 270+ scrapers for jobs, real estate, social media, e-commerce, and lead generation.
⚠️ Disclaimer
This Actor processes PDF files that you provide via publicly accessible URLs. You are responsible for ensuring you have the right to download and process those files, and for complying with the terms of service of the sites hosting them, as well as any applicable copyright and data-protection laws. The Actor does not bypass authentication, paywalls, or DRM.
SEO Keywords
pdf text extractor, extract text from pdf, pdf to text api, pdf to markdown converter, pdf ocr api, scanned pdf to text, pdf parser api, pdf metadata extractor, pdf data extraction, batch pdf text extraction, pdf to json, pdf for rag, llm pdf ingestion, pdf text scraper, convert pdf to markdown online, ocr scanned documents api, password protected pdf text extraction, upload pdf extract text, base64 pdf to text, pdf mcp ai agent