PDF Text Extractor: PDF to Text, Tables & Metadata API avatar

PDF Text Extractor: PDF to Text, Tables & Metadata API

Pricing

from $2.00 / 1,000 pdf processeds

Go to Apify Store
PDF Text Extractor: PDF to Text, Tables & Metadata API

PDF Text Extractor: PDF to Text, Tables & Metadata API

Convert PDF URLs to clean text, page by page, with tables as Markdown and document metadata (title, author, dates, page count). Built for RAG, LLM and search pipelines. Scanned pages are flagged and never charged. $2 per 1,000 PDFs + $0.20 per 1,000 pages.

Pricing

from $2.00 / 1,000 pdf processeds

Rating

0.0

(0)

Developer

saad hazz

saad hazz

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

4 days ago

Last modified

Share

PDF Text Extractor: Convert PDF to Text, Tables & Metadata (API for RAG & LLMs)

Send PDF URLs, get back clean text page by page, plus tables as Markdown and document metadata (title, author, creation date, page count, PDF version). It's built for RAG pipelines, LLM ingestion, search indexing and document automation. You pay only for pages that actually contain text: scanned or blank pages are flagged and never charged.

Features

  • Accurate text extraction. Spacing adapts to font size, so tightly kerned PDFs such as LaTeX papers come out as readable words instead of wordsruntogether.
  • Per-page output. Each page includes its text, character and word counts and a needsOcr flag, which makes chunking for embeddings straightforward.
  • Tables as Markdown (optional). Ruled tables are detected per page and returned as GitHub-flavored Markdown that LLMs read well.
  • Metadata. Title, author, subject, keywords, creator, producer, creation and modification dates (ISO 8601), PDF version, encryption status, page count, file size and SHA-256 (useful for deduplication).
  • Handles real-world inputs. Redirects are followed, files over your size cap are skipped, non-PDF responses are caught by checking the %PDF header, and password-protected PDFs are supported if you supply the password.
  • Very large documents. If the text would exceed Apify's dataset item limit, the full text goes to the key-value store and the row tells you the key (fullTextKey).
  • Fair billing. Failed downloads, 404s, non-PDFs and corrupt files are free and listed in the FAILED_DOCUMENTS record.

Input

FieldDescription
urlsDirect PDF links. You can also upload a text file of URLs.
includePagesAdds a pages array with per-page text (default on). The full text is always in text.
extractTablesReturns detected tables as Markdown (default off).
maxPagesPerPdfOnly processes the first N pages of each PDF (default 1000).
maxFileSizeMbSkips files larger than this (default 50 MB).
passwordPassword for encrypted PDFs. Optional.
maxConcurrencyMaximum parallel downloads.

Output example

{
"url": "https://www.irs.gov/pub/irs-pdf/fw9.pdf",
"fileName": "fw9.pdf",
"fileSizeBytes": 140815,
"title": "Form W-9 (Rev. March 2024)",
"creationDate": "2024-03-06T08:18:13Z",
"pdfVersion": "1.7",
"pageCount": 6,
"pagesWithText": 6,
"pagesNeedingOcr": 0,
"wordCount": 6279,
"text": "Form W-9\nRequest for Taxpayer\n(Rev. March 2024) Identification Number and Certification ...",
"pages": [
{ "pageNumber": 1, "text": "...", "charCount": 5659, "wordCount": 933, "needsOcr": false, "tables": ["| 3a Check the appropriate box ... |\n| --- |\n..."] }
],
"tablesFound": 4,
"extractedAt": "2026-10-06T17:45:00Z"
}

Pricing (pay per event)

EventPrice
PDF processed (downloaded, parsed, saved)$0.002 ($2 per 1,000 PDFs)
Page with text$0.0002 ($0.20 per 1,000 pages)
Scanned/blank page, failed download, non-PDFfree

For example, 1,000 ten-page reports cost about $4. Set Max total charge in the run options and the Actor will respect it exactly: if the budget runs out partway through a document, it stops at the last page you can afford and tells you so in note.

Scanned PDFs (OCR)

This version extracts the PDF's text layer, which covers almost all digitally created PDFs (reports, invoices, filings, papers, forms). Image-only pages are marked needsOcr: true and are not billed, so you can send just those to an OCR service. Built-in OCR is on the roadmap.

Use with LangChain, LlamaIndex & vector databases

Use the pages array as pre-split chunks with page numbers for citations, or split text yourself. You can call the Actor from Python or JavaScript with the Apify client, from Make, Zapier or n8n, or through the Apify MCP server from AI agents.

The Actor downloads only the URLs you provide, with no crawling. You are responsible for having the right to process the documents you submit (for example your own files, public-domain government forms, or openly licensed papers). No data is kept beyond your run's storage.

FAQ

Can it read password-protected PDFs? Yes, if you supply the password. Without it, the file is reported in FAILED_DOCUMENTS and you are not charged.

Does it keep the layout? Text follows reading order, line by line. Tables come out as Markdown when extractTables is on.

Can I send files from Google Drive or Dropbox? Yes, as long as the link is a direct download link that returns the PDF itself.

More data APIs from the same developer

  • Job Search API: Career Site Jobs: search 400k+ jobs from 13,000+ company career sites (Greenhouse, Lever, Ashby, Workable…) by title, country and remote, with new-job alerts. $2 / 1,000 jobs.
  • ATS Jobs API: every open job from a list of companies on Greenhouse, Lever, Ashby, SmartRecruiters or Recruitee, in one schema. $1 / 1,000 jobs.
  • Remote Jobs API: remote and work-from-home jobs from Remote OK, Himalayas, Jobicy and Arbeitnow, deduplicated. $1 / 1,000 jobs.
  • Bulk WHOIS & RDAP Lookup: domain expiry dates, registrar, age, status, nameservers, MX/SPF/DMARC for thousands of domains. $1 / 1,000 domains.
  • Sitemap URL Extractor: every URL a website lists in its XML sitemaps, with lastmod, hreflang and optional HTTP status. $0.40 / 1,000 URLs.
  • SEC EDGAR Filings Monitor: new 8-K, 10-Q, 10-K and Form 4 filings for a list of tickers from the official SEC API.

Found a bug or need a field? Open an issue on the Issues tab; Issues are checked daily.