# Image to Text OCR: 120+ Languages, Hebrew, Arabic, CJK (`itayozer9/image-ocr-multilang`) Actor

Extract text from images and scanned PDFs in 123 languages, including Hebrew, Arabic, Chinese, Japanese, Korean and Hindi. Lines with boxes and confidence, script auto-detect, rotated pages turned upright. Tesseract OCR, pay per page.

- **URL**: https://apify.com/itayozer9/image-ocr-multilang.md
- **Developed by:** [Itay Ozer](https://apify.com/itayozer9) (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 $1.50 / 1,000 image or page 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 to Text OCR: 120+ Languages, Hebrew, Arabic, CJK

Turn images and scanned PDFs into text. Give it links or upload files, pick the languages (or let it detect the script), and get back clean text in reading order, every line with its position on the page and a confidence score.

It reads 123 languages, including right-to-left Hebrew, Arabic, Persian and Urdu, Chinese (simplified and traditional), Japanese, Korean, Hindi, Thai, Russian and Greek. It runs the open-source Tesseract 5 OCR engine inside the actor: no third-party API, no login, no proxy. Your files are not sent anywhere else.

Price: $0.0015 per image or page with up to 1,000 characters of text. No custom start fee. Pages with no text found are free.

### What you can use it for

- **Screenshots and images to text**: chat screenshots, slides, posters, product labels, memes, social media images.
- **Scanned documents**: scanned PDFs, faxes and multi-page TIFF scans, letters, forms, old books and archives.
- **Right-to-left and Asian scripts**: Hebrew and Arabic come out in logical reading order (right word first), ready for search or translation.
- **Layout work**: line and word boxes in pixels for highlighting, redaction, or cropping a region of the page.
- **AI and RAG pipelines**: feed the text of scanned pages to an LLM, a search index or a translation step.

### How to use it

1. Paste image or PDF links into **Image or PDF URLs**, or upload files under **Upload images or PDFs**. (The sample link is a public test image from the Tesseract project. Remove it if you only upload files.)
2. Pick the **Languages** of the text. Choose **Auto** to detect the script of each page and turn rotated pages upright.
3. Optional: for PDFs and multi-page TIFFs, set **Pages** (for example `1-3, 7`) and **Max pages per file**. Set **Boxes** to lines, lines and words, or none.
4. Run it, then download the results as JSON, CSV or Excel, or read them through the API.

### Input

| Field | Required | Example | Notes |
|---|---|---|---|
| `urls` | one of `urls` or `files` | `["https://example.com/scan.jpg"]` | Up to 1,000 links per run |
| `files` | one of `urls` or `files` | uploaded in the Console | Stored in your own Apify key-value store |
| `languages` | no | `["heb"]`, `["eng", "fra"]`, `["auto"]` | Tesseract codes. Default English |
| `pages` | no | `"1-3, 7, 10-"` | PDFs and multi-page TIFFs. Empty = all pages |
| `maxPagesPerFile` | no | `100` | 1 to 2,000 |
| `boxes` | no | `"lines"` | `lines`, `words` (lines plus words) or `none` |

```json
{
    "urls": [
        "https://example.com/receipts/receipt-0193.jpg",
        "https://example.com/archive/scanned-letter.pdf"
    ],
    "languages": ["eng", "spa"],
    "pages": "1-5",
    "boxes": "lines"
}
```

**File types:** JPEG, PNG, WebP, TIFF (all pages), GIF and BMP (first frame), and PDF (each page is rendered at 300 DPI and read). HEIC photos from iPhones need converting to JPEG first. Files up to 50 MB.

### Output example

One dataset item per image, or per page of a PDF or TIFF. This is the real result for the sample image (lines cut to two):

```json
{
    "url": "https://raw.githubusercontent.com/tesseract-ocr/test/232ff181c66516116ec0e84c4963f70de15050fd/testing/phototest.tif",
    "fileName": "phototest.tif",
    "fileType": "image",
    "fileSizeBytes": 38668,
    "page": null,
    "pageCount": 1,
    "width": 640,
    "height": 480,
    "rotated": 0,
    "detectedScript": "Latin",
    "languages": ["eng"],
    "text": "This is a lot of 12 point text to test the\nocr code and see if it works on all types\nof file format.\n\nThe quick brown dog jumped over the\nlazy fox. The quick brown dog jumped\nover the lazy fox. The quick brown dog\njumped over the lazy fox. The quick\nbrown dog jumped over the lazy fox.",
    "lineCount": 8,
    "wordCount": 60,
    "charCount": 285,
    "confidence": 96.2,
    "lines": [
        {
            "text": "This is a lot of 12 point text to test the",
            "confidence": 96.3,
            "box": { "left": 36, "top": 92, "width": 544, "height": 30 }
        },
        {
            "text": "ocr code and see if it works on all types",
            "confidence": 95.1,
            "box": { "left": 36, "top": 126, "width": 582, "height": 31 }
        }
    ],
    "error": null,
    "readAt": "2026-10-31T17:16:46.167854+00:00"
}
```

- `text`: lines end with a newline, paragraphs are separated by a blank line.
- `confidence`: the engine's own score from 0 to 100, per page and per line (per word with Boxes = words). Below about 60 the text is usually worth a look.
- `box`: pixels from the top left corner of the upright page. For PDFs, the page at 300 DPI. Very large images are read at up to 25 megapixels, and their boxes are mapped back to the original size.
- A link that cannot be read (404, not an image, password-protected PDF) gets a row with an `error` message and is not charged. A page where no text is found gets a row with empty `text` and is not charged either. The other files in the run carry on.

### Pricing

| Event | Price | When |
|---|---|---|
| Image or page read | $0.0015 | Each image or page, including up to 1,000 characters of text |
| Extra 1,000 characters | $0.0007 | Each further 1,000 characters (or part) on the same page |
| Actor start | $0.00005 | Apify's standard start event, once per run per GB of memory (once at the default 512 MB) |

Most screenshots, photos and receipts have under 1,000 characters, so they cost $0.0015 each: $1.50 per 1,000 images. A typical letter page with 2,500 characters costs $0.0015 + 2 x $0.0007 = $0.0029. A dense page of small print with 7,000 characters costs $0.0057. Characters are counted in the `text` field you get back (`charCount`), spaces and line breaks included. Pages where no text is found and files that fail are free.

The extra event exists because reading time grows with the amount of text: a page of dense small print takes about ten times longer to read than a screenshot.

Before each page the actor checks your run's maximum charge and stops when the next page would go over it. A run never goes over the limit you set. It also stops cleanly shortly before the run's timeout, so a long batch ends with the pages it read rather than a timed-out run.

### Languages

Pick one or more in the **Languages** list. Each extra language makes reading slower, so pick only those that appear.

- **Auto**: detects the script of each page (Latin, Hebrew, Arabic, Cyrillic, Greek, Han, Japanese, Korean, Devanagari, Thai and about 20 more) and uses its main language, and turns pages that are upside down or on their side upright. For Latin-script text Auto reads English, so for French, German, Spanish, Portuguese or Italian pick the language yourself to get the accents right. Auto needs a few lines of text to tell the script: on a single word or one short line it reads English and `detectedScript` is null, so pick the language for short text.
- **Right to left**: Hebrew (`heb`), Arabic (`ara`), Persian (`fas`), Urdu (`urd`), Yiddish (`yid`), Pashto (`pus`), Sindhi (`snd`), Uyghur (`uig`), Syriac (`syr`), Dhivehi (`div`).
- **Asian**: Chinese simplified (`chi_sim`) and traditional (`chi_tra`), Japanese (`jpn`), Korean (`kor`), each also in a vertical-text variant, plus Thai, Vietnamese, Khmer, Lao, Burmese, Hindi, Bengali, Tamil, Telugu and other Indic scripts.
- **European**: all major ones, plus historical models such as German Fraktur (`frk`), Middle English, Middle French, Old Spanish and Old Italian.

### Tips and limits

- **Best on clean, flat text**: scans, screenshots and photos of documents taken straight on. Text on curved objects, street signs at an angle, handwriting and stylized logos read poorly; this engine is built for printed text. A lone word in a large empty image can come back empty (and is not charged).
- **Resolution matters**: text should be at least about 20 pixels tall. Tiny text in a small screenshot reads better if you upscale the image first.
- **Rotated pages**: Auto turns pages by 90, 180 or 270 degrees when it is confident. Slightly skewed scans are read as they are.
- **Speed**: a screenshot takes a few seconds; a dense scanned page takes about a minute on the default 512 MB. For big batches, give the run more memory (up to 4 GB) at the same price, since you pay per page: in our test, 10 dense scanned pages took 526 seconds at 512 MB and 134 seconds at 2 GB.
- **PDFs with a text layer** are read by OCR too. If your PDF already has selectable text, a PDF-to-text tool is faster and exact.
- Links must be public `http` or `https` URLs. The actor respects each site's robots.txt: if a site disallows automated access to a path, that file gets an error row and no charge.

### FAQ

**Which OCR engine is this?**
Tesseract 5 with its fast LSTM models, a widely used open-source OCR engine (Apache 2.0). It runs inside the actor, so there is no per-call fee to an outside API and your images stay in the run.

**How accurate is it?**
On clean printed text it is close to exact: the sample page above comes back word for word, and our dense scanned test pages averaged a confidence of 95. The confidence score tells you which pages and lines to check. Photos with glare, blur, perspective or handwriting do much worse. Try a few of your own files first: a small run costs a fraction of a cent.

**Does it handle Hebrew and Arabic properly?**
Yes. Words come out in logical order (the first word you read is first in the text), without the invisible direction marks some OCR tools leave in. Hebrew with vowel points (nikud) reads with lower confidence than plain text.

**Can I call it from code, a schedule or an AI agent?**
Yes. Use the Apify API, a schedule, an integration such as Make or Zapier, or an MCP client. It runs with limited permissions and needs no access to your other Apify data.

**Do you keep my files?**
The actor reads each file during the run and writes the results to your own run storage. Uploaded files stay in your own key-value store, under your control.

**Something looks wrong or a file failed. What do I do?**
Open an issue on the Issues tab with your run link and, if you can share it, the file.

# Actor input Schema

## `urls` (type: `array`):

Links to images (JPEG, PNG, WebP, TIFF, GIF, BMP) or scanned PDFs, one per line, up to 1,000 per run. The sample is a public test image from the Tesseract project: replace it with your own.

## `files` (type: `array`):

Or upload files from your computer. They are stored in your own Apify key-value store.

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

Languages of the text. Pick every language that appears (each extra language makes reading slower). Auto detects the script of each page (Hebrew, Arabic, Cyrillic, Chinese, Devanagari and others) and turns rotated pages upright; for Latin-script text it reads English, so pick French, German, Spanish and so on yourself to get their accents.

## `pages` (type: `string`):

For PDFs and multi-page TIFFs: which pages to read, for example 1-3, 7, 10- (page 10 to the end). Empty = all pages.

## `maxPagesPerFile` (type: `integer`):

Pages after this many are skipped in each PDF or TIFF (1 to 2,000).

## `boxes` (type: `string`):

Position of the text on the image, in pixels: per line, per line and per word, or none for smaller results.

## Actor input object example

```json
{
  "urls": [
    "https://raw.githubusercontent.com/tesseract-ocr/test/232ff181c66516116ec0e84c4963f70de15050fd/testing/phototest.tif"
  ],
  "languages": [
    "eng"
  ],
  "maxPagesPerFile": 100,
  "boxes": "lines"
}
```

# Actor output Schema

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

One item per image or PDF page: text, lines with boxes, confidence.

# 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 = {
    "urls": [
        "https://raw.githubusercontent.com/tesseract-ocr/test/232ff181c66516116ec0e84c4963f70de15050fd/testing/phototest.tif"
    ],
    "languages": [
        "eng"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("itayozer9/image-ocr-multilang").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 = {
    "urls": ["https://raw.githubusercontent.com/tesseract-ocr/test/232ff181c66516116ec0e84c4963f70de15050fd/testing/phototest.tif"],
    "languages": ["eng"],
}

# Run the Actor and wait for it to finish
run = client.actor("itayozer9/image-ocr-multilang").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 '{
  "urls": [
    "https://raw.githubusercontent.com/tesseract-ocr/test/232ff181c66516116ec0e84c4963f70de15050fd/testing/phototest.tif"
  ],
  "languages": [
    "eng"
  ]
}' |
apify call itayozer9/image-ocr-multilang --silent --output-dataset

```

## MCP server setup

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

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/tNp7fTP8kFJ10Fy39/builds/UUE9uGxYJoqDMpZMZ/openapi.json
