Image to Text OCR: Text, Lines and Confidence avatar

Image to Text OCR: Text, Lines and Confidence

Pricing

from $3.50 / 1,000 image reads

Go to Apify Store
Image to Text OCR: Text, Lines and Confidence

Image to Text OCR: Text, Lines and Confidence

Reads each image URL you list once and returns the text found in it, with per-line confidence and positions. Tesseract OCR runs inside the Actor: no outside API, no key. English, PNG, JPEG, WebP and BMP.

Pricing

from $3.50 / 1,000 image reads

Rating

0.0

(0)

Developer

angel nguyen

angel nguyen

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

a day ago

Last modified

Features

Limited permissions

Share

Turn image to text with an OCR API you call like any other Apify Actor: give it a list of image URLs and it will extract text from images in bulk, one row per image. This bulk OCR runs inside the Actor with Tesseract, so no image leaves the run for an outside service and you need no key.

What this Actor returns

Reads each image you list once, runs Tesseract OCR inside the Actor with no outside API or key, returns the text with per-line confidence and positions, charges per image with text and no run fee of its own, and gives every failed image an error row that says why.

Each image gives one row with the full text, the line and word counts, a mean confidence from 0 to 100, and up to 500 lines, each with its own confidence and pixel box. You can feed the rows straight into a spreadsheet, a search index or an AI agent.

Version 0.1 reads English only and accepts PNG, JPEG, WebP and BMP images.

Images belong to their owners, as do the words read off them, and you are responsible for using the output under those owners' terms.

The Actor keeps no copy of any image and writes no extracted text to its log.

Input

The happy path needs one field:

{ "imageUrls": ["https://raw.githubusercontent.com/naptha/tesseract.js/master/tests/assets/images/simple.png"] }

The full example input, which is the form's prefill:

{
"imageUrls": [
"https://raw.githubusercontent.com/naptha/tesseract.js/master/tests/assets/images/testocr.png",
"https://raw.githubusercontent.com/naptha/tesseract.js/master/tests/assets/images/simple.png",
"https://raw.githubusercontent.com/naptha/tesseract.js/master/tests/assets/images/bill.png"
],
"maxImages": 3
}
FieldTypeRequiredMeaning
imageUrlsarray of stringsyesAbsolute http or https image URLs, 1 to 500 per run.
maxImagesintegernoRead at most this many unique URLs, in input order (1 to 500, default 50).

A repeated URL is read once. URLs past maxImages get no request.

Output

FieldTypeMeaning
imageUrlstringThe image URL as given (error row: the URL that failed, or empty).
finalUrlstringThe URL after redirects.
httpStatusinteger or nullThe final HTTP status (error row: null when none).
imageTypestringpng, jpeg, webp or bmp, read from the first bytes of the file.
imageBytesintegerSize of the image in bytes.
languagestringOCR language: eng.
textstringThe recognized text, trailing spaces and trailing blank lines removed.
textLengthintegerLength of text in Unicode code points.
lineCountintegerNumber of text lines found.
wordCountintegerNumber of words found.
meanConfidencenumberMean recognition confidence, 0 to 100.
linesarray of objectsUp to 500 lines: text, confidence, x0, y0, x1, y1.
sourceUrlstringThe URL the image was read from.
checkedAtstringUTC start time of the run.
errorbooleanError rows only: true.
errorCodestringError rows only: the code below.
inputstringError rows only: the input entry or field that failed.
errorMessagestringError rows only: why.

A real row, from the simple.png example image:

{"imageUrl":"https://raw.githubusercontent.com/naptha/tesseract.js/master/tests/assets/images/simple.png","finalUrl":"https://raw.githubusercontent.com/naptha/tesseract.js/master/tests/assets/images/simple.png","httpStatus":200,"imageType":"png","imageBytes":1305,"language":"eng","text":"Tesseract.js","textLength":12,"lineCount":1,"wordCount":1,"meanConfidence":91,"lines":[{"text":"Tesseract.js","confidence":91,"x0":82,"y0":76,"x1":216,"y1":99}],"sourceUrl":"https://raw.githubusercontent.com/naptha/tesseract.js/master/tests/assets/images/simple.png","checkedAt":"2026-11-23T18:20:35.885Z"}

Measured from our own machine on 2026-11-23: the example input gave 3 image rows and 0 error rows in a 3.3 second run (285, 12 and 709 characters of text; 8, 1 and 15 lines).

Every run also writes a SUMMARY record to its key-value store: requests, robots.txt reads, redirects, OCR seconds per image, error rows by code, duplicates and run seconds.

Robots and pacing

  • robots.txt is read once per host per run, before any image on that host, with the product token image-ocr-text.
  • A path robots.txt disallows is never requested. A robots.txt that answers 5xx or does not answer blocks the whole host for that run.
  • Crawl-delay is honoured up to 30 s; a host asking for more is not read.
  • At least 1 s passes between two requests to one host. One request runs at a time.
  • The User-Agent names this Actor: image-ocr-text/0.1.

Errors

Every failed input or image gives one error row. Error rows are never charged.

errorCodeWhen
NO_INPUTimageUrls is empty or absent.
INVALID_INPUTA URL is not absolute http or https, there are over 500, or maxImages is out of range.
ROBOTS_DISALLOWEDrobots.txt disallows the path, or asks for a Crawl-delay over 30 s.
ROBOTS_UNREACHABLErobots.txt answered 5xx or did not answer.
SOURCE_HTTP_ERRORThe image answered an error status, timed out, or redirected more than 5 times.
SOURCE_TOO_LARGEThe image is over 10 MB.
NOT_IMAGEThe file is not PNG, JPEG, WebP or BMP.
OCR_FAILEDThe OCR engine could not read the file.
NO_TEXTThe image holds no readable text.
NO_RESULTSNo image row came out of the run.

The run ends SUCCEEDED when at least one image row was delivered, and FAILED with a message naming the codes when none was.

Pricing

  • 0.0035 USD per image read (3.50 USD per 1,000 images).
  • Start charge: 0.00005 USD per started GB of run memory, at least one; at the default 1 GB that is 0.00005 USD per run.

Error rows, images with no text and duplicates are free.

Use with the Apify MCP server and AI agents

An agent connected to the Apify MCP server can call this Actor as a tool: pass imageUrls, wait for the run, and read the dataset. Every row has the same flat fields, and errors arrive as rows with an errorCode, so an agent can tell a blank image from a broken link without parsing log text.

Credits

Support and feedback

Open an issue on the Issues tab. Issues are answered within 14 days.