PDF to Text & RAG Chunks – PDF Text Extractor for LLMs
Pricing
$3.00 / 1,000 pdf processeds
PDF to Text & RAG Chunks – PDF Text Extractor for LLMs
Convert PDF links to clean text for LLMs: one record per document, per page (with page numbers for citations) or overlapping RAG chunks for Pinecone, Qdrant or LangChain. Flags scanned PDFs, reports broken links free of charge. No start fee, $3 per 1,000 PDFs.
Pricing
$3.00 / 1,000 pdf processeds
Rating
0.0
(0)
Developer
Maximilian van Elst
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
2 days ago
Last modified
Categories
Share
Paste PDF links, get clean text back – one record per document, one per page, or overlapping chunks ready for RAG and vector databases. No start fee, $3 per 1,000 PDFs, and failed URLs are free. Scanned PDFs without a text layer are flagged so you know what needs OCR.
What does this PDF Text Extractor do?
- Downloads PDFs from any public http/https URL
- Extracts the text layer and cleans it (joins hyphenated line breaks, normalizes whitespace)
- Outputs in 3 modes:
document– one record per PDFpage– one record per page (withpageNumber)chunks– overlapping chunks with configurable size and overlap, split at paragraph/sentence boundaries
- Adds metadata: page count, title, creator tool, creation date, PDF version (the author field is deliberately not exported)
- Flags likely scanned PDFs (
isLikelyScanned) - Reports broken links, HTML pages and oversized files per URL – errors are free
Who is it for?
- AI / LLM developers building RAG pipelines with LangChain, LlamaIndex, Pinecone, Qdrant, Weaviate or Chroma
- Automation builders who need PDF text in Make, Zapier or n8n
- Researchers, analysts and journalists converting reports, papers or parliamentary documents to searchable text
- AI agents that need to "read" a PDF link on demand
Use cases
- 🧠 Feed research papers, manuals or policies into a vector database (
chunksmode) - 📑 Page-level citations – keep
pageNumberso answers can cite the exact page - 🔎 Bulk-convert public PDFs to text for search or keyword monitoring
- ✅ Pre-check a document collection: which files have text, which need OCR
How to extract text from a PDF in 3 steps
- Click Start – the prefilled input (one arXiv paper, 15 pages, chunks mode) runs in a few seconds and costs $0.003.
- Paste your own PDF URLs and choose an output mode.
- Export as JSON, CSV or Excel, or call the Actor from your code or agent.
Input example
{"pdfUrls": [{ "url": "https://arxiv.org/pdf/1706.03762" }],"outputMode": "chunks","chunkSize": 2000,"chunkOverlap": 200,"maxPages": 0,"maxFileSizeMb": 50,"includeMetadata": true,"maxConcurrency": 4}
| Field | Meaning |
|---|---|
pdfUrls | Direct links to PDF files |
outputMode | document, page or chunks |
chunkSize / chunkOverlap | Characters per chunk and overlap (chunks mode only) |
maxPages | Process only the first N pages (0 = all) |
maxFileSizeMb | Larger files are skipped and reported (not charged) |
includeMetadata | Add title, creator tool, creation date, PDF version |
maxConcurrency | Parallel downloads (1–20) |
Output example
Real record from a test run on 22 Oct 2026 (prefilled input: chunks mode, "Attention Is All You Need", arXiv 1706.03762; text shortened):
{"url": "https://arxiv.org/pdf/1706.03762","status": "ok","totalPages": 15,"pagesProcessed": 15,"isLikelyScanned": false,"title": null,"creatorTool": "LaTeX with hyperref","creationDate": "D:20240410211143Z","pdfVersion": "1.5","processingMs": 1192,"chunkIndex": 1,"chunkCount": 22,"charStart": 1797,"charEnd": 3781,"charCount": 1983,"text": "sed replacing RNNs with self-attention and started\nthe effort to evaluate this idea. Ashish, with Illia, designed and …"}
document mode adds charCount and wordCount per PDF; page mode adds pageNumber.
Failed URLs return a record like:
{ "url": "https://example.com/", "status": "error", "error": "Not a PDF (content-type: text/html; charset=utf-8)" }
PDF chunking for RAG: which settings?
chunkSize1,000–2,000 characters with about 10 % overlap is a common starting point; tune it for your embedding model and documents.- Use
pagemode if your app must cite page numbers; chunk each page yourself if pages are long. - Store
url+chunkIndex(orpageNumber) as metadata in your vector DB so every answer can link back to the source.
How much does it cost to extract text from PDFs?
Pay-per-event pricing – you only pay for successfully processed PDFs, platform compute is included:
| Event | Price |
|---|---|
| PDF processed | $0.003 per PDF ($3 per 1,000), any number of pages up to the size limit |
No start fee. Failed URLs (404, HTML instead of PDF, too large) cost nothing.
- Prefilled test run (1 PDF): $0.003
- 1,000 PDFs into your vector DB: $3
- 10,000 PDFs: $30
PDF to text API: Python, JavaScript, cURL
Python
from apify_client import ApifyClientclient = ApifyClient("<YOUR_APIFY_TOKEN>")run = client.actor("mabun/pdf-text-extractor-rag").call(run_input={"pdfUrls": [{"url": "https://arxiv.org/pdf/1706.03762"}],"outputMode": "chunks", "chunkSize": 1500, "chunkOverlap": 150})chunks = list(client.dataset(run["defaultDatasetId"]).iterate_items())# -> embed chunk["text"] and store chunk["url"], chunk["chunkIndex"] as metadata
JavaScript
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });const run = await client.actor('mabun/pdf-text-extractor-rag').call({pdfUrls: [{ url: 'https://arxiv.org/pdf/1706.03762' }], outputMode: 'page'});const { items } = await client.dataset(run.defaultDatasetId).listItems();
cURL
curl -X POST "https://api.apify.com/v2/acts/mabun~pdf-text-extractor-rag/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>" \-H "Content-Type: application/json" \-d '{"pdfUrls":[{"url":"https://arxiv.org/pdf/1706.03762"}],"outputMode":"document"}'
Use with AI agents (MCP)
Let Claude, ChatGPT, Cursor or your own agent read PDF links through the Apify MCP server:
https://mcp.apify.com?tools=mabun/pdf-text-extractor-rag
Example prompt: "Read this PDF and summarize sections 3 and 4 with page references: https://arxiv.org/pdf/1706.03762"
Integrations
- Schedules – re-process a list of documents regularly
- Webhooks – notify your backend when extraction is done
- Make, Zapier, n8n, Google Drive, Airtable – via Apify's ready-made integrations
- LangChain / LlamaIndex – load the dataset with the Apify document loaders
FAQ
Does it do OCR? No. It extracts the existing text layer, which is why it is fast and cheap. Scanned PDFs are flagged with isLikelyScanned: true so you can route only those to an OCR tool.
Does it output Markdown or tables? No – clean plain text. Table contents come out as plain text without table structure.
Can it read password-protected PDFs or PDFs behind a login? No – only publicly reachable, unencrypted PDFs.
Which languages are supported? Any language with a text layer; tested with English and German documents.
How are chunks split? At paragraph or sentence boundaries near your chunkSize, with chunkOverlap characters repeated between chunks. charStart/charEnd refer to the cleaned full text.
Can I upload local files? Put them in an Apify key-value store or any public storage and pass the URLs.
Limitations
- No OCR, no table structure or images – plain text only
- Complex layouts (multi-column, formulas) may produce imperfect reading order
isLikelyScannedis a heuristic (fewer than 10 characters per page); very short PDFs can trigger it- Default max file size 50 MB (configurable up to 200 MB)
- Only process documents you are allowed to use
Related Actors by the same developer
- RSS Feed Monitor – new items from any feed, ideal input for a RAG news index
- EU Tenders Monitor Germany & Austria (TED) – new public tenders from Germany & Austria via the official TED API
- EPO Patent Search & Monitor – new European patents by keyword, applicant or CPC
Support
Found a PDF that does not extract well? Open an issue on the Issues tab with the URL.