Image OCR: Text from Images and Scanned PDFs avatar

Image OCR: Text from Images and Scanned PDFs

Pricing

from $4.00 / 1,000 image or pages

Go to Apify Store
Image OCR: Text from Images and Scanned PDFs

Image OCR: Text from Images and Scanned PDFs

Read text from images (PNG, JPEG, WebP, TIFF) and PDFs: one row per image or page with text, lines, confidence and positions. 11 script families, with Arabic in right-to-left order. PDF pages that already have text cost $1 per 1,000. No login or API key.

Pricing

from $4.00 / 1,000 image or pages

Rating

0.0

(0)

Developer

Mohamed Ayman

Mohamed Ayman

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

an hour ago

Last modified

Features

Limited permissions

Share

Extract text from images and scanned PDFs (PNG, JPEG, WebP, TIFF and PDF links), with a confidence score and position for every line, for teams digitising scans, receipts and screenshots in bulk. It costs $4 per 1,000 images or scanned pages where text is found and $1 per 1,000 where none is; PDF pages that already have a text layer are read from it for $1 per 1,000 instead of being OCRed; failed downloads and error rows are free.

Give it public image or PDF links and get one JSON row per image, per TIFF frame and per PDF page, with the joined text and every line with its box. No login, no paid OCR service, no proxy.

Image OCR: Text from Images and Scanned PDFs

  • Text plus layout data. Joined text, every line with confidence and a four-corner box, and optionally every word.
  • Scans and photos. Reads multi-page TIFFs frame by frame, plain images, and scanned PDF pages (each page is rendered first, then read).
  • Text layer first for PDFs. A PDF page that already contains its own text is read from that text and skipped by OCR, at $1 per 1,000 pages instead of $4. Only the scanned pages are OCRed, so a PDF that is part text and part scan costs what it should.
  • Any way of giving files. Links, Google Drive and Dropbox share links, base64 text, Apify key-value store records, a dataset with a link field, a CSV or TXT list of links, ZIP archives, and web pages that link to PDFs. Every link goes through the same safe downloader.
  • 11 recognisers. English and other Latin-script languages, Chinese, Japanese, Korean, Arabic script, Cyrillic, Devanagari, Thai, Greek, Tamil and Telugu.
  • Arabic, Persian and Urdu in reading order. Right-to-left lines come back in logical order, so the text can be searched, copied and fed to a language model as it is written: lines read right to left, a line the detector split in two reads as one, numbers stay where they belong, and words are in reading order too.

Quick start

Paste this input as it is. An empty input reads a default public IRS form.

{
"urls": ["https://www.irs.gov/pub/irs-pdf/fw9.pdf"],
"language": "en",
"quality": "fast",
"pages": "1"
}

Example output

One row per image or PDF page. The IRS form above has a text layer, so by default its pages are read from it (textSource: "text-layer", charges: {"text-layer-page": 1}, no lines). To force OCR, set usePdfTextLayer to false. This row is from a real OCR run on page 1 of that form (text shortened, only the first of 103 lines shown):

{
"rowType": "ocr",
"url": "https://www.irs.gov/pub/irs-pdf/fw9.pdf",
"finalUrl": "https://www.irs.gov/pub/irs-pdf/fw9.pdf",
"origin": "url",
"fileName": null,
"parentUrl": null,
"sourceType": "pdf",
"textSource": "ocr",
"pageNumber": 1,
"pageCount": 6,
"status": "ok",
"error": null,
"errorCode": null,
"language": "en",
"width": 1237,
"height": 1600,
"renderDpi": 145.5,
"text": "W-9\nRequest for Taxpayer\nForm\nGive form to the\n(Rev. March 2024)\nIdentification Number and Certification\n…",
"lineCount": 103,
"averageConfidence": 0.9835,
"lines": [
{
"text": "W-9",
"confidence": 0.9923,
"box": [[108, 64], [201, 64], [201, 115], [108, 115]],
"words": null
}
],
"ocrSeconds": 2.957,
"charges": { "image": 1 },
"extractedAt": "2026-11-18T17:23:11Z"
}

Boxes are in pixels of the image (width x height). For PDF pages they are in the rendered page (long side about 1,600 px, see renderDpi). Lines come in reading order, top to bottom and left to right within a row. A failed file or page gives rowType: "error" with an errorCode and a message.

Use cases

  • Extract text from scanned PDFs and photographed documents.
  • Read receipts, invoices and ID-style forms into structured lines.
  • Pull text from screenshots, signs and product photos in bulk.
  • Make scanned archives searchable by turning pages into text.
  • Read Arabic, Cyrillic, Chinese, Japanese or Korean text from images.
  • Feed text from images into an LLM or RAG pipeline, using the confidence score to filter weak lines.

Input

FieldDefaultWhat it does
urlsone IRS form, only if you give no file at allImage, PDF or ZIP links. Google Drive and Dropbox share links work
base64FilesnoneFiles as base64 text (or a data: URI), or {"name": "a.pdf", "data": "..."} objects
keyValueStoreId, keyValueStoreKeysnoneRecords of an Apify key-value store, stored with their own content type (for example application/pdf). No store ID means this run's own default store
datasetId, datasetField, datasetLimitnone, none, 1000A dataset of yours and the field that holds each link (a link, a list of links, or {"url": ...}; a.b goes one level deeper)
urlListUrls, urlListColumnnoneLinks to a TXT (one link per line) or CSV file that lists links; the CSV column is found by header or content, or named
followPdfLinks, maxLinksPerPagefalse, 20A link that returns a web page is read for links to PDFs, one level deep, at most this many per page
maxFilesPerZip, maxZipUncompressedMb200, 500Limits for ZIP archives, which are expanded in memory
languageenWhich recogniser to use, see below
qualityfastfast = smaller model, accurate = larger model, about 4 times slower on dense pages. English, Chinese and Japanese only (Japanese always uses the larger one)
usePdfTextLayertruePDF pages that have their own text (40 or more letters or digits) are read from it, with no OCR, for $0.001. Off means OCR every page
pagesallPDF pages to read, for example 1-3,5 or 4-
minConfidence0.5Lines below this confidence (0 to 1) are dropped
includeWordBoxesfalsePosition and confidence per word
includeLinestrueThe lines list. Off gives the joined text only
maxPagesPerPdf500At most this many pages of one PDF or TIFF
maxFileSizeMb50Bigger files give a free error row

Languages

  • en: English and the other Latin-script languages, such as French, German, Spanish, Portuguese, Italian, Turkish and Vietnamese.
  • ch Chinese, japan Japanese, korean Korean.
  • arabic: Arabic script (Arabic, Persian, Urdu).
  • cyrillic: Russian, Ukrainian, Bulgarian and others.
  • devanagari: Hindi, Marathi, Nepali.
  • th Thai, el Greek, ta Tamil, te Telugu.

That is 11 recognisers covering several dozen languages, not 100 or more. One run uses one language. English and Arabic are tested. For arabic, text joins the boxes of one line with a space and starts a new text line for each visual row; lines and lineCount still hold one entry per detected box, so a short Arabic line can be one text line and two or three entries in lines.

How much does it cost?

  • $4 per 1,000 images or PDF pages where text was found (image).
  • $1 per 1,000 for an image or page that was read but had no text above the confidence threshold (image-no-text).
  • $1 per 1,000 PDF pages read from their text layer (text-layer-page): a page that already holds at least 40 letters or digits of text is not OCRed. These rows have no line boxes or confidence, and textSource says text-layer. A scan whose hidden layer holds only a stamp or a page number is below that bar, so it is OCRed as usual.
  • Dense pages add $0.004 per extra block of lines. For en, ch and japan that starts above 150 lines, one event per extra 100 lines. For korean, arabic, cyrillic, devanagari, th, el, ta and te it starts above 40 lines, one event per extra 40 lines.
  • Accurate mode adds $0.004 per image or page, whatever the line count (and always for Japanese).
  • Each row shows what it was charged in charges, for example {"image": 1, "dense-page": 2}.
  • Free: failed downloads, files that are not images or PDFs, corrupt files and every error row.
  • Apify adds a very small run-start charge, shown on the Pricing tab.

Worked example with the free $5 monthly credit. Apify's free plan includes $5 of credit each month. In fast mode that reads about 1,250 images with text. A 6-page scanned form at $0.004 a page costs $0.024, so $5 covers about 208 such forms. The same pages in accurate mode cost $0.008 each, so the credit covers about 625 pages. A 6-page PDF that already has a text layer costs 6 x $0.001 = $0.006, so $5 covers about 833 of them.

To cap spending, set a maximum cost per run in the run options. The actor stops cleanly when it is reached.

Limits

  • OCR is imperfect. Low resolution, handwriting, heavy skew, stylised fonts and dense small print cause errors. Check averageConfidence.
  • Right-to-left text (language: arabic, also for Persian and Urdu): text and every line and word are in logical (reading) order, and the boxes of one line are listed right to left. The ordering is tested on generated Arabic pages, including lines with numbers. Two limits: the Arabic recogniser often does not read Latin words inside an Arabic line (numbers are read), so a mixed line may lose its Latin word; and PDF pages read from a text layer (textSource: text-layer) keep the order the PDF stores them in, which for Arabic is not checked. For those, set usePdfTextLayer to false to OCR the pages.
  • Tables, columns and layout are not rebuilt. You get lines with boxes, so reconstruct the layout from the boxes if you need it.
  • Large images are shrunk to 4,000 px on the long side before reading (boxes are scaled back). Images over 50 megapixels are refused.
  • GIF and BMP are not accepted. Password-protected PDFs are not opened.
  • Downloads use http and https only, with a 50 MB and 60 second default limit. Links to private or internal addresses are refused. There is no proxy, so a site that blocks Apify's servers gives a free error row.
  • For non-English languages, the first run may take a few seconds longer while the model loads.

Your files stay yours

The images and documents you send belong to you. They are downloaded into memory, read and dropped. Nothing is written to disk or to a key-value store, and nothing is kept after the run except the output dataset and the run input you provided.

  • Sources. Google Drive and Dropbox links must be public ("anyone with the link"). A Drive file link and a Docs, Slides or Sheets link (exported as PDF) work; a Drive folder does not (folder_not_supported), and Drive may show a virus-scan page instead of a very large file, which gives a free error. A Dropbox folder link is downloaded as a ZIP. OneDrive and SharePoint links are not converted. Key-value store records must be files stored with their own content type, not JSON or text.
  • ZIP archives are unpacked in memory, never written to disk, one file at a time. Limits: at most maxFilesPerZip readable files (200), at most maxZipUncompressedMb when unpacked (500 MB), a member unpacking to more than 100 times its compressed size is refused, a member bigger than maxFileSizeMb is skipped, password-protected members are skipped, and a ZIP inside a ZIP is not opened. The ZIP file itself counts against maxFileSizeMb, and an archive is held in memory while it is read, so raise the memory for very large archives. Each readable file is charged like a file you gave directly.
  • Web pages are read for PDF links only when followPdfLinks is on, one level deep: links found on the page are read as PDFs, and a PDF link that returns another web page or a ZIP is refused. Only links ending in .pdf, citation_pdf_url meta tags and alternate-PDF link tags are found; links built by JavaScript are not seen.
  • Error codes for sources: bad_base64, bad_key, record_not_found, store_unavailable, missing_field, bad_list, empty_list, no_pdf_links, folder_not_supported, corrupt_archive, archive_too_large, suspicious_archive, encrypted, no_supported_files. All are free.

FAQ

Which languages does it read? Eleven recognisers covering several dozen languages: English and other Latin-script languages, Chinese, Japanese, Korean, Arabic script (Arabic, Persian, Urdu), Cyrillic, Devanagari, Thai, Greek, Tamil and Telugu. One run uses one language. English and Arabic are the most tested, so try a sample of your own files for the others.

Does it read Arabic, Persian and Urdu in the right order? Yes, with language set to arabic. The text comes back in logical order (the order you would type it), the boxes of one line are listed right to left and joined into one text line, numbers keep their place after the words they follow, and with includeWordBoxes the words are in reading order with their own boxes. It is tested on generated Arabic pages, including lines with numbers. Check a sample of your own: the recogniser is a general one, it can misread letters in small or decorative print, and it often skips Latin words inside an Arabic line.

How accurate is it? Accuracy depends on the image. Clean printed text reads well; low resolution, handwriting, heavy skew, stylised fonts and dense small print cause errors. Every line carries a confidence score and every row has averageConfidence, so you can filter or review weak results. Lines below minConfidence, 0.5 by default, are dropped.

What do I pay for pages with no text, or failures? A page that was read but had no text above the confidence threshold costs $0.001, and so does a PDF page read from its text layer. Failed downloads, files that are not images or PDFs, corrupt files and every other error row are free. The charges field on each row shows exactly what that row cost, so you can reconcile it with your bill.

Does it work on scanned PDFs? Yes. Each scanned PDF page is rendered to an image and read, and you get one row per page. Pages that already have a text layer are not OCRed: they are read from that text for $0.001 and the row says textSource text-layer. A PDF that is part text and part scan therefore pays OCR prices only for the scanned pages. Set usePdfTextLayer to false to OCR every page anyway. Use the pages input, for example 1-3,5, to read only some pages. If all your PDFs have a real text layer, PDF to Text and Markdown is cheaper and gives Markdown and metadata.

Are my files stored? No. Images and documents are downloaded into memory, read and dropped. Nothing is written to disk or to a key-value store, and nothing is kept after the run except the output dataset in your own Apify account and the run input you provided. Links to private or internal addresses are refused.

Does it need a login or a paid service? No. The OCR engine, RapidOCR with PaddleOCR models, runs on CPU inside the actor. There is no login, no key for any outside service and no proxy. Because there is no proxy, a site that blocks Apify's servers will give a free error row for that link instead of a result.

When does accurate mode make sense? Accurate mode uses a larger model that is about four times slower and adds $0.004 per image or page. It applies to English, Chinese and Japanese; Japanese always uses it. Try fast first on a sample, check averageConfidence, and switch to accurate only for dense or difficult pages where fast makes mistakes.

Can I schedule it or call it from my own tools? Yes. Run it from Apify Schedules or call it through the Apify API with the input shown above. n8n, Make and Zapier have Apify integrations, and AI agents can run it through Apify's MCP server. Results land in the run's default dataset, ready to download as JSON, CSV or Excel.

Can I send files instead of links? Yes. Pass base64 text in base64Files, or put the files in a key-value store and list their keys in keyValueStoreKeys, or point the actor at a dataset of links with datasetId and datasetField. Rows say where each file came from in origin, fileName and parentUrl; the base64 data itself is never copied into the output.

Do Google Drive and Dropbox links work? Public share links do. The actor turns them into direct-download links before fetching, so you can paste the link from the Share button. Docs, Slides and Sheets links are exported as PDF. Folders are not supported on Drive, and links that need a login give a free error row.

Can I give it a ZIP? Yes, from any source. The readable files inside are processed one by one and each is charged like a direct file. The unpacking is limited (file count, total size, compression ratio) so a hostile archive cannot exhaust memory, and nothing is written to disk.

Can it find the PDFs on a web page? Turn on followPdfLinks and give the page's link. The actor reads the page for links to PDFs (up to maxLinksPerPage), one level deep, and reads each one. It does not follow links from those files or click through further pages.

Can I give it a list of links as a spreadsheet? Yes. Put the links in a TXT file (one per line) or a CSV file, host it anywhere public (a Google Drive or Dropbox share link works), and pass its link in urlListUrls. Name the CSV column in urlListColumn if it is not called url or link.

Use from code or an AI agent

The actor runs under limited permissions. Python example:

from apify_client import ApifyClient
client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("cyrus_1/image-ocr-text-extractor").call(
run_input={"urls": ["https://www.irs.gov/pub/irs-pdf/fw9.pdf"], "pages": "1", "language": "en"}
)
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
if row["status"] == "ok":
print(row["pageNumber"], row["averageConfidence"], (row["text"] or "")[:80])

The same input works with the JavaScript client, the REST API, n8n, Make and Zapier. AI agents can find and run the actor through Apify's MCP server (the search-actors, fetch-actor-details and call-actor tools).

Licences

  • RapidOCR (the engine): Apache 2.0.
  • OCR models: PaddleOCR models converted to ONNX by RapidOCR. The English, Latin, Chinese and Japanese models ship inside the RapidOCR package, and its MODEL_LICENSES.md lists them as Apache 2.0. The models for the other scripts (Korean, Arabic script, Cyrillic, Devanagari, Thai, Greek, Tamil and Telugu) are not part of the package: they are downloaded when the actor is built, or on first use if that download failed. The RapidOCR package does not state a licence for those downloaded files, so we do not claim one for them. Check the model terms yourself if your use needs it.
  • python-bidi: LGPL-3. It is used for Arabic text, installed as an ordinary, unmodified Python dependency and not copied into the actor's own code.
  • pypdfium2 and PDFium: Apache 2.0 and BSD-3. Pillow: HPND. onnxruntime: MIT. OpenCV (headless): Apache 2.0; it bundles FFmpeg as a shared library under LGPL.
  • No Tesseract and no PyMuPDF.

More from this publisher

  • PDF to Text and Markdown is the choice for PDFs that already have a text layer: Markdown, metadata and tables of text, one row per PDF. It can also read its scanned pages with the same OCR engine when you turn on ocrScannedPages.