# Image to Text OCR (Bulk, 10 Languages, Word Boxes) (`mrlarryjohnson/image-ocr-text-extractor`) Actor

Extract text from images in bulk with open-source Tesseract OCR: PNG, JPG, WEBP, TIFF, GIF, BMP. Returns plain text, average confidence and optional word-level bounding boxes. 10 languages. Images are processed inside the run and not stored.

- **URL**: https://apify.com/mrlarryjohnson/image-ocr-text-extractor.md
- **Developed by:** [Larry Johnson](https://apify.com/mrlarryjohnson) (community)
- **Categories:** AI, Developer tools, Automation
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 image processeds

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 to Text OCR (Bulk, 10 Languages, Word Boxes)

Turn screenshots, scans, receipts, signs and photos of documents into text, in bulk. Give it image URLs and get back the text with paragraph breaks, an average **confidence** score and, if you want them, **word-level bounding boxes** for highlighting, redaction or layout work.

It runs the open-source **Tesseract 5** engine inside the Actor. No third-party OCR API is used, and images are processed in memory and **not stored**.

### Features

- PNG, JPG, WEBP, TIFF, GIF, BMP (up to 20 MB, 40 MP each); EXIF rotation is fixed automatically
- 10 languages: English, Spanish, French, German, Portuguese, Italian, Dutch, Polish, Turkish, Vietnamese (combine several)
- Layout modes for documents, single blocks, sparse text (UI screenshots, signs) and single lines
- Small images are upscaled for better accuracy
- Failed images (404, not an image, too large) come back as error rows and **cost nothing**

### Input

| Field | Default | Notes |
|---|---|---|
| `imageUrls` | — | Up to 2,000 public http(s) URLs |
| `languages` | `["eng"]` | Language(s) printed in the image |
| `pageSegmentation` | `auto` | `auto`, `singleBlock`, `sparse`, `singleLine` |
| `includeWords` | `false` | Adds `words: [{text, confidence, left, top, width, height}]` |
| `concurrency` | `2` | 1–4 |

### Output example

```json
{
  "imageUrl": "https://.../invoice.png",
  "text": "INVOICE 2026-0417\nTotal due: $1,234.56\n\nThank you for your business",
  "confidence": 95.5, "wordCount": 9, "width": 1200, "height": 300, "languages": ["eng"], "error": null
}
```

### Pricing (pay per event)

- **$2.00 per 1,000 images** (`image-processed`, $0.002 each), plus the standard $0.00005 actor start.
- Charged only for images that were downloaded and OCR'd. Errors are free. Respects your run's maximum cost.

### Good to know

- Tesseract is excellent on printed text and screenshots, fair on photos and poor on handwriting. Check `confidence` (under ~60 usually means the source image is the problem).
- For security, only public http(s) URLs are fetched. Private, loopback and cloud-metadata addresses are refused.
- Only process images you have the right to use.

Credits: Tesseract OCR (Apache-2.0).

***

*Actively maintained. Issues answered within 24 hours on the Issues tab.*

# Actor input Schema

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

Public http(s) links to images (PNG, JPG, WEBP, TIFF, GIF, BMP), max 20 MB each. Up to 2,000 per run. Only process images you have the right to use.

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

Tesseract language codes. Pick the language(s) printed in the images; combining several is slower.

## `pageSegmentation` (type: `string`):

auto = documents/pages; singleBlock = one block of text; sparse = signs, screenshots, scattered text; singleLine = one line (e.g. a label).

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

Adds every recognized word with its confidence and pixel bounding box.

## `concurrency` (type: `integer`):

Images processed at the same time.

## Actor input object example

```json
{
  "imageUrls": [
    "https://tesseract.projectnaptha.com/img/eng_bw.png"
  ],
  "languages": [
    "eng"
  ],
  "pageSegmentation": "auto",
  "includeWords": false,
  "concurrency": 2
}
```

# 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("mrlarryjohnson/image-ocr-text-extractor").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("mrlarryjohnson/image-ocr-text-extractor").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 mrlarryjohnson/image-ocr-text-extractor --silent --output-dataset

```

## MCP server setup

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

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/1eCWU9hm2xtKHxB2d/builds/yoOfFiDh9Wms323S0/openapi.json
