# Image OCR in 18 Languages for AI (Malay, Chinese, Arabic) (`alvin_tom/multilingual-image-ocr`) Actor

Read text from image URLs in 18 languages including Malay, Indonesian, Thai, Vietnamese, Chinese, Japanese, Korean, Arabic, Hindi and Russian. Returns plain text plus lines with confidence and positions. Built for AI agents: one call, clean JSON, pay per image.

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

## Pricing

from $3.00 / 1,000 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

## Image OCR in 18 Languages for AI

Read text from image links in **English, Malay, Indonesian, Vietnamese, Thai, Chinese (simplified and traditional), Japanese, Korean, Arabic, Russian, Hindi, Turkish, German, French, Spanish, Portuguese and Italian**. Made for AI agents and pipelines: one call, clean JSON.

### What you get per image

- `text`: the text, with paragraphs kept
- `lines`: each line with `confidence` (0-100) and `box` \[x1, y1, x2, y2]
- `meanConfidence`, `lineCount`, `languages`, `imageSize`, `error`

### Input

```json
{ "imageUrls": ["https://example.org/receipt.jpg"], "languages": ["eng", "msa"], "includeLines": true, "layout": "rows" }
```

### Pricing

Pay per image read (`image` event). Failed images, and images where no text is found, are not charged, and the run stops cleanly when your spending limit is reached.

### Use cases

- Read receipts, invoices, forms and signs in Malay, Chinese, Arabic and other Asian languages
- Let an AI agent read the text in a screenshot or photo link
- Turn scanned pages into text for search or a RAG pipeline
- Get line positions (`box`) to find totals, dates or names on a document

### Output example

```json
{
  "url": "https://raw.githubusercontent.com/tesseract-ocr/test/main/testing/phototest.tif",
  "languages": ["eng"],
  "text": "This is a lot of 12 point text to test the\nocr code and see if it works on all types\n...",
  "meanConfidence": 95.8, "lineCount": 8,
  "lines": [{ "text": "This is a lot of 12 point text to test the", "confidence": 96, "box": [56, 144, 1000, 180] }],
  "imageSize": [1000, 750], "error": null
}
```

### Price examples

| What you read | You pay |
|---|---|
| 1 image | $0.003 |
| 1,000 images | $3 |

Plus a tiny start fee ($0.00005) per run.

### Use it from code or an AI agent

Python (`pip install apify-client`):

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("alvin_tom/multilingual-image-ocr").call(run_input={"imageUrls": ["https://raw.githubusercontent.com/tesseract-ocr/test/main/testing/phototest.tif"], "languages": ["eng"]})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["url"], item.get("meanConfidence"), (item.get("text") or "")[:80])
```

AI agents: add this Actor as a tool in Claude, Cursor or any MCP client through Apify's MCP server (`https://mcp.apify.com/?tools=alvin_tom/multilingual-image-ocr`). The agent passes links and gets clean JSON back.

### FAQ

**Which language codes?** `eng` English, `msa` Malay, `ind` Indonesian, `vie` Vietnamese, `tha` Thai, `chi_sim` / `chi_tra` Chinese, `jpn` Japanese, `kor` Korean, `ara` Arabic, `rus` Russian, `hin` Hindi, `tur` Turkish, `deu` German, `fra` French, `spa` Spanish, `por` Portuguese, `ita` Italian.

**PDFs?** Not directly. Use our PDF to Markdown Actor for PDFs with text, or turn scanned pages into images first.

### Good to know

- Receipts, invoices and price lists: set `layout` to `rows` so each item stays on one line with its price.
- Pick only the languages in your images: each extra language makes it slower.
- Best on printed text (documents, screenshots, receipts, clear signs). Text in busy street photos or at sharp angles may not be found, and you're not charged for those. Handwriting is not supported.
- Limits: 25 MB and 60 megapixels per image; PNG, JPEG, WebP, TIFF, BMP, GIF.
- We don't keep your images: each is read in memory and only the result goes to your dataset.

Support: open an issue on this Actor. Replies come from an AI assistant.

# Actor input Schema

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

Public http(s) links to PNG, JPEG, WebP, TIFF, BMP or GIF images. One output item per image.

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

Languages in the images. Pick only the ones you need: more languages are slower.

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

Also return each line with its confidence (0-100) and position.

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

Auto reads text block by block, best for documents and screenshots. Rows keeps everything on the same line together (an item and its price), best for receipts, invoices and price lists.

## Actor input object example

```json
{
  "imageUrls": [
    "https://raw.githubusercontent.com/tesseract-ocr/test/main/testing/phototest.tif"
  ],
  "languages": [
    "eng"
  ],
  "includeLines": true,
  "layout": "auto"
}
```

# Actor output Schema

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

One item per file, with the text and an error field if it failed

# 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://raw.githubusercontent.com/tesseract-ocr/test/main/testing/phototest.tif"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("alvin_tom/multilingual-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://raw.githubusercontent.com/tesseract-ocr/test/main/testing/phototest.tif"] }

# Run the Actor and wait for it to finish
run = client.actor("alvin_tom/multilingual-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://raw.githubusercontent.com/tesseract-ocr/test/main/testing/phototest.tif"
  ]
}' |
apify call alvin_tom/multilingual-image-ocr --silent --output-dataset

```

## MCP server setup

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