PDF Text Extractor — text, metadata & page count from PDF URLs
Extract clean text from PDF files by URL, per document or per page, with title, author, dates and page count. Ready for search, RAG and LLM pipelines. Scanned pages without text are not charged. Pay per page.
Run it on Apify →Give it links to PDF files, get back clean text and metadata in a table: one row per document or one row per page. Built on Mozilla's pdf.js engine (the one inside Firefox), so it reads the text layer of virtually any digital PDF: reports, invoices, contracts, papers, forms, manuals.
What it is for
- RAG and LLM pipelines: per-page text with page numbers, ready to chunk, embed and cite.
- Search and indexing: make a pile of PDFs searchable in your database or Elasticsearch.
- Document monitoring: run on a schedule against regulatory filings, price lists or tenders and diff the text.
- Data entry: pull the text of invoices or forms into a sheet before parsing it with your own rules.
- Inventory: page counts, titles, authors and creation dates of a document library.
Works from Make, Zapier, n8n or the API: send the URLs, read the dataset.
Input example
{
"urls": [
"https://arxiv.org/pdf/1706.03762",
"https://www.irs.gov/pub/irs-pdf/fw9.pdf"
],
"outputMode": "document",
"maxPagesPerFile": 2000,
"maxFileSizeMb": 50
}
urls— direct public links (the link must download the PDF, not open a viewer page).outputMode—document(full text in one row) orpage(one row per page).maxPagesPerFile— only the first pages are read beyond this, you control the cost.maxFileSizeMb— size limit per file (1 to 200 MB, default 50).normalizeWhitespace— collapse repeated spaces and blank lines (on by default).
Output example (real result, text shortened)
{
"url": "https://www.irs.gov/pub/irs-pdf/fw9.pdf",
"fileName": "fw9.pdf",
"fileSizeBytes": 140815,
"pageCount": 6,
"pagesExtracted": 6,
"pagesWithText": 6,
"likelyScanned": false,
"charsCount": 37693,
"wordsCount": 6278,
"truncated": false,
"title": "Form W-9 (Rev. March 2024)",
"subject": "Request for Taxpayer Identification Number and Certification",
"creator": "Designer 6.5",
"createdAt": "2024-03-06T13:18:13.000Z",
"pdfVersion": "1.7",
"text": "Form W-9(Rev. March 2024)\nRequest for Taxpayer\nIdentification Number and Certification\n...",
"error": null
}
In page mode each row has page, pageCount, hasText, charsCount, wordsCount, title, author and text.
Honest limits
- No OCR. Scanned PDFs (images of pages) have no text layer. Such pages come back empty, the document is flagged
likelyScanned: true, and those pages are not charged. - Password-protected PDFs, broken links, HTML pages and files over the size limit return a row with an
errormessage and are not charged. - Text comes out in the order stored in the PDF. Multi-column layouts and tables are usually fine line by line, but complex layouts can interleave; table structure is not rebuilt.
- Files are downloaded once and kept only in memory during the run.
Privacy
The PDFs you point to are only read to extract their text, which is stored in your own Apify dataset. Only process documents you are allowed to use.
Pricing
$0.0005 per page with text ($0.50 per 1,000 pages). Empty and scanned pages, and files that fail, are free. Set a maximum charge per run in the Apify console: the Actor never goes over it and delivers exactly the pages paid for (the last file is then marked truncated).