# Image OCR — Extract Text from Images in Bulk (30 languages) (`openregistry/image-ocr`) Actor

Read the text in hundreds of images by URL: screenshots, scanned pages, receipts, signs, slides. PNG, JPEG, WebP, GIF, BMP, TIFF. 30 languages, confidence score, optional word boxes. Open-source Tesseract engine, no API key. Pay per image.

- **URL**: https://apify.com/openregistry/image-ocr.md
- **Developed by:** [Mahé Perrin](https://apify.com/openregistry) (community)
- **Categories:** AI, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.50 / 1,000 image reads

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Image OCR — extract text from images in bulk

Turn **images into text**: screenshots, scanned documents, photographed receipts and invoices, slides, posters, product
labels, memes. Give a list of image links, get one row per image with the full text, a word count and a confidence score.

**$1.50 per 1,000 images.** No API key, no subscription; images that cannot be read are not charged.

### Why this tool

- **Bulk**: hundreds of images in one run, from a list or a pasted spreadsheet column.
- **30 languages**, mixed in the same image if needed (up to 4 per run): English, French, German, Spanish, Italian,
  Portuguese, Dutch, Polish, Russian, Ukrainian, Arabic, Hebrew, Hindi, Japanese, Chinese, Korean, Vietnamese, Thai…
- **Confidence score** per image to spot bad scans, and optional **word boxes** to locate each word.
- **Private by design**: the open-source Tesseract engine runs inside the Actor; images are not sent to a third-party
  OCR API.

### Input

| Field | What it does |
|---|---|
| `imageUrls` / `urlsText` | Public image links (PNG, JPEG, WebP, GIF, BMP, TIFF, max 20 MB) |
| `languages` | Languages present in the images (default English) |
| `includeWords` | Add every word with confidence and bounding box |
| `maxResults` | Stops the run, so you control the cost |

```json
{ "imageUrls": ["https://tesseract.projectnaptha.com/img/eng_bw.png"], "languages": ["eng"] }
```

### Output

| Field | Example |
|---|---|
| `imageUrl` | the image read |
| `text` | full text, line breaks kept, extra spaces removed |
| `words`, `lines` | 142, 18 |
| `confidence` | 0–100, average recognition confidence |
| `languages`, `bytes`, `ms` | eng+fra, 182345, 2140 |
| `wordBoxes` | (optional) `[{ "text": "Invoice", "confidence": 96, "bbox": { "x0": 40, "y0": 32, "x1": 180, "y1": 61 } }]` |
| `error` | only on failed rows (not charged) |

### Pricing

Pay per event: **$0.0015 per image** read. Invalid links, non-image files, downloads that fail and images over 20 MB
give an error row that is **not charged**.

### Tips and limits

- Best results on clear, horizontal, printed text at a decent resolution (text at least ~20 px high). Handwriting,
  heavy perspective, very small or stylised fonts give low confidence.
- For PDFs that already contain text, use **PDF Text Extractor** from the same publisher: it is faster and exact.
- Only process images you have the right to use; extracted personal data stays under your responsibility (GDPR).

# Actor input Schema

## `imageUrls` (type: `array`):

Public links to images (PNG, JPEG, WebP, GIF, BMP, TIFF), up to 20 MB each.

## `urlsText` (type: `string`):

Image links separated by new lines, commas or spaces.

## `languages` (type: `array`):

Up to 4. Pick only the languages actually present: each extra language slows the run a little.

## `includeWords` (type: `boolean`):

Add every word with its confidence and bounding box (x0, y0, x1, y1) — useful to locate text or highlight it.

## `maxResults` (type: `integer`):

The run stops once this many images are read, so you control the cost.

## Actor input object example

```json
{
  "imageUrls": [
    "https://tesseract.projectnaptha.com/img/eng_bw.png"
  ],
  "languages": [
    "eng"
  ],
  "includeWords": false,
  "maxResults": 1000
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "imageUrls": [
        "https://tesseract.projectnaptha.com/img/eng_bw.png"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("openregistry/image-ocr").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "imageUrls": ["https://tesseract.projectnaptha.com/img/eng_bw.png"] }

# Run the Actor and wait for it to finish
run = client.actor("openregistry/image-ocr").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "imageUrls": [
    "https://tesseract.projectnaptha.com/img/eng_bw.png"
  ]
}' |
apify call openregistry/image-ocr --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,openregistry/image-ocr"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/Ccd0b1fO1CmBecdRD/builds/AQwCcTu8NcXbYGwvZ/openapi.json
