Image to Text OCR API with Boxes, HEIC to JPG avatar

Image to Text OCR API with Boxes, HEIC to JPG

Pricing

from $2.00 / 1,000 image read (text found)s

Go to Apify Store
Image to Text OCR API with Boxes, HEIC to JPG

Image to Text OCR API with Boxes, HEIC to JPG

Read text from images (JPEG, PNG, WebP, HEIC, AVIF) with line boxes and confidence, and convert iPhone HEIC photos to upright JPG. For AI agents and MCP. $0.002 per image with text; no text or errors are free.

Pricing

from $2.00 / 1,000 image read (text found)s

Rating

0.0

(0)

Developer

FFS Marketing

FFS Marketing

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

an hour ago

Last modified

Features

Limited permissions

Share

Read the text in any image and hand it to your agent as JSON. Send image links or files (photos, screenshots, scans, receipts, signs, slides) and get back the text in reading order, every line with its box and confidence, and optionally every word. iPhone HEIC photos and AVIF work as they are, and sideways camera photos are turned upright first. Need a clean image too? Ask for a JPEG, PNG or WebP copy, rotated and resized to fit Claude or GPT vision limits.

Works as a tool for AI agents. Add it to Claude, ChatGPT, Cursor, VS Code or any MCP client through Apify's MCP server (https://mcp.apify.com/?tools=fluidfaith/image-to-text-ocr), or call it with one API request. JSON in, JSON out. Setup is in Use it from an agent.

Costs $0.002 per image with text. Images with no text, failed downloads, unsupported files and errors are free, and your maximum charge per run is never exceeded.

Why use it

  • Cheaper than sending pixels to a vision model. Text from a screenshot or receipt costs a fraction of a vision call, and the agent gets exact characters it can search, quote and compare.
  • Boxes, not just a blob of text. Every line comes with x, y, w, h in the original image's pixels and a confidence score, so the agent can find where a total, a heading or a button label is, or ignore low-confidence noise.
  • HEIC and AVIF just work. iPhone photos, AVIF from the web, JPEG, PNG, WebP, GIF, BMP and TIFF. No conversion step first.
  • Upright and resized. The camera's EXIF rotation is applied before reading, and the optional converted copy (outputFormat) can be shrunk to a longest side such as 1568 px for Claude vision.
  • Six languages. English, Spanish, French, German, Portuguese and Italian, up to three at once.
  • Fast and predictable. A typical image takes 1 to 3 seconds. Each image has a hard time limit; a stuck image comes back as an error row and is not charged.

What you get

FieldWhat it is
index, sourcePosition of the image in your input (rows arrive in the order images finish) and its link or file name.
statusOK (text found, charged), NO_TEXT (read, no text, free), ERROR (free) or SKIPPED (past your maximum charge, free).
textAll text in reading order; paragraphs separated by a blank line.
lines[{ "text", "confidence", "box": { "x", "y", "w", "h" } }] in the original image's pixels (after upright rotation).
wordsWith includeWords: the same for every word.
meanConfidenceAverage word confidence, 0 to 100. Below about 60 the image is probably blurry, tiny or handwritten.
lineCount, wordCountCounts.
formatWhat the file really is: jpeg, png, webp, heic, avif, gif, bmp, tiff.
width, heightSize of the upright image in pixels.
orientationFixedtrue when the photo was stored sideways or upside down and was turned upright.
imageUrl, imageWith outputFormat: link to the converted JPEG, PNG or WebP, and its format, size and bytes.
chargedWhat this image cost.
errorWhy an image failed, in plain words (always free).

A run summary (OUTPUT in the key-value store) has the counts, the total charged and stoppedAtSpendingCap.

Input

{
"urls": ["https://raw.githubusercontent.com/faithdrivencreator/apify-agent-tools/main/image-to-text-ocr/samples/invoice.png"],
"languages": ["eng"],
"layout": "auto",
"includeWords": false,
"outputFormat": "none"
}
FieldDefaultWhat it does
urlsPublic image links, up to 500 per run, 25 MB and 60 megapixels each (24 megapixels below 1 GB of memory).
filesImages sent inline: [{"name": "IMG_0001.HEIC", "base64": "..."}], up to 10 files of 10 MB.
ocrtrueTurn off to only convert images (then outputFormat is required).
languages["eng"]Up to 3 of eng, spa, fra, deu, por, ita.
layoutautoauto for documents, screenshots and most photos; block for one block (receipts, labels); sparse for scattered text (signs, posters, app screens); line for a single line.
includeWordsfalseAlso return every word with its box.
minConfidence0Drop words below this confidence (0 to 100).
outputFormatnonejpeg, png or webp: also save an upright converted copy and return its link.
outputMaxSide0Shrink the copy so its longest side is at most this many pixels. 0 keeps the size.
quality85JPEG or WebP quality.
maxConcurrency4Images in parallel (lowered to fit memory).

Output

{
"index": 0,
"source": "https://raw.githubusercontent.com/faithdrivencreator/apify-agent-tools/main/image-to-text-ocr/samples/invoice.png",
"status": "OK",
"format": "png",
"width": 900,
"height": 420,
"orientationFixed": false,
"text": "INVOICE 4821\nTotal due: $1,347.50\nPay by December 15, 2026",
"lineCount": 3,
"wordCount": 10,
"meanConfidence": 96.2,
"lines": [
{ "text": "INVOICE 4821", "confidence": 96.2, "box": { "x": 55, "y": 58, "w": 304, "h": 37 } }
],
"imageUrl": null,
"charged": { "event": "image-read", "count": 1, "usd": 0.002 },
"error": null
}

Use it from an agent

Through Apify's MCP server (Claude, ChatGPT, Cursor, VS Code, any MCP client)

{
"mcpServers": {
"image-ocr": {
"url": "https://mcp.apify.com/?tools=fluidfaith/image-to-text-ocr",
"headers": { "Authorization": "Bearer <APIFY_TOKEN>" }
}
}
}

Claude Code: claude mcp add --transport http image-ocr "https://mcp.apify.com/?tools=fluidfaith/image-to-text-ocr" --header "Authorization: Bearer $APIFY_TOKEN". Or over stdio: npx -y @apify/actors-mcp-server --tools fluidfaith/image-to-text-ocr with APIFY_TOKEN set.

A good instruction for agents: "When you need the words in an image (a screenshot, receipt, sign or scan), call image-to-text-ocr with its link and use text; use lines[].box to say where something is. If meanConfidence is under 60, say the image is hard to read."

Through the API (one call, waits for the result)

curl -s -X POST "https://api.apify.com/v2/acts/fluidfaith~image-to-text-ocr/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"urls":["https://raw.githubusercontent.com/faithdrivencreator/apify-agent-tools/main/image-to-text-ocr/samples/invoice.heic"],"outputFormat":"jpeg"}'

From Python

from apify_client import ApifyClient
import os
client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("fluidfaith/image-to-text-ocr").call(run_input={"urls": ["https://example.com/receipt.jpg"], "layout": "block"})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item["status"], item["text"] or item["error"])

Pricing

Pay per event: $0.002 per image where text was found. No start fee. Free: images with no text, failed or blocked downloads, unsupported or broken files, and images that hit the time limit. With OCR turned off (convert only), $0.001 per converted image. 1,000 images with text cost $2. Set a maximum charge per run and the Actor stops before it, never after; the summary then shows stoppedAtSpendingCap: true, and images past the limit come back as SKIPPED, free.

Safety

  • Only public addresses are fetched: localhost, private networks, link-local and cloud metadata addresses (such as 169.254.169.254) are refused, including through redirects and DNS answers that point at them.
  • Each image is decoded and read in its own process with a hard time limit, and images over 60 megapixels are refused, so a hostile file cannot hang or exhaust the run.
  • No logins, no cookies, no captcha solving.

Privacy

Images and text stay in your own Apify run storage; nothing is sent to any other service (OCR runs inside the Actor, no third-party API). Logs hold only the link, status and counts, never the text.

FAQ

Is it good on handwriting? Printed text is the strength. Neat handwriting sometimes works; check meanConfidence.

What about PDFs? Use PDF to Markdown with Tables, which reads every page (with OCR for scans) and returns tables as JSON.

Why was my image NO_TEXT? No readable text was found (a photo with no words, or text too small or blurry). It is free. Try layout: "sparse" for scattered text.

Can I just convert HEIC to JPG? Yes: "ocr": false, "outputFormat": "jpeg". $0.001 per image.

How long are converted images kept? In your run's key-value store, for as long as your Apify plan keeps run storage.

Other Actors by Fluid Faith

Load them together as MCP tools: https://mcp.apify.com/?tools=fluidfaith/image-to-text-ocr,fluidfaith/pdf-to-markdown-tables,fluidfaith/mermaid-chart-renderer,fluidfaith/visual-diff-gate,fluidfaith/mobile-qa-gate,fluidfaith/lighthouse-gate,fluidfaith/media-probe