Batch Image Text OCR Extractor avatar

Batch Image Text OCR Extractor

Pricing

from $1.81 / 1,000 image extracteds

Go to Apify Store
Batch Image Text OCR Extractor

Batch Image Text OCR Extractor

Run batch image OCR on supplied images and export text, reading-order blocks, word boxes, confidence, dimensions, and source provenance.

Pricing

from $1.81 / 1,000 image extracteds

Rating

0.0

(0)

Developer

Stas Persiianenko

Stas Persiianenko

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Share

Turn batches of supplied images into structured OCR records without an OCR API key. This batch image OCR Actor returns complete text, reading-order paragraph blocks, pixel bounding boxes, confidence, dimensions, language, status, and source provenance.

Use it for recurring document ingestion, searchable archives, RAG pipelines, accessibility workflows, receipt queues, screenshot indexing, and human-review systems. It accepts anonymous direct image URLs and base64/data-URI images supplied in Actor input.

What does Batch Image Text OCR Extractor do?

For each image, the Actor:

  1. validates the input and public URL destination;
  2. downloads or decodes up to 20 MB of image data;
  3. validates the image and reads its pixel dimensions;
  4. recognizes text with a local Tesseract model;
  5. orders paragraph blocks and optional words;
  6. exports one typed dataset row with provenance.

OCR runs inside the Actor. Images are not sent to a third-party OCR API.

Who is it for?

  • Document and RAG teams turning scans or screenshots into indexable text.
  • Operations teams processing recurring receipts, labels, forms, or evidence images.
  • Publishers and researchers making image-only text searchable.
  • Developers needing stable JSON coordinates instead of plain copied text.
  • QA and accessibility teams checking visible strings in screenshots.

Why use structured batch image OCR?

Plain OCR text loses layout and origin. This Actor keeps:

  • input order and image identity;
  • original anonymous URL when applicable;
  • paragraph reading order;
  • paragraph and optional word bounding boxes;
  • confidence at image, block, and word level;
  • image dimensions and recognition language;
  • explicit succeeded, no_text, or failed status.

A failed image does not discard results from other images. If every image fails or contains no readable text, the Actor fails clearly after writing diagnostic rows.

Supported image inputs

Use startUrls for directly downloadable public HTTP(S) images. The server must return an image/* content type without login or cookies.

Use inlineImages for bytes you already have. Each entry needs a filename and either raw base64 or an image/...;base64,... data URI. Inline input is useful for files stored by a previous automation step.

Supported decoding depends on Sharp and Tesseract and commonly includes PNG, JPEG, WebP, TIFF, BMP, and non-animated GIF images. Each image is limited to 20 MB.

Input parameters

FieldTypeDefaultDescription
startUrlsarrayAnonymous direct public image URLs.
inlineImagesarrayObjects with name and base64/data-URI data.
languagestringengOCR model: eng, deu, fra, spa, ita, por, or nld.
includeWordsbooleanfalseInclude ordered words, confidence, and word boxes.
maxImagesinteger25Process at most 1–100 supplied images.

Provide at least one URL or inline image. URLs and inline images are processed in that order.

Getting started

  1. Open the Actor input page.
  2. Add one or more direct image URLs under Image URLs.
  3. Select the language visible in the images.
  4. Enable word details if your workflow needs token-level boxes.
  5. Set a batch limit.
  6. Start the run and open the OCR results dataset view.
  7. Export the rows as JSON, CSV, Excel, XML, or RSS through Apify Dataset tooling.

Example input:

{
"startUrls": [
{ "url": "https://placehold.co/900x250/png?text=Invoice+ACME+Total+123.45" }
],
"language": "eng",
"includeWords": true,
"maxImages": 1
}

Output fields

FieldMeaning
imageIndexOne-based source order.
imageNameSupplied name or URL filename.
sourceUrlOriginal URL, or null for inline bytes.
sourceTypeurl or inline.
statussucceeded, no_text, or failed.
textComplete recognized text in reading order.
confidenceOverall Tesseract confidence from 0 to 100.
languageModel used for recognition.
width, heightImage dimensions in pixels.
blockCountNumber of paragraph blocks.
blocksOrdered text blocks, confidence, boxes, and optional words.
errorConcise per-image error, otherwise null.
processedAtISO 8601 processing time.

Coordinates use source-image pixels. Each box contains x, y, width, and height.

Output example

This is abbreviated from a real local run of the example input:

{
"imageIndex": 1,
"imageName": "png",
"sourceUrl": "https://placehold.co/900x250/png?text=Invoice+ACME+Total+123.45",
"sourceType": "url",
"status": "succeeded",
"text": "Invoice ACME Total 123.45",
"confidence": 95,
"language": "eng",
"width": 900,
"height": 250,
"blockCount": 1,
"blocks": [{
"order": 1,
"text": "Invoice ACME Total 123.45",
"confidence": 96,
"boundingBox": { "x": 183, "y": 108, "width": 534, "height": 34 }
}],
"error": null,
"processedAt": "2026-09-10T14:31:20.214Z"
}

How much does it cost to extract text from images?

Pay-per-event pricing has a $0.001 start fee and charges only an image that produces readable text. Failed downloads and no-text images have no image event charge.

PlanPrice per successful image
Free$0.003473
Bronze$0.00302
Silver$0.0023556
Gold$0.001812
Platinum$0.001812
Diamond$0.001812

At Bronze rates, 10 successful images cost about $0.0312, 100 cost about $0.303, and 1,000 cost about $3.021, including one start. Actual charges follow successful charge events shown on the run.

Document ingestion and RAG workflow

A practical pipeline is:

  1. store or discover authorized image assets;
  2. run this Actor with stable source order;
  3. keep sourceUrl, imageIndex, and bounding boxes as citations;
  4. split blocks[].text for embeddings;
  5. retain confidence for review thresholds;
  6. send low-confidence blocks to human review;
  7. index accepted text in your search or vector store.

Enable includeWords only when word-level highlights or citations justify the larger output.

Scheduling and integrations

Use Apify Schedules for recurring authorized image batches. Connect dataset output to webhooks, Make, Zapier, Google Sheets, cloud storage, or your own ingestion service.

Inputs are stateless: the Actor does not compare historical runs or emit change alerts. Build comparisons downstream using stable provenance and your own asset IDs or filenames.

Run from the Apify API

Replace YOUR_TOKEN with an Apify token.

curl -X POST \
"https://api.apify.com/v2/acts/automation-lab~batch-image-text-ocr/runs?token=YOUR_TOKEN&waitForFinish=300" \
-H "Content-Type: application/json" \
-d '{"startUrls":[{"url":"https://placehold.co/900x250/png?text=Invoice+Total+123.45"}],"language":"eng"}'

Fetch results using the run's defaultDatasetId:

$curl "https://api.apify.com/v2/datasets/DATASET_ID/items?clean=true&format=json"

JavaScript client

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation-lab/batch-image-text-ocr').call({
startUrls: [{ url: 'https://placehold.co/900x250/png?text=Invoice+Total+123.45' }],
language: 'eng',
includeWords: true,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items[0].text);

Python client

from apify_client import ApifyClient
client = ApifyClient("YOUR_TOKEN")
run = client.actor("automation-lab/batch-image-text-ocr").call(run_input={
"startUrls": [{"url": "https://placehold.co/900x250/png?text=Invoice+Total+123.45"}],
"language": "eng",
"includeWords": True,
})
items = client.dataset(run["defaultDatasetId"]).list_items().items
print(items[0]["text"])

Use with Apify MCP

Claude Code setup: add the Actor with:

claude mcp add --transport http apify \
"https://mcp.apify.com?tools=automation-lab/batch-image-text-ocr"

Claude Desktop setup: add this remote server configuration. Cursor setup and VS Code setup use the same MCP server URL in their MCP settings:

{
"mcpServers": {
"apify": {
"url": "https://mcp.apify.com?tools=automation-lab/batch-image-text-ocr"
}
}
}

Example prompts:

  • “Extract ordered text blocks and confidence from these authorized image URLs.”
  • “OCR this invoice batch and return word boxes for highlighting.”
  • “Prepare these screenshot texts and provenance for a RAG index.”

Reliability, security, and limits

  • URL fetches reject credentials, localhost, private, link-local, and non-HTTP(S) destinations.
  • Redirect destinations are checked before requesting them.
  • Downloads retry transient network, 429, and selected 5xx failures at most twice.
  • Images are processed serially to keep OCR memory stable.
  • The hard input cap is 100 images, 20 MB per image, and 40 megapixels per image.
  • OCR quality depends on resolution, contrast, orientation, typeface, handwriting, and language.
  • The Actor does not perform translation, PDF rendering, handwriting specialization, table reconstruction, or semantic document classification.

Legality and responsible use

Process only images you are authorized to access and use. Respect copyrights, confidentiality, contractual restrictions, and applicable privacy laws. Avoid placing sensitive image bytes directly in reusable public Tasks. This Actor does not bypass authentication or access controls.

Troubleshooting

Why did a URL fail with “did not return an image”?

The URL may point to an HTML viewer rather than the image file. Use the direct asset URL that returns an image/* content type, or provide authorized bytes through inlineImages.

Why is text missing or confidence low?

Use a higher-resolution, upright image with stronger contrast. Confirm the selected language. Tesseract is optimized for printed text; stylized or handwritten text may need a specialized model.

Why did the whole run fail after writing rows?

No image produced readable text. Inspect each row's status and error; correct the URLs, bytes, language, or image quality, then rerun.

FAQ

Does it require an external OCR key? No. Recognition runs locally with Tesseract.js.

Can I process mixed languages? Use one dominant supported language per run. Split mixed-language batches into separate runs for better accuracy.

Are word boxes always returned? No. Set includeWords to true; paragraph blocks are always returned when detected.

Does it resize, crop, compress, or translate images? No. Those related search phrases were not adopted because this Actor only extracts OCR data.

Can I OCR PDFs? Not directly. Render authorized PDF pages to images first, then supply those image files or URLs.

These are separate automation-lab products; they are not automatically invoked by this Actor.