Image to Text OCR: Text, Lines and Confidence
Pricing
from $3.50 / 1,000 image reads
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
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
a day ago
Last modified
Categories
Features
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}
| Field | Type | Required | Meaning |
|---|---|---|---|
| imageUrls | array of strings | yes | Absolute http or https image URLs, 1 to 500 per run. |
| maxImages | integer | no | Read 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
| Field | Type | Meaning |
|---|---|---|
| imageUrl | string | The image URL as given (error row: the URL that failed, or empty). |
| finalUrl | string | The URL after redirects. |
| httpStatus | integer or null | The final HTTP status (error row: null when none). |
| imageType | string | png, jpeg, webp or bmp, read from the first bytes of the file. |
| imageBytes | integer | Size of the image in bytes. |
| language | string | OCR language: eng. |
| text | string | The recognized text, trailing spaces and trailing blank lines removed. |
| textLength | integer | Length of text in Unicode code points. |
| lineCount | integer | Number of text lines found. |
| wordCount | integer | Number of words found. |
| meanConfidence | number | Mean recognition confidence, 0 to 100. |
| lines | array of objects | Up to 500 lines: text, confidence, x0, y0, x1, y1. |
| sourceUrl | string | The URL the image was read from. |
| checkedAt | string | UTC start time of the run. |
| error | boolean | Error rows only: true. |
| errorCode | string | Error rows only: the code below. |
| input | string | Error rows only: the input entry or field that failed. |
| errorMessage | string | Error 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.
| errorCode | When |
|---|---|
| NO_INPUT | imageUrls is empty or absent. |
| INVALID_INPUT | A URL is not absolute http or https, there are over 500, or maxImages is out of range. |
| ROBOTS_DISALLOWED | robots.txt disallows the path, or asks for a Crawl-delay over 30 s. |
| ROBOTS_UNREACHABLE | robots.txt answered 5xx or did not answer. |
| SOURCE_HTTP_ERROR | The image answered an error status, timed out, or redirected more than 5 times. |
| SOURCE_TOO_LARGE | The image is over 10 MB. |
| NOT_IMAGE | The file is not PNG, JPEG, WebP or BMP. |
| OCR_FAILED | The OCR engine could not read the file. |
| NO_TEXT | The image holds no readable text. |
| NO_RESULTS | No 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
- Tesseract OCR engine, used under the Apache License 2.0: https://raw.githubusercontent.com/tesseract-ocr/tesseract/main/LICENSE
- tessdata_fast English language data (eng.traineddata), used under the Apache License 2.0: https://raw.githubusercontent.com/tesseract-ocr/tessdata_fast/main/LICENSE
- tesseract.js, used under the Apache License 2.0: https://raw.githubusercontent.com/naptha/tesseract.js/master/LICENSE.md
- None of the three repositories has a NOTICE file at its root (read 2026-11-23).
- The example images come from the tesseract.js repository tests (Apache License 2.0).
Support and feedback
Open an issue on the Issues tab. Issues are answered within 14 days.