# Image OCR Text Extractor: extract text from images (`bepolabs/image-ocr`) Actor

Plain text with pixel bounding boxes and confidence per word, offline Tesseract, multilingual layouts, no AI key needed. Costs 2 USD per 1,000 processed images.

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

## Pricing

$2.00 / 1,000 processed images

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

### 🔤 What is Image OCR?

Extract text from images in bulk: scans, screenshots, letters and phone photos become searchable copy. Give it links or uploaded files and receive one row per picture with clean Markdown (headings, lists and table rows kept) and the raw characters. Optical character recognition runs inside the run with an open-source library (Apache-2.0), several scripts at once for mixed documents, and nothing is sent to an outside OCR service or AI model.

- **Document digitisation**: turn scanned letters, forms and book pages into searchable text
- **Receipts and bills**: read statements and till slips before you parse amounts and dates
- **RAG and AI agents**: feed the Markdown of screenshots and scans to your knowledge base or LLM
- **Screenshots**: pull the text out of app, chat or social media captures in bulk
- **Layout and redaction**: use the word boxes to find, highlight or blank out words on the image

![Image OCR: Extract text from images in 29 languages: plain text, clean Markdown and every word with its pixel box and confidence.](https://api.apify.com/v2/key-value-stores/wdeAWGooHdIhvFgSY/records/image-ocr-hero.png)

#### ✨ Why use this Actor?

- ✅ **29 languages**: English, German, French, Spanish, Italian, Portuguese, Dutch, Polish, Russian, Arabic, Hindi, Japanese, Korean, Chinese and more, several per image
- ✅ **Clean Markdown**: large short lines become headings, bullets and numbered items turn into lists, wrapped and hyphenated breaks are joined, tables and addresses keep their layout
- ✅ **Pixel boxes**: `x`, `y`, `width`, `height` and confidence for every word, with its block, paragraph and line
- ✅ **Noise filter**: `minConfidence` drops words Tesseract is unsure of; 50 to 60 cleans most phone photos
- ✅ **Private**: OCR runs inside the run; nothing is sent to an outside service
- ✅ **Fair price**: 0.002 USD per image; images that fail are not charged

### 📦 What data can you get with Image OCR?

| | | |
|---|---|---|
| 📝 Plain text | Ⓜ️ Markdown | 🔲 Word boxes in pixels |
| 🎯 Confidence per word and image | 🔢 Word and line count | 🌍 Languages used |
| 🖼️ Image format | 🔗 Source URL or key |  |

### 🚀 How to use Image OCR

Image OCR works in a few clicks, no coding needed:

1. [Create a free Apify account](https://console.apify.com/sign-up) (the free plan includes 5 USD of monthly credit).
2. Open [Image OCR](https://apify.com/bepolabs/image-ocr) and click **Try for free**.
3. Paste the image links (or keys of uploaded images) and pick the languages in the images.
4. Click **Start** and wait for the run to finish (most runs take seconds).
5. Download your data as JSON, CSV, Excel, XML or HTML, or send it straight to Google Sheets, Make, Zapier or your AI agent.

![How Image OCR works](https://api.apify.com/v2/key-value-stores/wdeAWGooHdIhvFgSY/records/image-ocr-workflow.png)

### ⬇️ Input

Give `imageUrls` (PNG, JPEG, WebP, BMP, PBM/PGM/PPM) or `storeKeys`; the defaults read English and return text, Markdown and word boxes.

##### Languages

Pick every language that appears in the images, for example `eng`, `deu` and `fra` for a European page; each extra one slows the run a little.

##### Smaller rows

Switch off `includeWords` and `includeText` when you only need the Markdown.

##### Limits

Up to 500 images per run; files over `maxSizeMb` (20 MB by default) are refused before download, anything above 100 million pixels is skipped, the run stops once 3 pictures hit the 5-minute time limit, and downloads are retried `maxRetries` times on network errors, 429 and 5xx.

| Field | Type | What it does | Default |
|---|---|---|---|
| **Image URLs** (`imageUrls`) | array | Direct links to images (PNG, JPEG, WebP, BMP, PBM/PGM/PPM). | `["https://tesseract.projectnaptha.com/im` |
| **Uploaded files** (`storeKeys`) | array | Keys of images stored in this run's default key-value store (upload them with the API before the run starts). |  |
| **Languages** (`languages`) | array | Languages in the images. | `["eng"]` |
| **Include words with boxes** (`includeWords`) | boolean | Every word with its pixel box (x, y, width, height), confidence and its block, paragraph and line. | `true` |
| **Include plain text** (`includeText`) | boolean | Plain text with the line breaks of the image. | `true` |
| **Min word confidence** (`minConfidence`) | integer | Words Tesseract is less sure of (0 to 100) are dropped from text, Markdown and words. | `0` |
| **Max file size (MB)** (`maxSizeMb`) | integer | Larger files are refused before they are downloaded. | `20` |
| **Retries** (`maxRetries`) | integer | Retries per download on network errors, 429 and 5xx, with exponential backoff. | `3` |

![Image OCR input form](https://api.apify.com/v2/key-value-stores/wdeAWGooHdIhvFgSY/records/image-ocr-input.png)

#### Input example

```json
{
    "imageUrls": [
        "https://tesseract.projectnaptha.com/img/eng_bw.png",
        "https://raw.githubusercontent.com/naptha/tesseract.js/master/benchmarks/data/testocr.png"
    ],
    "languages": [
        "eng"
    ]
}
```

### ⬆️ Output

Every image becomes one row with its text, Markdown, line and token totals and mean confidence, plus the word boxes when `includeWords` is on. The run summary (`OUTPUT`) counts images processed, words, images without text and per-image errors; the run fails only when no image could be read.

![Image OCR output table](https://api.apify.com/v2/key-value-stores/wdeAWGooHdIhvFgSY/records/image-ocr-output.png)

#### Output example

One row of the dataset (a bank statement, Markdown only, a real run of 2026-10-15, shortened):

```json
{
    "source": "https://raw.githubusercontent.com/naptha/tesseract.js/master/tests/assets/images/bill.png",
    "format": "png",
    "languages": "eng",
    "markdown": "FIRST CHEQUING\n\nLine of Credit 100,000.00 Rate 4.2000\n\nDate Description Number Debits Credits Balance\n31Jul2018 Forward 99,878.08 -\n01Aug2018 Clearing Cheque 4987 36.07 99,914.15 -\n…",
    "wordCount": 93,
    "lineCount": 15,
    "confidence": 86
}
```

View the results as a table or JSON in the Output tab and download them as JSON, CSV, Excel, XML, HTML or RSS. Pick the fields you need first, or take the whole dataset.

### 💰 How much does Image OCR cost?

Image OCR is priced **per event**: **2 USD per 1,000 images** (0.002 USD per image), with no monthly rental. Images that fail (download, format, size) are not charged.

| You get | You pay |
|---|---|
| 100 images read | 0.2 USD |
| 1,000 images read | 2 USD |
| 10,000 images read | 20 USD |
| 100,000 images read | 200 USD |

💡 Apify's free plan gives you 5 USD of credit every month, enough for about **2,500 images read** at no cost. Set a spending limit per run and the Actor stops there.

### ⚖️ Image OCR vs. the alternatives

| | Image OCR | Cloud OCR APIs | Copy by hand |
|---|---|---|---|
| **Text, Markdown and word boxes** | ✅ | text and boxes | ❌ |
| **Images stay private** | ✅ | ❌ | ✅ |
| **No API key or cloud account** | ✅ | ❌ | ✅ |
| **Price per 1,000 images** | 2 USD | 1.5 USD and up, plus setup | hours of work |
| **Handwriting** | ❌ | often | ✅ |

### 🔌 Integrations, API and MCP

#### Connect Image OCR to your AI agent (MCP)

Give Claude, ChatGPT, Cursor or any MCP client direct access to Image OCR through the [Apify MCP server](https://mcp.apify.com). Add this URL to its settings:

```text
https://mcp.apify.com/?actors=bepolabs/image-ocr
```

For Claude Desktop, add it under `mcpServers` in `claude_desktop_config.json`:

```json
{
    "mcpServers": {
        "image-ocr": {
            "command": "npx",
            "args": [
                "-y",
                "@apify/actors-mcp-server",
                "--actors",
                "bepolabs/image-ocr"
            ],
            "env": {
                "APIFY_TOKEN": "<your Apify API token>"
            }
        }
    }
}
```

Then just ask: *"Read the text in these three receipt photos and give it to me as Markdown."*

#### Run it from your code

Python (`pip install apify-client`):

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("bepolabs/image-ocr").call(run_input={"imageUrls":["https://tesseract.projectnaptha.com/img/eng_bw.png","https://raw.githubusercontent.com/naptha/tesseract.js/master/benchmarks/data/testocr.png"],"languages":["eng"]})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

JavaScript (`npm install apify-client`):

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

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('bepolabs/image-ocr').call({"imageUrls":["https://tesseract.projectnaptha.com/img/eng_bw.png","https://raw.githubusercontent.com/naptha/tesseract.js/master/benchmarks/data/testocr.png"],"languages":["eng"]});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### No-code integrations

Send results to **Google Sheets, Slack, Airtable, HubSpot, Make, Zapier, n8n** and more from the Integrations tab, start runs on a **schedule**, or trigger your own endpoint with a **webhook** when a run finishes. The [Apify API](https://docs.apify.com/api/v2) gives you full control over runs and datasets.

### ❓ FAQ

##### Which images read well?

Scans and screenshots at 150 to 300 dpi read at 90 or more mean confidence. Phone photos work when the page is flat and in focus; set `minConfidence` to 50 to 60 to drop noise.

##### Can it read handwriting?

Not reliably: Tesseract is built for printed text.

##### Does it read PDFs?

No, images only. For files with a text layer use PDF to Text and Markdown; scanned documents need their pages exported as images first.

##### Are my images stored or sent elsewhere?

No. Each image is read inside the run with Tesseract; nothing is sent to an outside OCR service or AI model.

##### What if one image fails?

That image gets an error line in the `OUTPUT` summary and is not charged; the other images go on. GIF and TIFF are refused with a message to convert them to PNG or JPEG.

##### Is it legal to use Image OCR?

The Actor reads only the images you give it, inside the run. Make sure you may process them; copyright, confidentiality and any personal data in the images stay your responsibility.

##### What if something is missing or does not work?

Open an issue on the **Issues** tab; we read each one and reply. Feature requests are welcome too.

### 💬 Your feedback

Tell us what Image OCR should add on the **Issues** tab or leave a review; your notes decide what we work on next.

### 🔗 Related Actors

| Actor | What it does |
|---|---|
| 📄 [PDF to Text and Markdown](https://apify.com/bepolabs/pdf-to-text) | PDFs to clean text and Markdown, per page, per document or as RAG chunks, with columns in reading order and headers and footers removed. |
| 🎙️ [Audio and Video Transcriber](https://apify.com/bepolabs/media-transcriber) | Whisper transcripts of audio and video files: full text, timed segments, SRT and WebVTT. No API key. |
| 📝 [Website to Markdown](https://apify.com/bepolabs/web-to-markdown) | Any web page or docs site to clean Markdown for LLMs, RAG and AI agents, with headings, links and ready-made chunks. |
| 📝 [YouTube Transcripts](https://apify.com/bepolabs/youtube-transcripts) | Full text and timed segments of the captions of any YouTube video, ready for summaries, search and LLMs. |
| 🎓 [OpenAlex Research Papers](https://apify.com/bepolabs/openalex-works) | Research papers in bulk from OpenAlex: search, DOI or citing works to clean rows with citations, abstracts and free PDF links. |
| 🎙️ [Podcast Episodes](https://apify.com/bepolabs/podcast-episodes) | Search terms, Apple Podcasts ids or RSS feeds to every show and its episodes, with audio links, dates and durations. |
| 📰 [RSS Feed Reader](https://apify.com/bepolabs/rss-reader) | Any RSS, Atom or JSON feed, or just a website URL, to one clean list of articles, with full text on request. |
| 🏛️ [SEC EDGAR Filings](https://apify.com/bepolabs/sec-edgar) | Tickers or CIK numbers to SEC filings: 10-K, 10-Q, 8-K, Form 4 and any other form, with document links. |

# Changelog

This Actor's version history is a separate document: https://apify.com/bepolabs/image-ocr/changelog.md

# Actor input Schema

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

Direct links to images (PNG, JPEG, WebP, BMP, PBM/PGM/PPM). A key-value store record URL of an uploaded file works too. Up to 500 per run.

## `storeKeys` (type: `array`):

Keys of images stored in this run's default key-value store (upload them with the API before the run starts).

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

Languages in the images. Pick more than one for mixed text (each extra language slows reading a little). Default English.

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

Every word with its pixel box (x, y, width, height), confidence and its block, paragraph and line. Off: smaller rows.

## `includeText` (type: `boolean`):

Plain text with the line breaks of the image. Off: Markdown only.

## `minConfidence` (type: `integer`):

Words Tesseract is less sure of (0 to 100) are dropped from text, Markdown and words. 0 keeps all; 50 to 60 removes most noise on photos.

## `maxSizeMb` (type: `integer`):

Larger files are refused before they are downloaded.

## `maxRetries` (type: `integer`):

Retries per download on network errors, 429 and 5xx, with exponential backoff.

## Actor input object example

```json
{
  "imageUrls": [
    "https://tesseract.projectnaptha.com/img/eng_bw.png"
  ],
  "languages": [
    "eng"
  ],
  "includeWords": true,
  "includeText": true,
  "minConfidence": 0,
  "maxSizeMb": 20,
  "maxRetries": 3
}
```

# Actor output Schema

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

Dataset items, one row per result, in the overview table view.

# 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"
    ],
    "languages": [
        "eng"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("bepolabs/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"],
    "languages": ["eng"],
}

# Run the Actor and wait for it to finish
run = client.actor("bepolabs/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"
  ],
  "languages": [
    "eng"
  ]
}' |
apify call bepolabs/image-ocr --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bepolabs/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/measJ2CEvn8RvjbB8/builds/CgxbdZKYUpRsOX00G/openapi.json
