PDF & Image Text Extractor: OCR to Text & Markdown
Pricing
from $2.40 / 1,000 page read with ocrs
PDF & Image Text Extractor: OCR to Text & Markdown
Extract text and Markdown from PDFs and images (PNG, JPEG, TIFF, WebP, GIF, BMP, HEIC) by link. Uses a PDF's own text where it has some and Tesseract OCR for scans and photos, in 124 languages. One row per page with word counts and OCR confidence. Failed files and blank pages are free.
Pricing
from $2.40 / 1,000 page read with ocrs
Rating
0.0
(0)
Developer
Public Data Tools
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
2 days ago
Last modified
Categories
Security
Limited permissionsShare
PDF & Image Text Extractor: OCR to Text and Markdown
Extract the text from PDFs, scanned documents and images, page by page, as plain text and simple Markdown. Give links to your files: where a PDF page has its own (embedded) text, that text is used, exactly and fast; scanned pages, pages without usable text, and images are read with Tesseract OCR in any of 124 languages. Each page comes back as one row with its text, Markdown, word and character counts, how the text was obtained, the OCR confidence and the page size.
- 📄 Text PDFs and scans in one run: the PDF's own text where a page has it, OCR where it doesn't, decided page by page. Or always OCR, or never.
- 🖼️ Images too: PNG, JPEG, TIFF (every page), WebP, GIF, BMP, HEIC, AVIF and JPEG 2000. Sideways phone photos are turned upright.
- 🌍 124 OCR languages (Tesseract 5): English and 17 European languages are installed; Chinese, Japanese, Arabic, Hindi and the rest are added when a run uses them.
- 📝 One row per page: text, Markdown (headings, paragraphs, lists), word and character counts, text source, OCR confidence, page size.
- 🗂️ One row per file too, if you like: all of its text and Markdown, the PDF's title, author and dates, and the whole text as .txt and .md files.
- 🔒 Your files only: it reads only what you link to, keeps nothing outside your run's own storage, and never writes document text to the log.
- 💸 $0.50 per 1,000 pages of PDF text, $3 per 1,000 OCR pages. Files that can't be read, password-protected files and blank pages are free.
Try it: the input comes pre-filled with the US federal tax form W-4 (a 5-page PDF from irs.gov) and a printed copy of the Emancipation Proclamation from 1863 (an image on Wikimedia Commons). Both are public domain. Click Start to get 5 pages of PDF text and 1 page of OCR text, then add your own files.
Who it's for
- AI and RAG teams: turn document collections into clean page-by-page text and Markdown for search, embeddings and chatbots.
- Back offices: pull the text out of scanned contracts, invoices, letters and forms so it can be searched and checked.
- Researchers, archivists and librarians: make scanned books, reports and historical documents searchable.
- Developers: call it through the Apify API instead of running poppler and Tesseract yourself.
- Data teams: process many files in one run, then export the results as JSON, CSV or Excel.
What you get
For every page:
- the text (
text): the PDF's embedded text in reading order, or the OCR text, with paragraphs separated by blank lines; - a simple Markdown version (
markdown): paragraphs, headings (text clearly larger than the body text) and bullet or numbered lists; - word and character counts;
- how the text was obtained (
textSource:embeddedorocr), the OCR languages and Tesseract's confidence (0–100); - the page size: points for PDF pages (with A4, Letter and other standard names), pixels for images;
- the file's link, name, type, page number and page count.
For every file, the run's RUN_SUMMARY record lists its type and size, page count, pages read, pages with text, blank and failed pages, how many were read by OCR and their mean confidence, the PDF's title, author, subject, keywords, creator, producer, creation and modification dates, PDF version and encryption, or the reason it couldn't be read. Turn on One row per file too to get the same as a dataset row, with all the file's text and Markdown, and the whole text saved as .txt and .md files in the run's storage.
Fair charging: you pay per page with text. Free: links that aren't PDFs or images (web pages, Word files, text files), missing files (404), refused access (403, an expired link), bot checks, damaged files, password-protected PDFs, PDFs that forbid copying their text, blank pages, and pages beyond your limits. A run stops cleanly at your maximum cost.
How to use it
In Apify Console
- Paste your file links, one per line. The link must download the file itself, for example
https://example.com/report.pdf. Or upload files from your computer with Or upload files. - Optionally choose the pages (for example
1-5, 8, 10-), the most pages per file (500 by default) and the most pages per run. - Choose the OCR languages of your documents (English by default; pick all that appear) and the OCR mode: automatic (embedded text first), always or never.
- Click Start. Open the Pages view to read the text, the Markdown view for Markdown, or download the results as JSON, CSV or Excel.
Files on S3, Google Cloud Storage, Dropbox, Google Drive or Apify
- S3 or Google Cloud Storage: a public object link, or a signed (pre-signed) link that is valid long enough for the run.
- Dropbox: a shared link. The Actor changes
?dl=0to?dl=1, so it downloads the file instead of the preview page. - Google Drive: a "share" link to a file anyone with the link can view (
drive.google.com/file/d/…/view). The Actor turns it into Drive's download link. If Drive answers with its virus-scan page instead (it does for large files), the link is listed as a web page, free. - GitHub: a link to a file on github.com (
…/blob/…) is turned into its raw link. - Apify key-value store: the record's link. Links without a signature are opened with the run's own Apify token; if Apify refuses, use the record's signed link (with
?signature=).
With the Apify API
curl -X POST "https://api.apify.com/v2/acts/subtleasianmerch~document-text-extractor/run-sync-get-dataset-items?token=YOUR_TOKEN" \-H "Content-Type: application/json" \-d '{"fileUrls": ["https://example.com/scan.pdf"], "ocrLanguages": ["eng", "deu"]}'
Example input
{"fileUrls": ["https://example.com/contracts/lease-2025.pdf","https://my-bucket.s3.amazonaws.com/scans/letter.tif","https://example.com/photos/receipt.jpg"],"pages": "1-20","maxPagesPerFile": 20,"ocrMode": "auto","ocrLanguages": ["eng", "fra"],"ocrLayout": "auto","ocrDpi": 300,"markdown": true,"fileRows": true}
Output
One row per page. A real row from a test run on Apify (3 November 2026, the pre-filled example), with the text and Markdown shortened:
{"rowType": "page","fileUrl": "https://upload.wikimedia.org/wikipedia/commons/4/4d/Emancipation_proclamation_typeset_signed.jpg","fileIndex": 2,"fileName": "Emancipation_proclamation_typeset_signed.jpg","fileType": "jpeg","pageNumber": 1,"pageCount": 1,"status": "ok","text": "BY THE PRESIDENT OF THE UNITED STATES OF AMERICA,\n\nA Proclamation.\n\nAM Tvereas, on the twenty-second day of September, in the year of our Lord one thou-\nsand eight hundred and sixty-two, a proclamation was issued hy the President of the United\nStates, …","markdown": "### BY THE PRESIDENT OF THE UNITED STATES OF AMERICA,\n\n# A Proclamation.\n\nAM Tvereas, on the twenty-second day of September, in the year of our Lord one thousand eight hundred and sixty-two, a proclamation was issued hy the President of the United States, …","wordCount": 765,"charCount": 4521,"textSource": "ocr","ocrConfidence": 91.7,"ocrLanguages": "eng","pageWidth": 1457,"pageHeight": 2567,"pageSizeUnit": "px","pageSizeName": null,"error": null}
The OCR text keeps the misreadings Tesseract makes ("AM Tvereas" is the decorated "Whereas" of the original, "hy" is "by"). A PDF page with embedded text has "textSource": "embedded", no confidence, and its size in points, for example 612 × 792 and "pageSizeName": "Letter".
Rows for pages without text have status blank; rows for files that couldn't be read have rowType file, a status such as failed, blocked, unsupported, protected or restricted, and the reason in error. They are free.
Pricing
- $0.0005 per page of PDF text ($0.50 per 1,000): pages whose text comes from the PDF itself.
- $0.003 per OCR page ($3 per 1,000): scanned PDF pages, and each image or TIFF page.
A 40-page text PDF costs $0.02; a 100-page scanned PDF $0.30; 1,000 receipt photos $3.
Free: files that can't be downloaded or read, links that aren't PDFs or images, password-protected and copy-restricted PDFs, blank pages, pages beyond your limits, and pages stopped by your maximum cost. Apify's platform usage is included in the price.
Good to know
- Limits. Files up to 200 MB each; up to 1,000 files and, by default, 500 pages per file (up to 10,000) in a run. Images up to 200 megapixels; images larger than 7,000 pixels on a side (or 40 megapixels) are scaled down for OCR.
- OCR quality depends on the document. Tesseract reads clean printed text well. In tests: a 1902 Dutch book scan had a confidence of 92.5, an 1863 printed proclamation 91.7, a 1918 newspaper front page 86.5, an ornate 1776 broadside 78, full-page website screenshots 74–85, and a 1946 Japanese government gazette in vertical type only 52. Handwriting isn't supported. Choose the right languages: OCR with the wrong language misreads accented letters.
- Speed. At the default memory (2 GB), a scanned book page takes about 4 seconds and a dense newspaper page about a minute. Text PDFs are fast: 59 pages took 5 seconds. 4 GB reads OCR pages about 1.5 times as fast for about 1.4 times the platform cost (the price per page is the same for you).
- Embedded text is used as the PDF gives it, in pdftotext's reading order. Some PDFs have garbled embedded text (fonts without a Unicode map): choose Always OCR for those. Scanned pages with only a little embedded text (such as a stamp or a page number) are read with OCR too, and the OCR text is used when it finds more.
- Markdown is simple: paragraphs, headings and lists. Tables come out as lines of text, not Markdown tables.
- Password-protected PDFs aren't opened (there's no password input), and PDFs that forbid copying their text (their owner set "copy: no") are respected and listed free. Both are listed with the reason.
- Direct links only. A link that opens a web page or a viewer isn't read (free); give the link that downloads the file. The Actor identifies itself honestly, doesn't get past bot checks, and refuses links to private or internal network addresses.
- Privacy. Documents may contain personal data. The Actor processes only the files you give it, downloads each one to the run's temporary disk and deletes it when that file is done, keeps the results only in your run's own storage (as long as your plan keeps it), and never writes document text to the log. Language models are the only thing it downloads besides your files (from Tesseract's official repository, when you choose a language that isn't installed).
FAQ
Does it read scanned PDFs? Yes. Pages without usable embedded text are rendered at 300 dpi and read with OCR. PDFs that already have a hidden OCR text layer ("searchable" scans) use that text, which is faster and free of a second OCR's errors.
Which languages can it read? Any of Tesseract's 124: English, German, French, Spanish, Italian, Portuguese, Dutch, Polish, Swedish, Danish, Norwegian, Finnish, Czech, Romanian, Hungarian, Turkish, Russian and Ukrainian are installed; the others (Chinese, Japanese, Korean, Arabic, Hebrew, Hindi, Greek, Thai and more) take a few seconds more on first use in a run.
Can it read Word, Excel or PowerPoint files? No. Save them as PDF first. Such files are listed as unsupported, free.
Am I charged for blank pages? No. Pages with no readable text, and OCR pages where Tesseract isn't at least 50% sure of any word, are listed as blank and free.
Can I upload a file from my computer? Yes: Or upload files in the input stores the file in one of your Apify key-value stores, and the Actor reads it from there. If Apify refuses the run access to that store, use the record's signed link (with ?signature=) under File links instead.
Does it work for handwriting? No. Tesseract reads printed and typed text.
Related Actors
More Actors from the same developer that work well with this one:
| Actor | Use it to |
|---|---|
| Website Screenshot API | save web pages as PDFs or images, then extract their text here |
Questions, bugs or ideas? Open an issue on this Actor's Issues tab.