PDF to Text & Markdown – Bulk PDF Extractor with OCR
Pricing
from $0.50 / 1,000 pdf page extracteds
PDF to Text & Markdown – Bulk PDF Extractor with OCR
Extract text or clean Markdown (headings, lists, tables) from PDF URLs in bulk, or from every PDF linked on a web page. Metadata, page ranges, per-page or per-document output, OCR for scanned pages, RAG chunks. Full .md/.txt files saved to the key-value store.
Pricing
from $0.50 / 1,000 pdf page extracteds
Rating
0.0
(0)
Developer
Cemal Atakli
Maintained by CommunityActor stats
0
Bookmarked
3
Total users
2
Monthly active users
7 days ago
Last modified
Categories
Share
Convert PDF to Markdown or plain text in bulk: give a list of PDF URLs, or a web page whose PDFs you want, and you get back clean, LLM-ready text with headings, lists and Markdown tables, plus the PDF metadata (title, author, page count, creation date). Scanned PDFs are read with OCR (Tesseract, 21 languages), and only the pages that need it are OCR'd. You can split output per document, per page or into RAG chunks, and the full .md / .txt file of every PDF is saved for download.
It downloads over plain HTTP, with no browser and no proxy, so it is fast and cheap: $0.0005 per page ($0.50 per 1,000 pages) and $0.005 per OCR page.
What it does
- PDF to Markdown. Headings are detected from font size and weight (
#,##, numbered sections such as3.1→###). Bullets and numbered lists are kept, paragraphs are re-flowed across line breaks, and hyphenated line breaks are joined (repre-sentation→representation, whileend-to-endkeeps its hyphens). Ruled tables become Markdown tables. - PDF to plain text. The text keeps its original line breaks and has a blank line between paragraphs. This is the fastest mode.
- Correct reading order for multi-column layouts (scientific papers, newsletters), using Google's PDFium engine.
- Clean output. Running headers, footers and page numbers ("Form W-9 (Rev. 3-2024) Page 2", "Confidential", "3 of 10") are removed automatically.
- OCR fallback for scanned pages. Pages with no usable text layer (scans, photos, faxes, broken font encodings) are rendered at 300 DPI and read with Tesseract. Mixed PDFs work page by page. OCR can be set to
auto,offorforce. - Metadata:
title,author,subject,keywords,creator,producer,createdAt,modifiedAt(ISO 8601),pageCount,pdfVersion,encryptedandfileSizeBytes. - Page ranges:
1-5,1,3,10-, or-3--1for the last three pages. You only pay for the pages you extract. - Bulk input and PDF discovery. Paste hundreds of PDF URLs, or add web pages (report archives, IR pages, government form lists, documentation) and every linked
.pdfis extracted, with amaxPdfscap, a same-domain filter and a link regex. - Share links work. Google Drive, Dropbox and GitHub
bloblinks and arXiv/abs/pages are converted to direct downloads. - RAG chunking.
chunkSize/chunkOverlap(in characters). Chunks are cut at paragraph, then sentence, then word boundaries, start a new chunk at section headings, and carrypageStart,pageEnd, thesectionheading and a stablechunkId. - Full files saved. Every PDF's complete Markdown or text is stored in the run's key-value store, and each row links to it (
contentFileUrl). - Robust. Each failed PDF becomes a free error row with a clear
errorCode, and the run carries on. Codes includehttp-404,not-a-pdf,too-large,password-required,wrong-password,invalid-pdfandno-pdf-links. Downloads are retried with backoff on timeouts, 429 and 5xx (honouringRetry-After). There is a size limit, and PDFs that only restrict printing or copying open normally. Password-protected PDFs open withpdfPassword.
Use cases
- RAG and LLM pipelines: turn PDF libraries (papers, manuals, policies, contracts, filings) into Markdown chunks with page numbers for your vector database (Pinecone, Weaviate, Qdrant, pgvector), LangChain or LlamaIndex.
- AI agents: let an agent read any PDF URL as Markdown in one tool call (see below).
- Research: bulk-extract arXiv, PubMed or SSRN papers with their metadata.
- Finance and compliance: annual reports, 10-Ks, ESG reports and investor presentations from IR pages.
- Government and legal: forms, regulations, court documents and tenders. Scanned archives become searchable text through OCR.
- Digitising scanned documents: old letters, typewritten reports and archive.org scans.
- Search indexing and content migration: PDF knowledge bases to text for Elasticsearch, Algolia or a CMS.
Input example
{"pdfUrls": ["https://arxiv.org/pdf/1706.03762","https://www.irs.gov/pub/irs-pdf/fw9.pdf"],"pageUrls": ["https://www.irs.gov/forms-instructions"],"maxPdfs": 20,"outputFormat": "markdown","outputMode": "document","pageRange": "","ocrMode": "auto","ocrLanguages": ["eng"],"chunkSize": 1500,"chunkOverlap": 200}
The default input (the "Attention Is All You Need" paper and the IRS W-9 form, 21 pages) finishes in about 10 seconds and costs about $0.01.
| Field | Default | Notes |
|---|---|---|
pdfUrls | 2 sample PDFs | Direct PDF links. Drive, Dropbox, GitHub and arXiv links are fixed automatically |
pageUrls | – | Web pages to scan for PDF links (static HTML) |
maxPdfs / sameDomainOnly / pdfLinkRegex | 50 / false / – | Limits and filters for discovered PDFs |
outputFormat | markdown | markdown or text |
outputMode | document | document, page or chunk (one dataset row each) |
pageRange / maxPagesPerPdf | all / 500 | 1-5, 8, 10-, -3--1 |
removeHeadersFooters | true | Drops running headers, footers and page numbers |
extractTables | true | Ruled tables to Markdown tables |
pageMarkers | false | <!-- page N --> before each page |
ocrMode / ocrLanguages / ocrDpi | auto / eng / 300 | 21 languages: English, German, French, Spanish, Italian, Portuguese, Dutch, Turkish, Polish, Russian, Ukrainian, Czech, Swedish, Romanian, Arabic, Hindi, Chinese, Japanese, Korean, Indonesian and Vietnamese |
chunkSize / chunkOverlap | 0 / 200 | Characters. Chunk mode defaults to 1,500 |
maxCharsPerItem | 100,000 | Dataset field limit. The full text is always in the saved file |
pdfPassword | – | For encrypted PDFs (secret field) |
maxFileSizeMb | 50 | Larger files become a free error row |
Output example
One row per PDF (document mode). The Output tab has PDF documents, Pages, RAG chunks and Errors views, plus links to the saved files and the run summary.
{"type": "document","status": "ok","url": "https://www.irs.gov/pub/irs-pdf/fw9.pdf","fileName": "fw9.pdf","title": "Form W-9 (Rev. March 2024)","author": "SE:W:CAR:MP","subject": "Request for Taxpayer Identification Number and Certification","createdAt": "2024-03-06T13:18:13Z","pdfVersion": "1.7","encrypted": false,"pageCount": 6,"pagesExtracted": 6,"textPages": 6,"ocrPages": 0,"wordCount": 6475,"format": "markdown","content": "Form W-9 (Rev. March 2024)\n\n### Request for Taxpayer Identification Number and Certification\n\n…\n\n| IF the entity/individual on line 1 is a(n) . . . | THEN check the box for . . . |\n| --- | --- |\n| • Corporation | Corporation. |\n…","contentTruncated": false,"contentFileUrl": "https://api.apify.com/v2/key-value-stores/<storeId>/records/0002-fw9.md","extractedAt": "2026-10-04T09:30:58Z"}
pagemode: one row per page withpageNumber,method(text,ocr,empty,needs-ocrorfailed),content,wordCountandtables.chunkmode: one row per chunk withchunkId,chunkIndex,chunkCount,pageStart,pageEnd,sectionandcontent, ready to embed. Indocumentmode withchunkSizeset, the chunks are in achunksarray on the document row.- Errors:
{"type": "error", "url": …, "errorCode": "password-required", "error": "The PDF is password-protected. Set \"PDF password\" to open it."}. Error rows are free. OUTPUTrecord: the run summary (pages charged, OCR pages, scanned pages skipped, errors).
See SAMPLE_OUTPUT.json for real rows: an arXiv paper, the IRS W-9 with a Markdown table, a scanned 1914 letter read by OCR, a 404 error and two RAG chunks.
Pricing
Pay per event. You pay only for pages actually extracted.
| Event | Price |
|---|---|
| Page extracted (text layer, Markdown or text) | $0.0005 ($0.50 / 1,000 pages) |
| Scanned page read with OCR (instead of the above) | $0.005 ($5 / 1,000 pages) |
| Actor start | $0.00005 |
Free: empty pages, scanned pages when OCR is off, pages outside your page range, failed pages, failed downloads, encrypted PDFs without a password, chunks, metadata and saved files.
Compared with other Store Actors (public Store pages, 2026-10-04):
| This Actor | memo23/pdf-text-extractor | automation-lab/pdf-text-extractor | |
|---|---|---|---|
| Price model | $0.0005 / page | $0.005 / PDF | $0.003 / PDF + $0.005 / run |
| OCR for scanned pages | $0.005 / page, 21 languages | $0.015 / page | no OCR |
| Markdown (headings, lists) | yes | yes | no |
| Markdown tables | yes (ruled tables) | no (tables as lines) | no |
| RAG chunks with page numbers | yes | no | no |
| Find PDFs linked on a web page | yes | no | no |
| Page ranges, metadata, encrypted PDFs | yes | yes | metadata |
| 1-page / 10-page / 50-page PDF | $0.0005 / $0.005 / $0.025 | $0.005 / $0.005 / $0.005 | $0.003 each |
| 10 scanned pages | $0.05 | $0.155 | – |
The Actor is cheapest for short documents and for any scanned content. For very long text-only PDFs, use pageRange to pay only for the pages you need.
Set Maximum cost per run on the run options to cap spending. Before each page, the Actor checks that it can still pay for that page. When the budget runs out, it saves what it has, marks the PDF partial and stops cleanly with the status "Stopped early: maximum total charge for this run reached".
FAQ
How good is the Markdown?
It is very good for digital PDFs: papers, reports, forms, manuals and contracts. Headings come from font size and boldness, and tables come from drawn table rules. Tables without ruling lines (common in academic papers) stay as text lines, and math formulas come out as plain text. For the best LLM results, keep removeHeadersFooters on.
How do I know if a PDF was scanned?
ocrPages counts the pages read with OCR. In page mode, method is ocr for each such page. With OCR off, scanned pages are reported as needs-ocr (scannedPagesSkipped) and not charged.
How accurate is OCR?
Tesseract 5 is good on clean printed scans at 300 DPI. Old typewriter text, handwriting and low-resolution faxes give noisy output (see the 1914 letter in SAMPLE_OUTPUT.json). Choose the right ocrLanguages, and use ocrDpi: 400 for very small print.
Can it read password-protected PDFs?
PDFs that only block printing or copying open normally (encrypted: true). PDFs that need a password to open require pdfPassword. Without one, you get a free password-required error row.
Can I upload files instead of URLs? Use any public URL: S3, Google Drive, Dropbox, GitHub, or a record in an Apify key-value store.
Is there a size limit?
maxFileSizeMb defaults to 50 MB and can go up to 500 MB. maxPagesPerPdf defaults to 500. Memory use stays low (about 200 MB for the default run) because pages are processed one at a time. Use 2–4 GB of memory for faster OCR.
Which libraries does it use? Any AGPL?
No AGPL. It uses PDFium via pypdfium2 (Apache-2.0/BSD-3) for text, layout, metadata and rendering, pdfplumber (MIT) for table detection and Tesseract (Apache-2.0) for OCR. PyMuPDF / pymupdf4llm (AGPL) are deliberately not used.
Use with AI agents / Apify MCP
- Apify MCP server: add
gazidev/pdf-text-extractorto Claude Desktop, Cursor, VS Code or any MCP client withhttps://mcp.apify.com?actors=gazidev/pdf-text-extractor. An agent can then call it with{"pdfUrls":["https://example.com/report.pdf"],"pageRange":"1-10"}and read the Markdown directly, scanned pages included. - API (synchronous):
POST https://api.apify.com/v2/acts/gazidev~pdf-text-extractor/run-sync-get-dataset-items?token=…with the input JSON returns the rows in the same HTTP call. This is ideal as a "read PDF" tool for LangChain, LlamaIndex, CrewAI, n8n, Make or Zapier. - RAG ingestion:
"outputMode": "chunk", "chunkSize": 1500, "chunkOverlap": 200returns one row per chunk withchunkId,pageStart/pageEndandsection, ready to embed. Use the Apify Pinecone, Qdrant or Weaviate integrations to load them directly. - Scheduled monitoring: a scheduled Task with
pageUrlspointing at a publications page extracts newly posted PDFs every week.
More from the toolkit
- Website to Markdown: any URL, sitemap or whole website to clean Markdown with RAG chunks and llms.txt. It is the HTML counterpart of this Actor.
- Document & Invoice to JSON: invoices, receipts and DOCX/PDF documents to structured JSON fields (totals, VAT, line items).
- Wayback Machine URL Extractor: find old PDFs a site used to host (
mimeTypes: application/pdf), then extract them here. - Sitemap Extractor: list every URL, including PDFs, from a site's sitemaps.