PDF Text Extractor - PDF to Text & Markdown for LLM/RAG avatar

PDF Text Extractor - PDF to Text & Markdown for LLM/RAG

Pricing

from $1.65 / 1,000 pdf extracteds

Go to Apify Store
PDF Text Extractor - PDF to Text & Markdown for LLM/RAG

PDF Text Extractor - PDF to Text & Markdown for LLM/RAG

Extract text from PDF files by URL, or from all PDFs linked on a web page. Get full text, Markdown per page, title, dates, page count, table of contents and RAG chunks with page numbers. Detects scanned pages. Fast, no browser. Export JSON/CSV or call via API/MCP.

Pricing

from $1.65 / 1,000 pdf extracteds

Rating

0.0

(0)

Developer

Teddy Wasserman

Teddy Wasserman

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Share

What does PDF Text Extractor do?

PDF Text Extractor is a fast PDF to text and PDF to Markdown converter for LLMs, RAG pipelines, search indexes and data extraction. Give it PDF links, or web pages that link to PDFs, and it returns the full text of every PDF, Markdown split by page, the document title, subject, keywords, creation and modification dates, page count and table of contents, and optional RAG chunks that keep their page numbers.

It reads the PDF's text layer with the open-source pypdf library, with no browser and no OCR, so it is cheap and quick: a 59-page IRS publication is done in about 3 seconds. Scanned pages without a text layer are detected and flagged.

Why use PDF Text Extractor?

  • Built for AI pipelines. Markdown with ## Page N headings, clean paragraphs (hyphenated line breaks re-joined) and chunks that carry their page number, so your RAG answers can cite "page 12".
  • Find PDFs for you. Give an investor-relations, publications or downloads page and every linked PDF is extracted. Filter links by words such as annual-report or 2025.
  • Metadata and table of contents. Title, subject, keywords, creator app, dates and the PDF outline (bookmarks) with page numbers.
  • Honest about scans. scannedPages lists pages without a text layer and needsOcr tells you when a whole PDF is an image scan. Those PDFs are free.
  • Pay per PDF, not per megabyte. A flat price per document including 50 pages; long documents add a small per-page fee. Failed downloads, non-PDF links, encrypted and scanned PDFs are free.
  • Polite. robots.txt and crawl-delay are respected; files over your size limit are skipped.

What data can you extract?

FieldExampleDescription
urlhttps://www.irs.gov/pub/irs-pdf/fw9.pdfPDF link
fileNamefw9.pdfFile name
fileSizeKb137.5File size
titleForm W-9 (Rev. March 2024)Title from the PDF metadata
subjectRequest for Taxpayer Identification Number and CertificationSubject metadata
keywordsFillableKeywords metadata
creator / producerDesigner 6.5App that made the PDF
createdAt / modifiedAt2024-03-06T08:18:13Document dates
pageCount6Pages in the PDF
pagesExtracted6Pages read (see maxPagesPerPdf)
wordCount / charCount6519 / 37732Size of the extracted text
outline[{"level": 1, "title": "Introduction", "page": 2}]Table of contents (bookmarks)
markdown## Page 1\n\nForm W-9 …Text with one heading per page
textForm W-9 Request for Taxpayer…Full plain text
pageTexts[{"page": 1, "text": "…"}]Text per page (optional)
chunks[{"index": 0, "page": 1, "text": "…", "chars": 1480}]RAG chunks (optional)
scannedPages[3, 4]Pages without a text layer
needsOcrfalseTrue when no page has a text layer
isEncryptedfalseEncrypted PDF
errorhttp_404, not_a_pdf (text/html), no_text_layerWhy a PDF returned no text (free row)

How to use PDF Text Extractor (step by step)

  1. Click Try for free.
  2. Paste PDF links into PDF URLs, or put a page that links to PDFs into Web pages with PDF links.
  3. Optional: set RAG chunk size, switch on text per page or keep layout for tables, or limit Max pages per PDF.
  4. Click Start.
  5. Open the PDFs view, or download the dataset as JSON, CSV or Excel.

Input example

{
"pdfUrls": [
"https://www.irs.gov/pub/irs-pdf/fw9.pdf",
"https://arxiv.org/pdf/1706.03762"
],
"chunkSize": 1500,
"chunkOverlap": 150
}

Find and extract every W-4 PDF linked on a page:

{
"pageUrls": ["https://www.irs.gov/forms-instructions"],
"pdfLinkContains": ["w-4", "w4"],
"maxPdfs": 10
}

Output example

{
"url": "https://www.irs.gov/pub/irs-pdf/fw9.pdf",
"loadedUrl": "https://www.irs.gov/pub/irs-pdf/fw9.pdf",
"statusCode": 200,
"fileName": "fw9.pdf",
"fileSizeKb": 137.5,
"title": "Form W-9 (Rev. March 2024)",
"subject": "Request for Taxpayer Identification Number and Certification",
"keywords": "Fillable",
"creator": "Designer 6.5",
"producer": "Designer 6.5",
"createdAt": "2024-03-06T08:18:13",
"modifiedAt": "2024-03-06T08:18:13",
"pageCount": 6,
"pagesExtracted": 6,
"wordCount": 6519,
"charCount": 37732,
"scannedPages": [],
"needsOcr": false,
"isEncrypted": false,
"outline": [],
"markdown": "## Page 1\n\nForm W-9\n(Rev. March 2024)\nRequest for Taxpayer\nIdentification Number and Certification …",
"text": "Form W-9\n(Rev. March 2024)\nRequest for Taxpayer …",
"scrapedAt": "2026-10-21T20:10:00Z"
}

How much does it cost?

PDF Text Extractor uses pay-per-event pricing.

EventPrice (Free plan)When it is charged
Actor start$0.0005Once per run
PDF extracted$0.003 ($3 per 1,000 PDFs)One PDF with text, including its first 50 pages
Extra page$0.0001 ($0.10 per 1,000 pages)Each page beyond the first 50 of a PDF

Failed downloads, links that are not PDFs, files over the size limit, encrypted PDFs without the password and scanned PDFs without a text layer are free. Paid Apify plans get Store discounts (Bronze −15%, Silver −30%, Gold and up −45%).

Worked examples (Free plan prices):

  • 1,000 invoices or forms of 1–5 pages: ≈ $3.
  • A 300-page annual report: $0.003 + 250 × $0.0001 ≈ $0.03.
  • All 40 PDFs on an investor-relations page, 80 pages each: 40 × ($0.003 + 30 × $0.0001) ≈ $0.24.
  • The first 10 pages of 5,000 research papers (maxPagesPerPdf: 10): ≈ $15.

Use cases

  • RAG and chatbots. Load manuals, policies, contracts and reports into a vector database with page-aware chunks.
  • Financial research. Pull text from annual reports, 10-Ks, prospectuses and ESG reports linked on investor-relations pages, then search or summarise them.
  • Legal and compliance. Extract terms, regulations and filings to compare versions or feed review tools.
  • Academic research. Read papers in bulk (abstracts, sections via the outline) for literature reviews.
  • Procurement and tenders. Extract the text of tender documents and specifications for keyword alerts.
  • AI agents. Give an agent a tool that turns any PDF link into text it can reason over.

Tips for better results

  • Cheap previews. Set maxPagesPerPdf to 2–5 to read only the cover and summary pages of long reports, then run the full extraction only on the documents you need.
  • Chunk sizes. 1,000–2,000 characters with 10% overlap works well for most embedding models. Chunks never cross a page boundary, so each one cites a single page.
  • Tables. Turn on Keep layout for financial statements and price lists; the text keeps the column positions, which LLMs read much better than run-together numbers.
  • Discovery pages. Use pdfLinkContains to pick only the documents you want from busy download pages (e.g. annual, q3, sustainability).
  • Dates. createdAt and modifiedAt come from the PDF itself and tell you whether a document has changed since your last run.

Use with AI agents, MCP and the API

curl -X POST "https://api.apify.com/v2/acts/teddythebuilder~pdf-text-extractor/run-sync-get-dataset-items?token=<TOKEN>" \
-H "Content-Type: application/json" \
-d '{"pdfUrls":["https://www.irs.gov/pub/irs-pdf/fw9.pdf"]}'

Python with apify-client:

from apify_client import ApifyClient
client = ApifyClient("<TOKEN>")
run = client.actor("teddythebuilder/pdf-text-extractor").call(run_input={
"pdfUrls": ["https://arxiv.org/pdf/1706.03762"],
"chunkSize": 1500,
"chunkOverlap": 150,
})
for pdf in client.dataset(run["defaultDatasetId"]).iterate_items():
for chunk in pdf.get("chunks", []):
print(pdf["title"], "page", chunk["page"], chunk["chars"])

MCP: available as a tool in the Apify MCP server (https://mcp.apify.com) for Claude, ChatGPT, Cursor and other MCP clients.

Integrations

Send results to Google Drive, Google Sheets, Airtable, Slack, Make, Zapier, n8n, LangChain, LlamaIndex or a webhook when a run finishes.

Data source and legality

The actor downloads the PDF files you point it to (or that are linked on the pages you give) over HTTP, after checking each site's robots.txt. It does not log in, bypass paywalls or break DRM; encrypted PDFs are only opened with a password you provide. Text is extracted with pypdf (BSD licence).

You are responsible for the documents you process: copyright, confidentiality and data-protection rules apply to their content, which can include names and contact details.

FAQ

Does it do OCR on scanned PDFs? No. It reads the text layer, which almost all digitally created PDFs have. Scanned pages are listed in scannedPages; a PDF that is entirely scanned returns a free row with needsOcr: true.

How good is the text for tables and multi-column layouts? The default mode follows the natural reading order. Switch on Keep layout to keep table columns aligned with spaces.

What is the maximum file size? 50 MB by default, up to 200 MB with maxFileSizeMb. Raise the memory for very large files.

Which links count as PDF links on a web page? Links ending in .pdf, containing /pdf/ or format=pdf. Every candidate is checked for the %PDF signature before parsing, and non-PDFs are free.

Can it read password-protected PDFs? Yes, if you provide the password in PDF password. Without it, encrypted PDFs return a free error row.

Can I upload my own files? Use a public or pre-signed link (Google Drive direct link, S3, Dropbox ?dl=1, an Apify key-value store record URL).

A PDF extracts badly. Open an issue with the link. We reply within 24 hours. If the actor helps you, a rating on the Store page helps others find it.

Changelog and support

  • 1.0 (October 2026): first release. PDF URLs and PDF link discovery on web pages, text and Markdown per page, metadata and outline, page-aware RAG chunks, scanned-page detection, password support, free error rows.

Questions or feature requests? Open an issue on the actor page. We reply within 24 hours.