# Image to Text OCR – Bulk, 30+ Languages (`rowharbor1988/image-ocr-text`) Actor

Extract text from images in bulk – from a URL list or straight from any Apify dataset (screenshots, product photos, scans). 30+ languages, auto-enhance, confidence score, optional line positions. Pay only for images where text was found.

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

## Pricing

from $1.40 / 1,000 image with text reads

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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, 30+ Languages

Extract the text from hundreds of images in one run – from a list of URLs or **straight from the dataset of any other Actor** (screenshots, product photos, scanned documents, receipts, banners). Each image becomes one clean row with the text, a confidence score and word/line counts – ready for search, translation, AI pipelines or spreadsheets.

- **Formats:** JPEG, PNG, WebP, TIFF, GIF (first frame), BMP, AVIF
- **30+ languages**, up to 3 at once (e.g. English + German), including Cyrillic, Greek, Arabic, Hebrew, Hindi, Chinese, Japanese and Korean
- **Auto-enhance:** auto-rotate, greyscale, contrast stretch and upscaling of small images for better accuracy
- **Layouts:** documents, single text blocks, single lines (labels, banners) or sparse text (screenshots, signs, product photos)
- **Confidence score** per image, optional **lines with position** (x, y, width, height)
- **Runs on open-source Tesseract** – your images are not sent to any third-party AI service
- **Pay only when text was found** – broken links, non-images and images without text are listed and **not charged**

### Typical uses

- Read text from website screenshots (e.g. from *Bulk Website Screenshot & PDF*) – pass the dataset ID
- Make scanned pages, receipts or product labels searchable
- Pull prices, ingredients or specs from product photos after scraping a shop
- Check banners and ads for wording, or extract text before translating it

### Input

| Field | Description |
|---|---|
| Image URLs | Direct image links |
| …or images from a dataset | Dataset ID from your account; image URLs are found in fields like `image`, `imageUrl`, `images`, `screenshotUrl` – or set *Image field* |
| Languages | 1–3 languages (default English) |
| Layout | Automatic, single block, single line, sparse text |
| Auto-enhance | On by default |
| Include lines with position | Off by default |

### Output

One row per image:

```json
{
  "sourceUrl": "https://example.com/scan/page-1.png",
  "index": 0,
  "status": "success",
  "text": "Mild Splendour of the various-vested Night!\nMother of wildly-working visions! hail!",
  "confidence": 91.4,
  "words": 13,
  "characters": 83,
  "lineCount": 2,
  "languages": "eng",
  "sourceFormat": "png",
  "width": 1486,
  "height": 668,
  "billedImages": 1,
  "error": null
}
```

`status` is `success` (text found, charged), `no-text` (image read, nothing found, not charged) or `failed` (with the reason, not charged). With *Include lines with position*, each row also has `lines: [{ text, confidence, x, y, width, height }]`.

SUMMARY (key-value store): images, with text, without text, failed (with reasons), total words, average confidence.

### Pricing

Pay per image with text found – no start fee, no monthly fee. Images without text, failed downloads and unsupported files are **not charged**.

Every normal image counts as **one image** – photos larger than 4 megapixels (e.g. 12 MP phone photos) are scaled to 4 MP for OCR, which keeps text readable. Only very long images such as full-page website screenshots are read at full width and count as one image per started 4 megapixels, because OCR time grows with the size – e.g. a 1366 × 10,000 px screenshot counts as 4 images. The field `billedImages` shows this for every row.

### Good to know

- Best results: sharp, well-lit images with text at least ~15 px high. Handwriting is not supported well.
- Choose the right language(s): the wrong language lowers accuracy a lot. More languages = slower.
- PDF files are not read here – for text PDFs use *PDF Text Extractor*.
- HEIC/HEIF (iPhone photos) is not supported yet. Animated GIFs: first frame only.
- OCR is CPU-heavy: about 1–3 seconds per normal image with the default 2 GB memory, longer for very large images.
- Only publicly reachable image URLs can be downloaded. Use only images you have the rights to process.

### Support

Missing a language or option? Open an issue on the Actor's Issues tab – I answer quickly.

# Actor input Schema

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

Direct links to images (JPEG, PNG, WebP, TIFF, GIF, BMP). Upload a list or paste URLs.

## `datasetId` (type: `string`):

ID of a dataset in your account, e.g. screenshots or product scraper results. Image URLs are taken from fields like image, imageUrl, images, screenshotUrl – or from the field you set below.

## `imageField` (type: `string`):

Optional. Field name with the image URL(s), e.g. images or product.mainImage.

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

Language(s) of the text, up to 3. Choose all languages that appear in your images, e.g. English + German.

## `layout` (type: `string`):

How the text is arranged in the images. 'Sparse' finds scattered text best.

## `enhance` (type: `boolean`):

Greyscale, contrast stretch and upscaling of small images before OCR. Usually improves accuracy.

## `includeLines` (type: `boolean`):

Adds a 'lines' array with the text, confidence and position (x, y, width, height in pixels of the processed image) of every line.

## `maxImages` (type: `integer`):

Upper limit per run.

## `maxFileMb` (type: `integer`):

Larger files are skipped (not charged).

## `maxConcurrency` (type: `integer`):

OCR is CPU-heavy. 2 works well with the default 2 GB memory; use 4 with 4 GB.

## Actor input object example

```json
{
  "imageUrls": [
    {
      "url": "https://tesseract.projectnaptha.com/img/eng_bw.png"
    }
  ],
  "languages": [
    "eng"
  ],
  "layout": "auto",
  "enhance": true,
  "includeLines": false,
  "maxImages": 1000,
  "maxFileMb": 20,
  "maxConcurrency": 2
}
```

# Actor output Schema

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

No description

## `summary` (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": [
        {
            "url": "https://tesseract.projectnaptha.com/img/eng_bw.png"
        }
    ],
    "languages": [
        "eng"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("rowharbor1988/image-ocr-text").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": [{ "url": "https://tesseract.projectnaptha.com/img/eng_bw.png" }],
    "languages": ["eng"],
}

# Run the Actor and wait for it to finish
run = client.actor("rowharbor1988/image-ocr-text").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": [
    {
      "url": "https://tesseract.projectnaptha.com/img/eng_bw.png"
    }
  ],
  "languages": [
    "eng"
  ]
}' |
apify call rowharbor1988/image-ocr-text --silent --output-dataset

```

## MCP server setup

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

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/De9jcNXRXNPX3lEkI/builds/StcXGzGlGCZfQcwqK/openapi.json
