PDF Text Extractor — PDF to Text & Markdown, with OCR
Pricing
from $0.50 / 1,000 page read from the pdf's own texts
PDF Text Extractor — PDF to Text & Markdown, with OCR
PDF to text API: extract the full text of PDFs as plain text and Markdown, one row per PDF with title, author, page count and dates. A parser that reads each page's own text and OCRs scanned pages. Drive, Dropbox and dataset links. Export to JSON, CSV or Excel, or via API.
Pricing
from $0.50 / 1,000 page read from the pdf's own texts
Rating
0.0
(0)
Developer
Steady Scrape
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
5 days ago
Last modified
Categories
Features
Share
PDF Text Extractor — PDF to text and Markdown, with OCR for scanned pages
A PDF text extractor and PDF to text API: give it links to PDFs and get one row per PDF with its whole
text, a Markdown version, and its document information — title, author, subject, keywords, the programs
that made it, creation and modification dates, PDF version, page count — plus the language most of its text is in.
Each PDF can also be saved as a .txt and a .md file behind a link that opens for anyone, and you can ask for one
extra row per page.
Every page is read from the PDF's own text first. A page made by a program (Word, LaTeX, a browser, an invoicing system) carries its text: it is read exactly, in milliseconds, for US$0.50 per 1,000 pages. Only scanned pages are OCR'd, by an open OCR model running inside the Actor (no cloud OCR API, no LLM, nothing your PDFs are sent to). Mixed PDFs — typed pages with scanned attachments — come out whole in one run.
PDF text extraction pricing
| event | price | when |
|---|---|---|
text-page | US$0.0005 (US$0.50 per 1,000 pages) | a PDF page read from its own text |
page | US$0.0025 (US$2.50 per 1,000 pages) | a scanned page read by OCR |
The document row itself costs nothing: you pay for the pages read. A link that does not answer, a web page, a password-protected PDF, a page without text: each is free, and the row says why.
What the PDF extractor reads
- PDFs: every page, or the pages you ask for (
1-3, 5, 10-), up to 100 per PDF by default (2,000 at most). - Scanned PDFs and scans: pages without their own text are OCR'd (Latin-alphabet languages and Chinese by default; Japanese, Korean, Cyrillic, Arabic, Devanagari, Thai, Greek, Tamil and Telugu on request). TIFF scans and images work too.
- Share links: Google Drive files, Google Docs (exported to PDF) and Dropbox links shared with "Anyone with the link".
- Another Actor's output: pick a dataset (scraped PDFs, filings, reports, invoices) and name the field that holds the links, or let the Actor find the PDF fields itself. Signed links of Apify key-value records work as they are.
Pages of YouTube, TikTok, Instagram and other platforms are refused before anything is downloaded: this Actor reads your own files.
Use cases
- LLM and RAG pipelines: whole documents as clean text and Markdown with page headings, in one JSON row each, ready to chunk and embed; the title, author and dates for the index.
- Document archives to searchable text: contracts, reports, papers, manuals and scanned letters, typed and
scanned pages alike, with a
.txtper PDF whose pages are apart by a form feed, as pdftotext writes them. - Scraped PDFs: run it on the dataset of a scraper that collected PDF links (tenders, filings, court documents, datasheets) and keep the dataset item each PDF came from.
- Metadata audits: who wrote a PDF, with what program, and when, across a whole folder of links.
Input
| field | what it does |
|---|---|
files | PDF links, up to 300 MB each and 1,000 per run. |
datasetId / datasetFields | A dataset of another run and the fields holding its PDF links (attachments.url takes the url of every element of attachments). Empty fields: the Actor picks pdf, document, file, report, invoice and scan fields. |
pdfMode | auto (default: each page's own text, OCR for scanned pages), ocr (OCR every page, for PDFs whose own text is wrong), text-layer-only (never OCR). |
pages | Which pages of each PDF, like 1-3, 5, 10-. Empty: every page. |
maxPagesPerFile | Pages past this are left out, free, and named in the document's note (default 100). |
script | The alphabet of scanned pages: latin (default), japanese, korean, cyrillic, arabic, devanagari, thai, greek, tamil, telugu. A PDF's own text is read in any language. |
autoRotate | OCR scanned pages turned 90, 180 or 270 degrees the right way up (default on). |
outputFiles | Files saved per PDF: txt and md by default, json (pages → blocks → lines with boxes) on request. |
pageRows | Also one row per page (rowType: "page") with its text, blocks and lines with boxes. Off by default. |
{"files": ["https://arxiv.org/pdf/1706.03762"]}
Output: one row per PDF
This is the real row of the example above, its text and Markdown shortened:
{"rowType": "document","status": "ok","reason": null,"fileIndex": 1,"sourceUrl": "https://arxiv.org/pdf/1706.03762","datasetItemIndex": null,"fileName": "1706.03762v7.pdf","fileType": "pdf","fileSizeBytes": 2215244,"pageCount": 15,"pagesRead": 15,"textLayerPages": 15,"ocrPages": 0,"pagesWithoutText": 0,"title": null,"author": null,"subject": null,"keywords": null,"creator": "LaTeX with hyperref","producer": "pdfTeX-1.40.25","creationDate": "2024-04-10T21:11:43Z","modificationDate": "2024-04-10T21:11:43Z","pdfVersion": "1.5","language": "en","script": "Latin","text": "Provided proper attribution is provided, Google hereby grants permission to\nreproduce the tables and figures in this paper solely for use in journalistic or\nscholarly works.\n\nAttention Is All You Need\n\nAshish Vaswani∗\nGoogle Brain\navaswani@google.com\n…","markdown": "# 1706.03762v7.pdf\n\n## Page 1\n\nProvided proper attribution is provided, …","textTruncated": false,"wordCount": 6277,"charCount": 33470,"textFileUrl": "https://api.apify.com/v2/key-value-stores/…/records/001-1706-03762v7.txt?signature=…","markdownFileUrl": "https://api.apify.com/v2/key-value-stores/…/records/001-1706-03762v7.md?signature=…","jsonFileUrl": null,"unreadFields": [],"processingSeconds": 2.42,"processedAt": "2026-11-19T03:06:38.849Z"}
This paper's PDF carries no title or author in its document information (LaTeX leaves them empty unless the author
sets them), so they are null: the Actor gives what the PDF says, never a guess from the text.
Fields
| field | meaning |
|---|---|
rowType | document (one per PDF), or page with pageRows on. |
status | ok when at least one page was read; otherwise why nothing was: no_text, invalid, unreachable, not_supported, too_large, protected, refused, skipped, failed. |
reason | What was left out and why, page by page ("page 4: no text was found on this page"); null when every page asked for was read. |
pageCount, pagesRead | Pages in the PDF, and pages read with text in this run. |
textLayerPages, ocrPages | How the pages read were read, and billed: from the PDF's own text (text-page) or by OCR (page). |
pagesWithoutText | Pages with nothing to read (blank, or scanned in text-layer-only mode). |
title, author, subject, keywords, creator, producer | The PDF's document information as its program wrote it; null when the PDF has none. |
creationDate, modificationDate | ISO 8601, in UTC when the PDF gives its time zone, as written (no offset) when it does not. |
pdfVersion | 1.4, 1.7, 2.0… |
language, script | The language most of the text is in (en, de, zh…; null when too short to tell) and its Unicode script. |
text | Every page read, in page order: lines on their own lines, paragraphs apart by a blank line, pages apart by a form feed line. |
markdown | The PDF as Markdown: the file as a title, a heading per page, paragraphs; big single lines of scanned pages become subheadings. |
textTruncated | true when the text or the Markdown passed 1,000,000 characters: the row has the beginning, and the .txt and .md files (then always saved) have all of it. |
wordCount, charCount | Counts of the whole text (Chinese and Japanese words included). |
textFileUrl, markdownFileUrl, jsonFileUrl | The PDF's files: links that open for anyone. |
unreadFields | Information fields that could not be read on this PDF (a broken date, an unreadable dictionary), as opposed to absent. |
fileIndex, fileName, fileType, fileSizeBytes, sourceUrl, datasetItemIndex | The link's place in the input, the file as its server names it, its type and size, the link as given, and the dataset item it came from. |
processingSeconds, processedAt | How long the PDF took to read, and when (UTC, ISO 8601). |
With pageRows on, each page also gets a row with rowType: "page", pageNumber, method (text-layer or ocr),
its text, blocks and lines (each with a box, and a confidence for OCR), language, confidence and
billedEvent. They come before their document's row.
Speed and memory
A page with its own text is read in milliseconds: on Apify, at the default 1 GB, the 15 pages of the example took 2.4 s and the whole run 9 s, peaking at 146 MB. A dense scanned A4 page took 2.1–2.3 s of OCR at 2 GB in this engine's measurements, and takes longer at 1 GB, since Apify gives a run one CPU core per 4 GB. The default memory fits A4 and Letter scans; give a run more for large posters or plans, or to OCR faster.
If your spending limit pays only for part of a run, the Actor stops at the limit and says which pages it did not read;
when only text-page is left, it still reads pages that have their own text. A run moved by Apify to another server
goes on where it was: no page is read or billed twice, and each PDF still gets one complete row.
Limits
- Headings inside a page come from the size of its lines on scanned pages only; on pages with their own text the Markdown has the page headings and paragraphs.
- Tables come out as rows of text, not as cells; handwriting is not read reliably.
- Password-protected PDFs are not opened (remove the password); Word and Excel files must be exported to PDF first.
- A PDF whose own text is garbled (broken fonts) is usually caught and OCR'd; if one slips through, use
pdfMode: ocr. - The title and author come from the PDF's document information dictionary; a PDF that keeps them only in XMP metadata
shows them as
null.
Is it legal?
It reads files you give it: your own documents, or files you have the right to process. Do not use it on documents that contain other people's personal data unless you have a lawful basis to process them (GDPR, CCPA and similar).
This Actor is not affiliated with, endorsed by or connected to Adobe, arXiv, Google, Dropbox, PaddlePaddle or RapidAI. It reads PDFs with pdfium (BSD-3) through pypdfium2 and OCRs with the open PP-OCR models (Apache-2.0) through RapidOCR (Apache-2.0).
Related
- OCR: Image & PDF to Text: the same engine with one row per page or image, each line with its box and confidence, for screenshots, photos and receipts.
- Questions or a PDF it reads badly? Open an issue on the Actor's Issues tab; it is answered.