PDF Text Extractor - PDF to Text for AI, RAG & Search
Pricing
from $3.00 / 1,000 pdfs
PDF Text Extractor - PDF to Text for AI, RAG & Search
Turn PDF files into clean text. Give it PDF URLs and get the full text, optional per-page text, page count, word count and document metadata (title, author, dates). Flags scanned PDFs that contain no text layer. Built for feeding documents to LLMs, RAG pipelines and search indexes.
Pricing
from $3.00 / 1,000 pdfs
Rating
0.0
(0)
Developer
Ivan Honer
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
3 days ago
Last modified
Categories
Share
π PDF Text Extractor: PDF to Text for AI, RAG & Search
Turn PDF files into clean text. Give it PDF links and get back the full text, page-by-page text if you want it, the page and word count, and the document's metadata. Built for feeding documents to LLMs, RAG pipelines and search indexes.
- β Reading order preserved: lines and paragraphs are rebuilt from the page layout, not dumped as fragments
- β Page-by-page text for citations and chunking, or page markers inside the full text
- β Metadata: title, author, subject, keywords, producer, created and modified dates
- β Flags scanned PDFs that have no text layer, so you know which ones need OCR
- β Opens password-protected PDFs when you give the password
- β Failed downloads and non-PDF links are free
What does PDF Text Extractor do?
For every URL in your list it:
- Downloads the file, following redirects, and checks it really is a PDF.
- Reads the text layer of every page (or up to your page limit) with Mozilla's PDF.js engine.
- Rebuilds lines and paragraph breaks from the positions of the text on the page.
- Returns the full text, optional per-page text, counts and metadata as one row per PDF.
Use cases
- π€ RAG and AI assistants. Get clean text, with page numbers, from reports, manuals and filings to embed and search.
- π Search indexes. Index the content of PDF libraries, product sheets or regulations.
- π§Ύ Document processing. Pull the text out of forms, contracts and invoices for downstream parsing.
- π¬ Research. Batch-extract text from papers and reports for analysis.
- ποΈ Archive triage. Find out which files in a collection are scanned images that need OCR.
What data can you get?
| Field | What it is |
|---|---|
url, finalUrl | The link you gave, and where it ended up after redirects |
text | The full extracted text |
pages | [{ page, text }] for every page (switch on Also return text page by page) |
pageCount, pagesExtracted, truncated | Pages in the file, pages read, and whether the page limit cut it short |
wordCount, characterCount, fileSizeBytes | Size measures |
likelyScanned | true when there is little or no text layer, which usually means a scan |
metadata.title, .author, .subject, .keywords, .creator, .producer | Document properties |
metadata.createdDate, .modifiedDate, .pdfVersion | Dates in ISO 8601, and the PDF version |
status, error | See Statuses and errors |
How to use it
- Click Try for free (or Start) at the top of this page.
- Paste direct links to PDF files into PDF URLs, one per line.
- Switch on Also return text page by page if you need page numbers for citations or chunking.
- Press Start.
- Download the results from the Output tab, or pass them to your embedding or indexing step.
Input examples
A few public PDFs.
{"urls": ["https://www.irs.gov/pub/irs-pdf/fw9.pdf", "https://arxiv.org/pdf/1706.03762"]}
For RAG: per-page text, with long documents capped.
{"urls": ["https://example.com/annual-report-2026.pdf"],"includePages": true,"maxPagesPerPdf": 200}
A password-protected file.
{"urls": ["https://example.com/protected.pdf"],"password": "the-file-password"}
Output example
{"url": "https://www.irs.gov/pub/irs-pdf/fw9.pdf","status": "ok","finalUrl": "https://www.irs.gov/pub/irs-pdf/fw9.pdf","fileSizeBytes": 140815,"pageCount": 6,"pagesExtracted": 6,"truncated": false,"likelyScanned": false,"characterCount": 37974,"wordCount": 6284,"metadata": {"title": "Form W-9 (Rev. March 2024)","author": "SE:W:CAR:MP","subject": "Request for Taxpayer Identification Number and Certification","keywords": "Fillable","creator": "Designer 6.5","producer": "Designer 6.5","createdDate": "2024-03-06T08:18:13Z","modifiedDate": "2024-03-06T08:18:13Z","pdfVersion": "1.7"},"text": "Form W-9\n(Rev. March 2024)\n\nRequest for Taxpayer\nIdentification Number and Certification\n\nDepartment of the Treasury ..."}
Statuses and errors
Every URL gets a row.
status / error | Meaning | Charged? |
|---|---|---|
ok | Text extracted. If likelyScanned is true, the PDF is probably a scan and has little text | Yes |
error: The URL did not return a PDF file | The link points at a web page or another file type | No |
error: HTTP 404, HTTP 403... | The server refused the download | No |
error: File is larger than the 50 MB limit | Raise Maximum file size (up to 100 MB) | No |
error: The PDF is password protected | Give the password in Password | No |
error: The file is not a readable PDF | The file is damaged | No |
error: Download timed out | The server was too slow; raise Download timeout | No |
invalid_input | Not a URL | No |
How much does it cost?
You pay per PDF extracted. Failed downloads, non-PDF links and oversized files are free, and platform usage is included.
| PDFs | Price on the Free and Bronze tiers |
|---|---|
| 100 | $0.40 |
| 1,000 | $4.00 |
| 10,000 | $40.00 |
Larger Apify plans pay less per PDF: 15% less on Silver, and 25% less on Gold and above.
FAQ
Can I use it through the API?
Yes. For a few files, the synchronous endpoint returns the text in one request:
curl -X POST "https://api.apify.com/v2/acts/optimistical_lectern~pdf-text-extractor/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \-H "Content-Type: application/json" \-d '{"urls": ["https://www.irs.gov/pub/irs-pdf/fw9.pdf"]}'
JavaScript:
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });const run = await client.actor('optimistical_lectern/pdf-text-extractor').call({ urls: ['https://www.irs.gov/pub/irs-pdf/fw9.pdf'], includePages: true });const { items } = await client.dataset(run.defaultDatasetId).listItems();
Python:
from apify_client import ApifyClientclient = ApifyClient("YOUR_APIFY_TOKEN")run = client.actor("optimistical_lectern/pdf-text-extractor").call(run_input={"urls": ["https://www.irs.gov/pub/irs-pdf/fw9.pdf"], "includePages": True})items = client.dataset(run["defaultDatasetId"]).list_items().items
Can AI agents use it?
Yes. It runs with limited permissions, so it needs no approval step. Add it to Claude, Cursor or any other MCP client through Apify's MCP server at mcp.apify.com, using the Actor name optimistical_lectern/pdf-text-extractor. It is a good fit for an agent that needs to read a PDF linked from a web page.
Does it do OCR?
No. It reads the text layer that most digitally created PDFs have. For scanned PDFs it returns little or no text and sets likelyScanned: true, so you can route those files to an OCR tool.
How are tables handled?
Tables come out as lines of text in reading order, not as structured rows and columns.
What about multi-column layouts?
Text is read in the order the PDF stores it, which is the reading order for almost all documents. Unusual layouts can occasionally interleave columns.
Can I upload files instead of giving URLs?
Upload the files anywhere that gives a direct link (for example an Apify key-value store, S3 or a public cloud folder) and pass those links.
Something looks wrong?
Open an issue on the Issues tab with a link to the PDF. Every report is read.
Related tools
- π Website Contact Extractor: emails, phones and social profiles from websites
- π Domain WHOIS, DNS & Email Security: registration and email-security data for domains
- πΌ Google Jobs Scraper: job listings with salaries and apply links