Image to Text β€” OCR with line boxes avatar

Image to Text β€” OCR with line boxes

Pricing

from $1.60 / 1,000 image reads

Go to Apify Store
Image to Text β€” OCR with line boxes

Image to Text β€” OCR with line boxes

Image URLs in, the text read from each out: line by line with confidence and bounding boxes, in up to three languages. PNG, JPEG, WebP, TIFF, BMP, GIF. Pay per image.

Pricing

from $1.60 / 1,000 image reads

Rating

0.0

(0)

Developer

Logan Parker

Logan Parker

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

5 hours ago

Last modified

Share

Give it image URLs (PNG, JPEG, WebP, TIFF, BMP, GIF first frame); it returns the text read from each, line by line with confidence and bounding boxes, in up to three languages. Use it for screenshots, photographed documents, receipts the user gave you, diagrams with labels β€” anything where the words are pixels your host cannot read. One call returns plain text in reading order plus positions an agent can reason over, and pricing is per image, so a single read costs a fraction of a cent.

Call it from an agent

Through Apify's MCP server (https://mcp.apify.com), tool call-actor:

{"actor": "hermeskd/image-to-text", "input": {"urls": ["https://raw.githubusercontent.com/tesseract-ocr/test/main/testing/phototest.tif"]}, "callOptions": {"maxTotalChargeUsd": 0.05, "timeout": 600}, "waitSecs": 30}

The call returns the run's status and its defaultDatasetId. Read the records with get-dataset-items:

{"datasetId": "<defaultDatasetId from the call>", "limit": 50}

As a dedicated tool, add https://mcp.apify.com?tools=hermeskd/image-to-text to your MCP client. One image finishes well inside the 30-second wait, so one call-actor plus one get-dataset-items is the whole exchange. maxTotalChargeUsd caps what the run can charge; when it is reached the remaining URLs come back as charge_limit_reached records and are not charged.

Input

FieldTypeRequiredDefaultMeaning
urlsarray of stringsyesβ€”Image URLs (PNG, JPEG, WebP, TIFF, BMP, GIF), http or https, 1–50 per run, up to 20 MB, 50 megapixels and 32,767 pixels on a side each.
languagesarray of stringsno["eng"]OCR language codes (ISO 639-2); at most 3. Supported: eng, deu, fra, spa, ita, por, nld, pol, ces, swe, dan, nor, fin, tur, rus, ukr.
granularityenum text Β· lines Β· wordsnolinestext returns plain text only; lines adds each line with its confidence and box; words adds each word.
minConfidenceintegerno0Drop words read with a confidence below this (0–100), and lines left with no word.

Every limit above is enforced by the input schema and again in code.

Output

One record per input URL.

FieldMeaning
urlThe input URL.
oktrue when the image was read; false with error.
textAll text read, in reading order: lines by a newline, paragraphs by a blank line. An image with no readable text gives ok: true and an empty string, and is charged β€” the read was done.
linesWith granularity: lines: each line as {text, confidence, box: {x, y, w, h}}, boxes in the image's own pixels.
wordsWith granularity: words: each word as {text, confidence, box: {x, y, w, h}}.
widthImage width in pixels, after EXIF orientation.
heightImage height in pixels, after EXIF orientation.
error{code, message} when ok is false.

Example record for the call above, as this Actor returned it in its deploy check on 2026-10-16:

{
"url": "https://raw.githubusercontent.com/tesseract-ocr/test/main/testing/phototest.tif",
"ok": true,
"text": "This is a lot of 12 point text to test the\nocr code and see if it works on all types\nof file format.\n\nThe quick brown dog jumped over the\nlazy fox. The quick brown dog jumped\nover the lazy fox. The quick brown dog\njumped over the lazy fox. The quick\nbrown dog jumped over the lazy fox.",
"lines": [
{"text": "This is a lot of 12 point text to test the", "confidence": 96.1, "box": {"x": 36, "y": 92, "w": 544, "h": 30}},
{"text": "ocr code and see if it works on all types", "confidence": 95.8, "box": {"x": 36, "y": 126, "w": 582, "h": 31}},
{"text": "of file format.", "confidence": 95.5, "box": {"x": 36, "y": 160, "w": 187, "h": 24}},
{"text": "The quick brown dog jumped over the", "confidence": 96.1, "box": {"x": 36, "y": 194, "w": 549, "h": 31}},
{"text": "lazy fox. The quick brown dog jumped", "confidence": 96.2, "box": {"x": 37, "y": 228, "w": 548, "h": 31}},
{"text": "over the lazy fox. The quick brown dog", "confidence": 96.1, "box": {"x": 36, "y": 262, "w": 561, "h": 31}},
{"text": "jumped over the lazy fox. The quick", "confidence": 96.3, "box": {"x": 43, "y": 296, "w": 518, "h": 31}},
{"text": "brown dog jumped over the lazy fox.", "confidence": 96.3, "box": {"x": 37, "y": 330, "w": 524, "h": 31}}
],
"width": 640,
"height": 480
}

Events and prices

Pay per event; platform usage is included in the price, never passed through.

EventTitleCharged whenFREE / BRONZESILVERGOLD / PLATINUM / DIAMOND
image-ocrImage readOne image read by OCR.$0.002$0.0018$0.0016

Apify also charges its standard apify-actor-start event: $0.00005 per GB of run memory (4 events, $0.0002, at the default 4,096 MB). The minimum maximum-charge a caller can set is $0.01.

Worked example on the FREE tier: 10 screenshots cost 10 Γ— $0.002 = $0.02, plus $0.0002 for the start, $0.0202 in all. Nothing is charged for a failed image.

Limits and run time

  • 1–50 URLs per run; images up to 20 MB, 50 megapixels and 32,767 pixels on a side (Tesseract's own limit β€” a very long screenshot is refused as too_large); TIFF reads its first page and GIF its first frame.
  • One image may take at most 120 seconds of OCR; an image that needs longer is answered too_large, uncharged.
  • Each request β€” its redirects and its whole body included β€” must finish within 30 seconds (the per-request timeout; a slower file is download_failed); at most 2 requests a second go to one host.
  • Images whose longer side is under 1,600 pixels are read at twice their size, which helps the small text of screenshots; boxes are always in the image's own pixels.
  • Typical run time: one image in a few seconds; a full 300-dpi page about 3 seconds of OCR at the default memory (4,096 MB, one CPU core). The default run timeout is 600 seconds.

Errors

Errors are records with ok: false and error.code; none is charged.

error.codeMeaning
download_failedThe URL did not return the file (status or network error).
not_imageNot a supported image (PNG, JPEG, WebP, TIFF, BMP, GIF), or a damaged one that cannot be decoded.
too_largeOver 20 MB, 50 megapixels or 32,767 pixels on a side, or too dense to read within 120 seconds.
robots_disallowedrobots.txt forbids fetching the URL.
blocked_hostThe host is on the deny-list, or resolves to a private or local address.
timeoutThe image did not finish within the run's time budget.
internal_errorUnexpected failure; message carries the class.
charge_limit_reachedThe run reached its maximum total charge before this URL; it was not processed.
invalid_inputThe run input passed the input schema but cannot be used (for example no URL at all); the message names the field. One record per input given, or one with url: null when none was given; nothing is processed.

The run fails only when every input failed with an Actor-side code (internal_error, timeout), so a broken Actor is visible. Every other run succeeds β€” including one where nothing was read because of the caller's own inputs (bad URL, robots, deny-list, not an image, invalid input, the charge limit), or where those and Actor-side failures are mixed.

Sources and terms

The source is the caller's image. Process only images you have the right to process. Fetching follows the Hermes fetch policy: robots.txt is obeyed for the user-agent HermesBot (and *), and a disallowed URL is refused without a request; platforms whose terms forbid automated access, and people-search sites, are on a deny-list and refused without a request; private and local addresses are refused, after DNS and on every redirect; the user-agent is HermesBot/1.0 (+https://apify.com/hermeskd); no login, cookies, credentials, CAPTCHA solving, evasion or proxies are used. The text read is returned to the caller as it is; no person, face or speaker is identified.

Not affiliated

This Actor is not affiliated with Google or with the Tesseract project. Tesseract and Pillow are used under their open-source licences.

  • pdf-to-markdown β€” PDF documents to Markdown, with OCR for scanned pages.
  • document-to-markdown β€” Word, PowerPoint, Excel and other office files to Markdown.
  • audio-to-transcript β€” speech to text.
  • video-frames β€” frames and metadata from a video.
  • image-upscale β€” image upscaling.
  • url-to-markdown β€” a web page to Markdown.
  • audio-video-convert β€” audio and video format conversion.

Changelog

  • 1.0 (2026-10-16) β€” images over 32,767 pixels on a side and images too dense to read in 120 s are refused as too_large; any image Pillow cannot decode is not_image.
  • 1.0 (2026-10-16) β€” first release: OCR of six image formats in sixteen languages, text, lines or words with confidence and boxes.