PDF to Text Extractor - PDF Parser, PDF to Markdown & OCR avatar

PDF to Text Extractor - PDF Parser, PDF to Markdown & OCR

Pricing

from $5.00 / 1,000 pdf extracteds

Go to Apify Store
PDF to Text Extractor - PDF Parser, PDF to Markdown & OCR

PDF to Text Extractor - PDF Parser, PDF to Markdown & OCR

Extract text from PDF URLs, uploads or base64 with this PDF extractor: Markdown, tables, OCR in 126 languages and proxy fallback. Follows article and landing pages to PDFs via citation metadata, alternate links or arXiv patterns. One resolution hop; unresolved HTML has no extraction charge.

Pricing

from $5.00 / 1,000 pdf extracteds

Rating

0.0

(0)

Developer

Hojun Lee

Hojun Lee

Maintained by Community

Actor stats

0

Bookmarked

308

Total users

32

Monthly active users

20 hours

Issues response

3 days ago

Last modified

Features

Limited permissions

Share

PDF to Text Extractor — PDF Parser, PDF to Markdown, RAG Chunks

Extract text from PDF URLs or base64 files with a PDF extractor that returns page text, PDF to Markdown, or RAG chunks. Enable OCR for scanned pages; native-text PDFs work without it.

Downloads go direct first and fall back to Apify Proxy on their own when a host blocks them (no extra charge). Five PDFs run in parallel by default, files up to 100 MB are accepted, very long output is split into parts under the 9 MB dataset item limit, and a run that reaches its time limit still delivers the pages it has read (status: "partial", billed only for those pages).

Quick start

This public one-page PDF finishes in a few seconds:

{"urls":["https://pdfobject.com/pdf/sample.pdf"],"outputFormat":"per_page","maxPages":1}

One dataset item from this input (text truncated here; a summary row per PDF follows the page rows):

{"_type": "page", "url": "https://pdfobject.com/pdf/sample.pdf", "url_index": 0, "page": 1, "page_count": 1, "char_count": 2878, "word_count": 416, "text": "Sample PDF\nThis is a simple PDF file. Fun fun fun.\nLorem ipsum dolor sit amet, ...", "table_count": 0, "ocr_applied": false}

_type identifies the record as a page. page and page_count locate it in the PDF. text is extracted text; char_count and word_count describe it. table_count counts detected tables, and ocr_applied reports whether OCR was used. Text layout and counts can vary slightly by parser version.

Bank & card statement ledger (beta)

Set statementLedger: true to add a ledger object to extracted PDF rows. The actor first reads detected tables, then tries text lines when no table rows are recognized. Rows include date, description, debit, credit, signed amount, and balance; balance_check counts consecutive balance mismatches, and confidence is high, medium, or low. Missing or ambiguous fields remain null or raw. This is a bank-agnostic beta, not a claim of support for any particular bank or card format. The flag is off by default and adds no billing event.

Limits

The URL must return a readable PDF. Password-protected files need the password input; wrong passwords, corrupt files, oversized files, and blocked downloads produce errors. Scanned pages need enableOcr: true for text recognition. maxPages defaults to 100 and maxPdfMb to 100.

Reliability on hard PDFs (v1.13)

  • Automatic proxy fallback. Each PDF is downloaded directly first. If the host answers HTTP 401, 403, 407 or 429, or the connection fails, the download is retried once through Apify Proxy. The retry adds no charge event. The summary row's fetched_via says direct, proxy_fallback, proxy (your own proxyConfiguration) or base64. Set proxyFallback: false to turn it off. A 404 or other error is not retried.
  • Oversize split. Apify rejects dataset items over 9 MB. A document, markdown or page row that would exceed about 8 MB is split into several rows that share a documentId and carry part and partCount (1-based) plus part_char_count. Join the text (or markdown) of the parts in part order to get the whole document. Document totals such as char_count are kept on every part; tables and ledger are on part 1. Rows that fit carry part: 1, partCount: 1. Splitting does not change billing.
  • Partial results on the run deadline. When the run is close to its time limit, the actor stops reading pages and delivers what it has read. Those rows and the summary have status: "partial" (otherwise "complete"), the summary has pages_not_reached, and only the delivered pages are charged; the per-PDF pdf-extracted fee is waived. A partial PDF does not update the changeDetection baseline (changed is null) and sends no webhook. PDFs that have not started are skipped with an uncharged error row, as before. The SUMMARY record counts partial PDFs in pdfs_partial.
  • Parallel PDFs within memory. maxConcurrency defaults to 5. The actor lowers it when that many PDFs of maxPdfMb would not fit in the run's memory (about 256 MB plus 3 × maxPdfMb per PDF; at the default 2 GB and 100 MB, 5 fit).

Pricing

Pay-per-event — you pay only for what is extracted:

EventPrice
Actor start (charged by Apify, one per GB of run memory)$0.001
PDF successfully extracted$0.02
Page extracted$0.001

Not charged: failed PDFs (download error, wrong/missing password, corrupt file — you get an ok: false row), pages that fail or time out, pages dropped by skipEmptyPages, the proxy-fallback retry, and the per-PDF fee of a PDF cut short by the run time limit (status: "partial"). OCR and output format add no fee: each physical page is billed once in per_page, combined, both, markdown or rag_chunks.

Example: one 80-page native-text PDF at 1 GB = $0.001 + $0.02 + 80 × $0.001 = $0.101.

Use from AI agents (MCP)

Connect your agent to Apify's official MCP server with an Apify token. Select the Actor tool gochujang/pdf-text-extractor, pass the Quick start JSON as input, then retrieve its dataset items through the MCP server. No separate gateway is needed.


⭐ If this saves you time, a quick review on the Store page helps others find it.


⚡ Run in 30 seconds

Paste any PDF URL — direct links, Google Drive, or Dropbox — and click Start:

# Direct PDF URL
https://www.irs.gov/pub/irs-pdf/f1040.pdf
# Google Drive share link (auto-resolved)
https://drive.google.com/file/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgVE2upms/view
# Dropbox share link (auto-resolved)
https://www.dropbox.com/s/abc123/report.pdf?dl=0
# SharePoint / OneDrive share link (auto-resolved)
https://company.sharepoint.com/:b:/s/team/EaBcD...view.aspx

Default output is rich Markdown — headings, lists, tables, code blocks auto-detected. Switch to rag_chunks mode to get overlapping text windows ready to embed into Pinecone, Weaviate, Chroma, Qdrant, or any vector DB.


Why this PDF scraper?

Free PDF extractors give you raw text dumps. This actor goes further:

FeatureFree alternativesThis actor
RAG chunks (configurable overlap)❌✅
SharePoint / OneDrive URL resolution❌✅
Table extraction (2D arrays)❌✅
PDF type classification (text vs scanned)❌✅
Password-protected PDFs❌✅
Auto-OCR for scanned pagesPartial✅ Full
Skip empty pages option❌✅
Batch 50 PDFs in one runPartial✅
Page range expressions (1-3,7,10-)❌✅
Upload a PDF file from your computer❌✅
Parallel PDFs (maxConcurrency, 5 by default)❌✅
Automatic proxy fallback on 401/403/407/429❌✅
Oversize output split into parts (documentId, partCount)❌✅
Partial results when the run times out, billed per delivered page❌✅
Per-PDF timeout (one slow PDF fails alone)❌✅
OCR page cap per PDF (time/cost control)❌✅
Webhook / Telegram alerts❌✅

Python API example

from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
# Extract text from a single PDF
run = client.actor("gochujang/pdf-text-extractor").call(run_input={
"url": "https://www.sec.gov/Archives/edgar/data/320193/aapl-10k.pdf",
"outputFormat": "markdown",
})
items = list(client.dataset(run["defaultDatasetId"]).iterate_items())
markdown_doc = next(i for i in items if i["_type"] == "markdown")
print(markdown_doc["markdown"][:500])
# Batch: extract tables from 10 SEC filings at once
run = client.actor("gochujang/pdf-text-extractor").call(run_input={
"urls": [
"https://www.sec.gov/Archives/edgar/data/320193/aapl-10k.pdf",
"https://www.sec.gov/Archives/edgar/data/789019/msft-10k.pdf",
],
"extractTables": True,
"outputFormat": "per_page",
"maxPages": 200,
})
pages = list(client.dataset(run["defaultDatasetId"]).iterate_items())
# RAG pipeline: extract + chunk + embed
run = client.actor("gochujang/pdf-text-extractor").call(run_input={
"url": "https://example.com/whitepaper.pdf",
"outputFormat": "rag_chunks",
"chunkSize": 1000,
"chunkOverlap": 200,
})
chunks = [i for i in client.dataset(run["defaultDatasetId"]).iterate_items()
if i["_type"] == "chunk"]
# chunks are ready to embed into Pinecone/Weaviate/Chroma

Use cases

  1. AI / LLM pipelines — Convert PDF to text for ChatGPT, Claude, Gemini, or RAG vector search. One call returns clean chunks ready for embedding.
  2. SEC filings — Pull text + tables from 10-K, 10-Q, 8-K in batch. Combine with our SEC EDGAR Tracker.
  3. Research aggregation — Build a searchable database of academic papers + abstracts from arXiv or PubMed PDFs.
  4. Financial reports — Auto-extract earnings tables from quarterly releases; pipe into spreadsheets or databases.
  5. Legal documents — Contracts, court filings, regulatory submissions — extract and index at scale.
  6. Invoice & receipt parsing — Extract line items and totals from PDF invoices without manual data entry.
  7. Government records — FOIA responses, regulatory filings, public data PDFs — download and parse in bulk.
  8. Scanned document digitization — Bank statements, old reports, image PDFs via OCR. Enable enableOcr and get text even from image-only PDFs.
  9. Compliance audit — Index every PDF in your corporate document store; feed into your search or compliance tools.

What you get

Summary row (one per PDF)

{
"_type": "summary",
"url": "https://www.sec.gov/Archives/.../aapl-10k.pdf",
"ok": true,
"page_count": 80,
"pages_extracted": 80,
"title": "Apple Inc. — Annual Report 2024",
"author": "Apple Inc.",
"created": "D:20240928081300Z",
"createdAt": "2024-09-28T08:13:00+00:00",
"modifiedAt": "2024-09-28T08:13:00+00:00",
"text_preview": "UNITED STATES SECURITIES AND EXCHANGE COMMISSION...",
"file_size_kb": 4820,
"documentId": "3f9a1c0be2d47a65",
"status": "complete",
"extractedPageCount": 80,
"fetched_via": "direct",
"ocr": {"enabled": false, "pagesOcred": 0, "language": "eng", "capped": false}
}

extractedPageCount counts pages read without an error or timeout. ocr summarises OCR for the PDF: enabled (the enableOcr input, when OCR is installed), pagesOcred (pages whose text came from OCR, including automatic OCR of scanned pages), language and capped (ocrMaxPagesPerPdf stopped OCR). createdAt and modifiedAt are the PDF's dates in ISO 8601 (null when the PDF has none or they cannot be read); the raw created and modified values are kept.

Per-page row

{
"_type": "page",
"url": "https://...",
"page": 12,
"page_count": 80,
"char_count": 3210,
"word_count": 524,
"text": "Item 1A. Risk Factors\n\nOur business...",
"tables": [
[
["Revenue", "Q1 2024", "Q4 2023"],
["iPhone", "$45.96B", "$43.81B"],
["Mac", "$9.66B", "$7.61B"]
]
],
"table_count": 1,
"ocr_applied": false
}

Input Parameters

ParameterTypeDefaultDescription
urlsarray—List of PDF URLs to extract (batch mode)
urlsTextstring—Paste multiple PDF URLs, one per line — merged with urls
urlstring—Single PDF URL (used when urls is empty)
pdfFilestring (file upload)—Upload a PDF in the Console; Apify passes the stored file's URL. Processed with any URLs above
changeDetectionbooleanfalseHash each PDF's text and compare to the previous run — adds changed + content_hash to every record. Ideal for scheduled monitoring
webhookUrlstring—POST a JSON alert to this URL when a PDF changes (requires changeDetection=true). Works with Slack, Discord, Make, Zapier, n8n
changedOnlybooleanfalseOnly output records for PDFs that changed (requires changeDetection=true). Scheduled runs produce zero records when nothing changed
outputFormatstringmarkdownmarkdown (LLM-ready), per_page, combined, both, or rag_chunks
extractTablesbooleanfalseDetect and extract tables as 2D arrays
statementLedgerbooleanfalseParse a bank or card statement into a best-effort transaction ledger (beta)
extractImagesbooleanfalseAdd image_count field to each page
skipEmptyPagesbooleanfalseSkip pages with no extractable text (useful for scanned PDFs with mixed pages)
enableOcrbooleanfalseEnable OCR for scanned pages (pages with < 50 chars auto-detected)
ocrLanguagestringengAny of the 126 tessdata_fast language codes (eng, deu, ara, rus, hin ...), or combined with +: eng+ara
ocrMaxPagesPerPdfinteger0Stop OCR after this many pages per PDF (0 = no cap). The summary row gets ocr_capped, ocr_pages_skipped and ocr_note; capped page rows get ocr_skipped
startPageinteger1First page to extract (1-indexed)
endPageinteger—Last page to extract (inclusive)
maxPagesinteger100Max pages per PDF from startPage
pageRangestring—Pages to extract, e.g. 1-3,7,10- (10- = page 10 to the end). Replaces startPage/endPage/maxPages/firstNPages/lastNPages when set. An invalid expression returns one error row and nothing is charged
maxConcurrencyinteger5PDFs processed at the same time (1–10), lowered automatically to fit the run's memory. 1 keeps input order
maxPdfMbinteger100Reject PDFs larger than this (1–500 MB)
timeoutPerPdfSecsinteger0Per-PDF time limit for download plus extraction (0 = none). A PDF that runs over gets an error row and the run continues. Rows already delivered for that PDF stay in the dataset
passwordstring—Password for password-protected / encrypted PDFs
userAgentstring—Custom User-Agent for the HTTP request
proxyFallbackbooleantrueRetry a direct download once through Apify Proxy after HTTP 401/403/407/429 or a connection failure. No extra charge. Ignored when proxyConfiguration is set
proxyConfigurationobject—Proxy for every download. Usually not needed thanks to proxyFallback; set it (residential recommended) for hosts that also block the fallback

Input examples

Single PDF

{
"url": "https://www.example.com/whitepaper.pdf"
}

Batch of 10-K filings from SEC

{
"urls": [
"https://www.sec.gov/Archives/edgar/data/320193/aapl-10k.pdf",
"https://www.sec.gov/Archives/edgar/data/789019/msft-10k.pdf"
],
"extractTables": true,
"maxPages": 200
}

Text-only (skip tables for speed)

{
"url": "https://...",
"extractTables": false
}

Skip blank/empty pages

{
"url": "https://example.com/mixed-scanned.pdf",
"skipEmptyPages": true,
"enableOcr": true
}

Monitor PDF Changes Automatically

Turn this actor into a zero-maintenance document monitor in three steps:

  1. Enable changeDetection: true
  2. Set webhookUrl to your Slack / Make / Zapier / n8n webhook
  3. Schedule to run daily at 8am

You get notified the moment your document updates — and zero records when nothing changed.

{
"urls": ["https://example.com/policy.pdf"],
"changeDetection": true,
"changedOnly": true,
"webhookUrl": "https://hooks.slack.com/services/T.../B.../..."
}

Scheduling & change detection (monitor a PDF for updates)

Set changeDetection: true to turn this actor into a document monitor. On every run it hashes the extracted text of each PDF, stores the hash in the Actor's Key-Value Store, and compares it against the previous run. Every output record gains two fields:

  • changed — true if the PDF's text differs from the last run, false if identical, null if detection is disabled or the fetch failed. The first run is always changed: true (no prior hash to compare).
  • content_hash — the MD5 of the extracted text, so you can diff or dedupe downstream.

This lets you schedule the actor (e.g. weekly) and only act when something actually changes — trigger a webhook, re-index a vector store, or send an alert.

Example: monitor a regulatory PDF weekly

{
"urls": [
"https://www.sec.gov/files/rules/final/2024/33-11275.pdf"
],
"changeDetection": true,
"outputFormat": "markdown"
}

Then schedule it with a weekly cron (0 9 * * 1). Downstream, only react to records where changed is true:

from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("gochujang/pdf-text-extractor").call(run_input={
"urls": ["https://www.sec.gov/files/rules/final/2024/33-11275.pdf"],
"changeDetection": True,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
if item.get("_type") == "summary" and item.get("changed"):
print(f"PDF changed! {item['url']} (hash {item['content_hash'][:8]})")
# → fire your webhook / re-embed / notify here

Change detection persists hashes in the Actor's named Key-Value Store, keyed per URL. Runs of the same actor share that store, so scheduled runs compare against each other automatically — no extra setup.


Webhook alerts (Slack / Discord / Make / Zapier / n8n)

Add webhookUrl to get an instant HTTP notification whenever a PDF changes. Works with any service that accepts POST JSON.

{
"urls": ["https://www.sec.gov/files/rules/final/2024/33-11275.pdf"],
"changeDetection": true,
"webhookUrl": "https://hooks.slack.com/services/T.../B.../...",
"changedOnly": true
}

Webhook payload (POST, application/json):

{
"event": "pdf_changed",
"url": "https://www.sec.gov/files/rules/final/2024/33-11275.pdf",
"content_hash": "a3f8c2...",
"page_count": 42,
"word_count": 18340,
"title": "Final Rule Release No. 33-11275",
"detected_at": "2024-10-15T09:00:12Z"
}

changedOnly mode

Set changedOnly: true (requires changeDetection: true) to suppress all output for unchanged PDFs. Your scheduled dataset is empty when nothing changed — no downstream filtering needed.

{
"urls": [
"https://example.com/report-q3.pdf",
"https://example.com/policy-v2.pdf"
],
"changeDetection": true,
"changedOnly": true,
"outputFormat": "markdown"
}

If neither PDF changed since the last run, the dataset is empty. Only the changed one produces records.


n8n workflow (copy and paste)

Every day at 07:00, extracts the PDF as Markdown and returns a row only when the file changed. Copy the JSON below, then paste it onto an empty n8n canvas (Ctrl+V). In the Run Actor node, create a Header Auth credential with name Authorization and value Bearer <your Apify token>. Each run returns the dataset rows as n8n items, ready for Google Sheets, Slack, Notion or a database node.

{
"name": "Daily PDF text extraction",
"nodes": [
{
"parameters": {
"rule": {
"interval": [
{
"field": "cronExpression",
"expression": "0 7 * * *"
}
]
}
},
"name": "Schedule",
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.2,
"position": [
0,
0
]
},
{
"parameters": {
"method": "POST",
"url": "https://api.apify.com/v2/acts/gochujang~pdf-text-extractor/run-sync-get-dataset-items",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "{\"urls\": [\"https://www.sec.gov/files/rules/final/2024/33-11275.pdf\"], \"changeDetection\": true, \"changedOnly\": true, \"outputFormat\": \"markdown\"}",
"options": {
"timeout": 300000
}
},
"name": "Run Actor",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
240,
0
]
}
],
"connections": {
"Schedule": {
"main": [
[
{
"node": "Run Actor",
"type": "main",
"index": 0
}
]
]
}
}
}

Make and Zapier work the same way: an HTTP POST to the URL in the node, with the same header and JSON body.

RAG-Ready Chunking (LangChain / LlamaIndex / Vector DB)

Use outputFormat: "rag_chunks" to get overlapping text chunks ready to embed into Pinecone, Weaviate, Chroma, Qdrant, or any vector database:

{
"url": "https://example.com/whitepaper.pdf",
"outputFormat": "rag_chunks",
"chunkSize": 1000,
"chunkOverlap": 200
}

Each chunk row includes context metadata for retrieval:

{
"_type": "chunk",
"chunk_index": 3,
"total_chunks": 47,
"text": "...overlapping window of text...",
"doc_title": "Whitepaper Title",
"doc_author": "Author Name",
"doc_page_count": 24,
"pdf_type": "text_based"
}

LangChain integration

from apify_client import ApifyClient
from langchain.schema import Document
from langchain_openai import OpenAIEmbeddings
from langchain_community.vectorstores import Chroma
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("gochujang/pdf-text-extractor").call(run_input={
"urls": ["https://example.com/report.pdf"],
"outputFormat": "rag_chunks",
"chunkSize": 1000,
"chunkOverlap": 200,
})
chunks = list(client.dataset(run["defaultDatasetId"]).iterate_items())
docs = [Document(page_content=c["text"], metadata={"title": c["doc_title"], "chunk": c["chunk_index"]})
for c in chunks if c.get("_type") == "chunk"]
vectorstore = Chroma.from_documents(docs, OpenAIEmbeddings())

LlamaIndex integration

from apify_client import ApifyClient
from llama_index.core import VectorStoreIndex
from llama_index.core.schema import TextNode
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("gochujang/pdf-text-extractor").call(run_input={
"urls": ["https://example.com/report.pdf"],
"outputFormat": "rag_chunks",
})
chunks = list(client.dataset(run["defaultDatasetId"]).iterate_items())
nodes = [TextNode(text=c["text"], metadata={"title": c.get("doc_title",""), "chunk_index": c.get("chunk_index",0)})
for c in chunks if c.get("_type") == "chunk"]
index = VectorStoreIndex(nodes)
query_engine = index.as_query_engine()

No post-processing needed — chunks are word-boundary aligned, non-empty, and sized for typical embedding models (512–2048 tokens).


OCR for Scanned PDFs

Enable enableOcr: true to handle scanned or image-based PDFs (bank statements, legal filings, old reports). The actor automatically detects pages with little extractable text and falls back to Tesseract OCR.

{
"url": "https://example.com/scanned-report.pdf",
"enableOcr": true,
"ocrLanguage": "eng"
}

Each page row includes "ocr_applied": true when OCR was used, so you can distinguish native-text pages from OCR-processed ones.

Supported languages: all 126 tessdata_fast language codes, e.g. eng (English), deu (German), ara (Arabic), rus (Russian), hin (Hindi), chi_tra (Chinese Traditional). Multi-language: "eng+ara".

eng, deu, fra, spa, kor, jpn and chi_sim are built into the image. Any other pack is downloaded once per run (a few seconds, bounded by a 60 s timeout and the run time limit). An unknown code or a failed download gives one free row (url: "language:<code>", ok: false); OCR continues with the remaining codes (or eng), and every PDF is still processed.


FAQ

Does it support password-protected PDFs? Yes. Set the password input field to unlock them. Wrong password returns a clear error.

What is the maximum PDF file size? 100 MB by default. You can raise this up to 500 MB via the maxPdfMb input parameter. Output longer than about 8 MB is split into part rows that share a documentId.

Can it handle scanned PDFs (image-only)? Yes — enable enableOcr: true. Tesseract OCR is built in, supporting 126 languages.

Does it extract tables? Yes. Set extractTables: true to get tables as 2D arrays (rows × columns) per page. Tables are also rendered as Markdown tables in markdown output mode.

Can I extract only specific pages? Yes — use startPage / endPage for a fixed range, or maxPages to cap the total. All are 1-indexed.

What PDF sources are supported? Direct PDF URLs, Google Drive share links, Dropbox links, SharePoint / OneDrive links — all auto-resolved. Any publicly accessible PDF URL works.

How do I skip pages with no text? Set skipEmptyPages: true. Useful for mixed PDFs where some pages are blank or image-only.

Is it safe to use for confidential PDFs? Apify runs in isolated containers. PDFs are downloaded to memory, processed, and discarded after the run — they are not stored persistently.

The PDF fails to download with HTTP 403. Since v1.11, a 403 from a bot-protected CDN is retried once with a browser TLS fingerprint. The run log says whether an Apify Proxy is in use without exposing proxy credentials. Since v1.13, a 401/403/407/429 or a connection failure is also retried once through Apify Proxy (proxyFallback, on by default, no extra charge). If the host blocks that too, set proxyConfiguration (residential group recommended), or use another public PDF host.

What happens if the run times out in the middle of a PDF? Since v1.13 the pages read so far are delivered with status: "partial", and only those pages are charged (no per-PDF fee). Raise the run timeout or lower maxPages to get the rest.

A large PDF fails with no error message. Fixed in v1.10 — pdfplumber used to retain every parsed page's internal cache for the life of the run, so memory grew ~10MB/page and large or table-heavy PDFs (200+ pages) could exceed the Actor's memory limit and get killed before any error was logged. The Actor now re-opens its internal PDF handle periodically to keep memory flat regardless of page count.


Data engine

  • pdf-inspector (Rust) — blazing fast (~150ms), smart layout detection, Markdown output
  • pdfplumber v0.11+ — Pure-Python fallback for complex layouts, table extraction
  • Tesseract OCR — built-in fallback for scanned/image PDFs, 126 languages supported

Run it on a schedule / from your pipeline

1. Apify Schedule. Apify Console → Schedules → + New schedule, pick PDF Text Extractor, set a cron such as 0 6 * * 1-5 (weekdays 06:00 UTC) and paste this input:

{
"urls": [
"https://example.com/reports/invoice-001.pdf",
"https://example.com/reports/invoice-002.pdf"
],
"outputFormat": "markdown",
"changeDetection": true,
"changedOnly": true
}

2. API call from your pipeline. Run the actor and get the dataset items back in a single request:

curl -X POST "https://api.apify.com/v2/acts/gochujang~pdf-text-extractor/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>" \
-H "Content-Type: application/json" \
-d @input.json

input.json holds the same JSON as above. Synchronous runs wait up to 300 seconds; for bigger batches call POST /v2/acts/gochujang~pdf-text-extractor/runs and read the dataset when the run finishes.

3. Webhooks. For new-file triggers, have your storage or automation tool (S3 event, Zapier, Make, n8n) call the API above whenever a file arrives, and add an Apify webhook on ACTOR.RUN.SUCCEEDED (Actor → Integrations) to push the results to your system as soon as the run finishes.

Works great with

Building a document pipeline? These actors work alongside this one:



Feedback

A short review helps researchers / analysts find it: Leave a review on Apify Store

Keywords: PDF extractor, PDF parser, PDF to text, PDF to markdown, RAG, table extraction, PDF scraper, document processing, OCR

Article and landing page URLs

Supply a PDF URL or a paper/article landing page. The actor follows HTTP redirects (including DOI redirects), then resolves a PDF from citation_pdf_url metadata, an alternate link with type="application/pdf", or an arXiv /abs/ → /pdf/ pattern, in that order. It follows at most one resolution hop, plus redirects. Both responses use the PDF size cap and share the download time budget. HTML is parsed only for link attributes; scripts and markup are never executed or emitted.

Output rows include sourceUrl (the input), resolvedPdfUrl (the final fetched URL or attempted target on failure), and resolvedVia (citation_pdf_url, link_alternate, pattern, or none for direct PDFs). If the page has no supported link, is empty, or its resolved link returns HTML again, the actor emits one error row with errorCode: "NOT_A_PDF" and a reason, with no pdf-extracted or page-extracted charge. HTTP, size, and timeout failures also remain uncharged.

Discovered PDF links and every redirect in their HEAD/GET chain must resolve entirely to public IP addresses. Requests connect to a validated IP while preserving the original HTTP Host and TLS hostname, preventing DNS rebinding. Unsafe destinations and failed DNS validation produce an uncharged NOT_A_PDF error. Discovered-link downloads require a direct connection: explicit proxy use is rejected, ambient proxies are disabled, and browser-TLS fallback is disabled for discovered targets. Direct caller-supplied PDF URLs retain their existing explicit proxy and browser-TLS support.