Image to Text OCR: Extract Text from Photos and Screenshots

Paste image links and get the text inside them back with line breaks, a confidence score and, if you want, the pixel box of every word.

Run on Apify →See pricing

What it does

Text trapped in pictures is everywhere: screenshots pasted into tickets, photos of whiteboards and letters, receipts, product labels, memes. Copying it out by hand does not scale. The Image to Text OCR actor reads those images in bulk and returns the text with its line and paragraph breaks.

It takes PNG, JPEG, TIFF, WebP, GIF, BMP and JPEG 2000 links. Each image becomes one row with the recognised text, a word count and an OCR confidence score, so you can tell a crisp screenshot from a blurry phone photo at a glance. Turn on includeWords and every word also comes with its own confidence and pixel box, which is what you need for redaction or highlighting.

Recognition uses Tesseract 5 in 29 languages, up to 4 per run. Pricing is $3 per 1,000 images with no compute bill on top, and failed downloads or blank images are not charged. It is built for developers adding an image-to-text step to an app, analysts working through screenshot collections, and automations in tools like Make, n8n and Zapier.

How it works

  1. You list image links in urls; scanned PDFs are accepted too and are read page by page.
  2. Each image is downloaded and passed to Tesseract 5 with your chosen languages and pageSegmentation mode.
  3. For screenshots and forms with scattered text, the sparse segmentation mode looks for text anywhere on the image; single-block suits receipts and snippets.
  4. Each image returns one row with text, word count and confidence, plus word boxes when includeWords is on and minWordConfidence filtering if set.
  5. Blank or unreadable images and failed downloads are reported free of charge.

Input example

A typical run input (JSON). Every field is also available as a form in the Apify console.

{
  "urls": [
    "https://github.com/tesseract-ocr/tessdoc/raw/main/images/eurotext.png",
    "https://raw.githubusercontent.com/tesseract-ocr/test/main/testing/phototest.tif"
  ],
  "languages": [
    "eng"
  ],
  "pageSegmentation": "sparse",
  "includeWords": true,
  "minWordConfidence": 50
}
All input fields
FieldTypeRequiredDefaultWhat it does
urlsarrayyesLinks to images (PNG, JPEG, TIFF, WebP, GIF, BMP, JPEG 2000): screenshots, scans, photos of pages, receipts. Scanned PDFs work too (each page is one image).
languagesarrayno["eng"]Languages in the documents (up to 4). Picking only the languages you need is faster and more accurate.
pdfModestringno"auto"Auto: pages that already contain text are read directly (exact, and charged at the cheaper text-layer price); only scanned pages are OCR'd. OCR all: OCR every page, e.g. when a PDF's hidden text layer is poor.
outputModestringno"document"For PDFs: one row per PDF with all pages, or one row per page. Images are always one row each.
includeWordsbooleannofalseAdd every recognised word with its confidence and pixel box (left, top, width, height), e.g. for redaction, highlighting or form extraction.
minWordConfidenceintegerno0Drop words Tesseract is less sure of than this (0–100). 0 keeps everything; 40–60 removes most noise from stains and stamps.
pageSegmentationstringno"auto"How Tesseract finds text. Auto suits most pages; Single column for uniform text; Single block for receipts and snippets; Sparse for scattered text like forms and screenshots.
dpiintegerno300Resolution scanned PDF pages are rendered at before OCR. 300 is the accuracy sweet spot; 200 is faster for large print.
maxPagesPerPdfintegerno200Process at most this many pages of each PDF (from the start). Longer PDFs are marked truncated.
maxFilesintegerno1000Stop after this many files.
passwordstringnoFor password-protected PDFs you are entitled to open. Used for every PDF in the run.

Output example

Each image comes back as one row; the sample shows a PNG with mixed punctuation and a TIFF test page, each with its own confidence score.

urlfileTypepagesOcrconfidencewordCounttext
https://github.com/tesseract-ocr/tessdoc/raw/main/images/eurotext.pngpng189.766The (quick) [brown] {fox} jumps!\nOver the $43,456.78 … #90 dog\n& duck/goose, as 12.5% of E-mail…
https://raw.githubusercontent.com/tesseract-ocr/test/main/testing/phototest.tiftiff196.360This is a lot of 12 point text to test the\nocr code and see if it works on all types\nof file format.

Pricing

Pay per event: you are charged only for the results you receive, with no subscription. Set a maximum total charge on any run and it stops cleanly at the cap.

Charged forWhenPricePer 1,000Worked example
Page ocrCharged per image or scanned PDF page read by OCR$0.003$3A 10-page scanned PDF = $0.03; 1,000 receipts = $3.00
Page textCharged per PDF page that already has a text layer (read directly, no OCR)$0.0003$0.30A 100-page digital PDF = $0.03
Actor Start (platform start fee)Charged when the Actor starts running. Number of events charged depends on Actor memory (one event per GB, minimum one event).$0.00005—One run at 4 GB = $0.0002

Prices are read from the live Apify Store listing when this page is built. The listing is always authoritative.

Try Image to Text OCR on Apify. Pay only for the results you get.

Run on Apify →

Use cases

Text from support screenshots

Customers often paste screenshots of error dialogs instead of copying the message. Extract the text so tickets become searchable and the exact error string can be matched against known issues.

Receipt and label photos

Pull the printed text off photographed receipts or product labels for expense tools or catalogue checks. Use the single-block segmentation mode for small, dense blocks of text.

Redacting text in images

With includeWords on, every word comes with its pixel box (left, top, width, height) and confidence. That is enough to locate an account number or name in a screenshot and black it out before sharing.

Researching image-based posts

Collections of memes, infographics or social posts carry their message in the picture. OCR them in bulk to search, count or classify the text without opening each image.

How it compares

ActorForge Image to Text OCRCopy text from phone or OS photo appCloud vision APIs
Bulk processing via APIYesNo, one image at a timeYes
Per-word pixel boxesYes, optionalNoUsually yes
Per-image confidence scoreYesNoUsually yes
HandwritingPoorVariesOften better
HEIC/AVIF photosNo, convert to JPEG firstYesVaries
Pricing$3 per 1,000 images, no compute billFreeVaries by provider

For a handful of images, your phone's built-in text selection is quicker and free. Cloud vision services can handle handwriting and difficult photos better; this actor is aimed at printed and on-screen text in bulk at a predictable price.

Limits and honest notes

FAQ

How do I extract text from a screenshot automatically?

Send the screenshot's URL in urls. For UI screenshots where text is scattered across the image, set pageSegmentation to sparse. The text comes back with line breaks plus a confidence score.

Can it read text from iPhone photos?

Only if they are JPEG, PNG or another supported format. HEIC and AVIF photos are not supported, so export or convert them to JPEG first.

Does it read handwriting?

Not well. Tesseract is strong on printed and typed text but handwriting, low-resolution photos and decorative fonts come out poorly. Check the confidence score to see which images to review.

How do I get the position of each word in the image?

Set includeWords to true. Each recognised word is returned with its confidence and pixel box (left, top, width, height). Combine it with minWordConfidence to drop uncertain words.

What does image OCR cost per image?

$0.003 per image read by OCR, so 1,000 images cost $3, with no separate compute charge. Images that fail to download or are blank are not charged.

Use it from code

Run the actor through the Apify API with the input above.

cURL

curl -X POST "https://api.apify.com/v2/acts/actor-forge~image-to-text-ocr/run-sync-get-dataset-items" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"urls": ["https://github.com/tesseract-ocr/tessdoc/raw/main/images/eurotext.png", "https://raw.githubusercontent.com/tesseract-ocr/test/main/testing/phototest.tif"], "languages": ["eng"], "pageSegmentation": "sparse", "includeWords": true, "minWordConfidence": 50}'

JavaScript (Node.js)

// Node.js 18+ (built-in fetch). Set APIFY_TOKEN in your environment.
const input = {
  "urls": [
    "https://github.com/tesseract-ocr/tessdoc/raw/main/images/eurotext.png",
    "https://raw.githubusercontent.com/tesseract-ocr/test/main/testing/phototest.tif"
  ],
  "languages": [
    "eng"
  ],
  "pageSegmentation": "sparse",
  "includeWords": true,
  "minWordConfidence": 50
};

const res = await fetch(
  "https://api.apify.com/v2/acts/actor-forge~image-to-text-ocr/run-sync-get-dataset-items",
  {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.APIFY_TOKEN}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify(input),
  }
);
const items = await res.json();
console.log(items.length, items[0]);

Python

# pip install apify-client   (set APIFY_TOKEN in your environment)
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ["APIFY_TOKEN"])
run_input = {
    "urls": [
        "https://github.com/tesseract-ocr/tessdoc/raw/main/images/eurotext.png",
        "https://raw.githubusercontent.com/tesseract-ocr/test/main/testing/phototest.tif"
    ],
    "languages": [
        "eng"
    ],
    "pageSegmentation": "sparse",
    "includeWords": True,
    "minWordConfidence": 50
}

run = client.actor("actor-forge/image-to-text-ocr").call(run_input=run_input)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

The run-sync-get-dataset-items endpoint waits for the run (up to 5 minutes) and returns the dataset rows directly. For longer runs, start the run asynchronously and read the dataset when it finishes, as the Python example does. Replace APIFY_TOKEN with your own token from the Apify console.

Step-by-step guides

How to Extract Text from Images and Screenshots in Bulk

Send image URLs to the Image to Text OCR actor, use the sparse segmentation mode for screenshots, and read the text and confidence per image. It…

Related actors

OCR — Scanned PDF & Image to Text (Tesseract, 29 Languages)

Extract text from scanned PDFs and images (PNG, JPEG, TIFF, WebP, GIF, BMP) with Tesseract 5 OCR in 29 languages. PDF pages that already have text…

$3 per 1,000 · page ocr

PDF OCR — Scanned PDF to Searchable Text (29 Languages)

OCR scanned PDFs to text page by page with Tesseract 5 in 29 languages. Pages that already have a text layer are read directly at a tenth of the…

$3 per 1,000 · page ocr

Any URL to Markdown — Web Pages, PDF, Word, Excel & OCR

Turn any URL into clean, LLM-ready Markdown: web pages, PDFs, Word, Excel, PowerPoint, EPUB, CSV and JSON, plus OCR for images and scanned PDFs. One…

$1 per 1,000 · page result

Try Image to Text OCR on Apify. Pay only for the results you get.

Run on Apify →

More Documents, OCR & AI-Ready Text tools · All actors