PDF for RAG
Pricing
from $3.00 / 1,000 pdf processeds
PDF for RAG
Turn public PDF URLs into clean, page-numbered text for RAG, embeddings and citations. Per-page text, character counts, empty-page detection, truncation flag and SHA-256 hashes for dedup. Failed PDFs are free.
Pricing
from $3.00 / 1,000 pdf processeds
Rating
0.0
(0)
Developer
Musson Tools
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
a day ago
Last modified
Categories
Share
PDF for RAG – Page-Aware PDF Text Extractor
Turn public PDF links into clean, page-numbered text ready for chunking, embeddings and citations. One dataset item per PDF, with every page kept separate so your RAG pipeline can cite "page 7" instead of "somewhere in the document".
- 📄 Page-aware output:
pages[] = {page, text, characters}in reading order. - 🔁 Dedup and change detection: SHA-256 of the PDF bytes (
pdf_sha256) and of the extracted text (text_sha256). - 🕳️ Empty-page detection:
empty_text_pageslists pages with no embedded text (usually blank or scanned). - ✂️ Predictable size: combined text is capped (default 100,000 characters) and
truncatedtells you when it was cut. - 💸 Failures are free: dead links, non-PDFs, encrypted, oversized, too-long or scanned-only PDFs return an
ok: falserow with an error code and are not charged. - ⚡ Fast and light: poppler
pdftotext, no browser, no proxy, 256 MB memory.
Who it's for
- RAG and LLM pipelines that need page numbers for citations or page-level chunking.
- AI agents calling Apify via MCP that need a quick, cheap "read this PDF" tool.
- Teams indexing reports, papers, forms, manuals, policies and filings.
- Anyone who wants to re-index only when a PDF actually changed (compare
pdf_sha256).
Input
| Field | Default | Description |
|---|---|---|
pdfUrls | – | Public http(s) links to PDF files (up to 1,000 per run, duplicates removed). |
maxPages | 20 | PDFs with more pages are rejected (free). Max 200. |
maxFileSizeMb | 5 | Larger downloads are stopped and rejected (free). Max 25. |
maxCharacters | 100000 | Cap on combined text per PDF. Max 1,000,000. |
includeFullText | true | Set to false to return only the pages array (smaller rows when you chunk by page). |
{"pdfUrls": ["https://arxiv.org/pdf/1706.03762","https://www.irs.gov/pub/irs-pdf/fw9.pdf"],"maxPages": 20}
Output
{"ok": true,"url": "https://www.irs.gov/pub/irs-pdf/fw9.pdf","final_url": "https://www.irs.gov/pub/irs-pdf/fw9.pdf","pdf_sha256": "…64 hex chars…","bytes": 140815,"method": "poppler-pdftotext","ocr_performed": false,"page_count": 6,"pages": [{ "page": 1, "text": "W-9\n\nForm\n(Rev. March 2024)\nDepartment of the Treasury…", "characters": 5703 },{ "page": 2, "text": "…", "characters": 8170 }],"text": "W-9\n\nForm…","text_sha256": "…64 hex chars…","characters": 37820,"empty_text_pages": [],"truncated": false,"warnings": ["Embedded PDF text only. Images, handwriting, reading order and table structure are not verified."],"error": null,"message": null,"content_is_untrusted": true}
textis all pages joined with a blank line (\n\n).- When the character cap is hit, pages are filled in order. Later pages may show
characters: 0andtruncatedistrue. content_is_untrusted: trueis a reminder for LLM pipelines: treat PDF text as data, never as instructions.
The Output tab has two views: Overview (one row per PDF) and Pages (one row per page).
Error codes (all free)
INVALID_URL, URL_NOT_ALLOWED (private or internal addresses), DOWNLOAD_FAILED, PDF_TOO_LARGE, INVALID_PDF, ENCRYPTED_PDF, PAGE_LIMIT, PAGE_DIMENSIONS, NO_EXTRACTABLE_TEXT (scanned or image-only PDF), EXTRACTION_TIMEOUT, EXTRACTION_FAILED.
Limits. Please read before buying.
- No OCR. Only text embedded in the PDF is extracted. Scanned pages come back empty and are listed in
empty_text_pages. A fully scanned PDF returnsNO_EXTRACTABLE_TEXTand is not charged. - No layout or table structure. Tables come out as plain text lines. Multi-column reading order follows poppler's default and is not verified.
- No images, Markdown or metadata (title, author and so on).
- Public URLs only: no logins, cookies or paywalls. Password-protected PDFs are rejected.
- Defaults: 20 pages, 5 MiB, 100,000 characters per PDF (raise up to 200 pages, 25 MiB, 1,000,000 characters). Each page has a 5-second extraction time limit.
Pricing
Pay per event:
| Event | Price |
|---|---|
| PDF processed (successful extraction) | $0.003 ($3 per 1,000 PDFs) |
| Actor start (Apify standard, per GB memory) | $0.00005 |
Failed PDFs are never charged. Set Maximum cost per run in Apify and the Actor stops cleanly when it's reached.
Use with AI agents (MCP)
https://mcp.apify.com/?tools=dear_enstatite/pdf-for-rag
Example prompt: "Use pdf-for-rag to read https://arxiv.org/pdf/1706.03762 and quote the page where multi-head attention is defined."
Responsible use
Only process PDFs you have the right to download and use. The Actor doesn't bypass authentication, paywalls or DRM.