PDF Text Extractor
Pricing
from $2.00 / 1,000 pdfs
PDF Text Extractor
Extracts the text layer from PDFs at http(s) URLs, page by page, with page counts and a needsOcr flag for scanned pages. No OCR, no browser.
Pricing
from $2.00 / 1,000 pdfs
Rating
0.0
(0)
Developer
LandlordTools
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
a day ago
Last modified
Categories
Share
Turn PDF links into plain text for search, RAG or AI agents. Each PDF is read page by page with Mozilla's PDF.js 1: text with pages separated, page and word counts, and a needsOcr flag for scanned pages. No OCR, no browser.
What it does
- Text layer only, page by page; each page is released before the next, so long documents don't grow memory.
- Scans flagged, not guessed: a page with no text layer is marked
needsOcrand listed inpagesNeedingOcr. Usually a scan or outlined text; blank pages are flagged too. No OCR is run or charged. - Pages are separated by a form feed (
\f) intext, aspdftotextdoes.pagesgives characters, words andneedsOcrfor each page. - Checks:
- the file must start with the
%PDF-header 2; - password-protected or damaged files give a clear error;
- redirects are followed (up to 5).
- the file must start with the
- Limits you set: file size, pages, characters and time per PDF. Pages read before a limit are kept;
stoppedEarlysays why. - Safety: only http and https. Private, loopback, link-local and cloud metadata addresses are refused 3, including after DNS and on every redirect.
Quick start
The prefilled input reads one GOV.UK PDF:
{"urls": ["https://assets.publishing.service.gov.uk/media/5a7e3de4ed915d74e622507f/legal-aid-checklist.pdf"]}
The row from the run on 4 October 2026, without text and pages:
{"index": 0,"url": "https://assets.publishing.service.gov.uk/media/5a7e3de4ed915d74e622507f/legal-aid-checklist.pdf","finalUrl": "https://assets.publishing.service.gov.uk/media/5a7e3de4ed915d74e622507f/legal-aid-checklist.pdf","status": 200,"title": "Civil representation - Checklist for new applications - August 2013","pageCount": 4,"pagesRead": 4,"chars": 2531,"words": 492,"needsOcr": false,"pagesNeedingOcr": [],"textTruncated": false,"stoppedEarly": null,"bytes": 157341,"error": null}
text starts "Civil Representation\nChecklist for new applications\nAugust 2013 v2".
Input
| Field | Default | Meaning |
|---|---|---|
urls | (required) | PDF links, up to 1,000 |
maxPages | 500 | Pages read per PDF |
maxFileMB | 30 | Largest file downloaded |
maxCharsPerPdf | 1,000,000 | Text kept per PDF |
timeoutSecs | 60 | Download and reading, per PDF |
maxConcurrency | 2 | Most PDFs at once (1–4), within memory |
Output
One row per PDF, with index giving its position in urls. Rows arrive as each PDF finishes.
| Field | Meaning |
|---|---|
text | Page texts joined by \f |
pages | [{page, chars, words, needsOcr}] |
needsOcr, pagesNeedingOcr | Scanned pages, if any |
title, pageCount, pagesRead, chars, words | From the document |
status, finalUrl, bytes | The download |
textTruncated, stoppedEarly, error | What stopped it |
Use from code
curl -X POST "https://api.apify.com/v2/acts/landlordtools~pdf-text-extractor/run-sync-get-dataset-items?token=YOUR_API_TOKEN" \-H "Content-Type: application/json" \-d '{"urls": ["https://assets.publishing.service.gov.uk/media/5a7e3de4ed915d74e622507f/legal-aid-checklist.pdf"]}'
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });const run = await client.actor('landlordtools/pdf-text-extractor').call({ urls: ['https://example.org/report.pdf'] });const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(items[0].text.split('\f')[0]);
Use with AI agents
Agents can call it through Apify's MCP server (https://mcp.apify.com) to read a PDF instead of guessing what it says.
Accuracy
Tested on 4 and 10 October 2026 against poppler's pdftotext on 200 GOV.UK PDFs (7,785 pages), using word-level F1:
- median 0.998 per PDF;
- 0.988 over all words pooled;
- 191 of the 200 PDFs at 0.95 or above.
The lowest scores are forms and multi-column layouts. No errors on either side. Details: tests/benchmark/.
Limits
- No OCR: scanned pages come back empty and flagged
needsOcr. A scan with a few typed characters on it (such as a page number) isn't flagged. - Memory: 256 MB reads one PDF at a time; 512 MB reads two.
- Reading order follows the PDF's text positions. Multi-column layouts and tables may interleave.
- Forms: field values typed into a form aren't part of the text layer.
Integrations
Power Platform, OpenAPI, Excel and Google Sheets files are in integrations/README.md. Apify's Zapier, Make and n8n apps work too.
Pricing
Pay per event: $2 per 1,000 results ($0.002 each), plus Apify's minimal start fee. A result is one PDF read, whatever its length. PDFs that can't be fetched or read are free, and the run stops at your spending limit 5.
Related Actors
- Link and Citation Checker: check that links and quotes are right.
- Sitemap URL Extractor: find every page on a site.
Sources
- pdfjs-dist (Mozilla PDF.js), Apache-2.0. Accessed 4 October 2026.
- Library of Congress: PDF 1.7 (ISO 32000-1:2008) format description, file header %PDF-. Accessed 4 October 2026.
- IANA IPv4 Special-Purpose Address Registry. Accessed 4 October 2026.
- IANA IPv6 Special-Purpose Address Registry. Accessed 4 October 2026.
- Apify: pay-per-event pricing. Accessed 4 October 2026.