# Image to Text OCR: Chinese, Japanese & 50+ Languages (`raional/ocr-text-extractor`) Actor

Extract text from photos, screenshots, signs and scans. Strong Chinese and Japanese OCR, plus 50+ languages. Returns text, confidence scores and bounding boxes. Self-contained, no third-party API.

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

## Pricing

$5.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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Image to Text OCR: Chinese, Japanese & 50+ Languages

**Extract text from images, photos, screenshots and scanned documents.** Verified strong Chinese and Japanese recognition, plus 50+ other languages across Latin, Cyrillic, Arabic, Devanagari, Thai, Greek and more. Returns clean reading-order text, per-line confidence scores and bounding boxes.

Powered by [RapidOCR](https://github.com/RapidAI/RapidOCR) (Apache-2.0), running Baidu's PaddleOCR PP-OCR detection and recognition models entirely inside the actor. There is no third-party OCR API in the loop, so results don't depend on another service staying up or rate-limiting you.

Great for: **OCR API**, **extract text from image**, **image to text converter**, **Chinese OCR**, **Japanese OCR**, reading signs and receipts, digitizing screenshots, scanned-document pipelines, and any workflow that needs text pulled out of pictures at scale.

### What it does

Give it a list of image URLs, or upload an image directly. It runs OCR on each one and returns the text it found, with no files retained beyond the run.

### Verified accuracy

Tested against real images before shipping, not just the library's own claims:

| Test | Result |
|---|---|
| Clean screenshot (invoice-style text) | Exact match, ~99.7% avg. confidence |
| Lower-quality photo (rotated, blurred, noisy "sign") | Exact match despite the degradation |
| Real photo, dense Chinese e-commerce graphic | Exact match, ~97.8% avg. confidence |
| Real photo, Japanese train station sign (kanji + hiragana + romaji) | All real text read correctly |
| Japanese news headlines (dense text) | Exact match, ~99.9% avg. confidence |
| Korean news headline, `language: korean` | Correct, ~98% avg. confidence |

Chinese and Japanese read correctly with the default `auto` setting: that's why they're in the title, not just a marketing claim. Korean needs the explicit `language: korean` option (auto-detect does not catch Korean reliably); once selected, it's accurate. Other scripts also have dedicated per-script models via `language` with generally good results, though accuracy varies more by script and image quality than the verified Chinese/Japanese/Korean paths above.

### Example input

```json
{
  "images": [
    "https://example.com/receipt.jpg",
    "https://example.com/screenshot.png"
  ],
  "language": "auto"
}
````

### Input

| Field | Description |
|---|---|
| `images` | List of image URLs (JPG, PNG, WEBP, BMP, TIFF) |
| `uploadedImage` | Upload a file directly instead of a URL |
| `language` | `auto` (default) handles Chinese, Japanese, English and most Latin-alphabet text. Set explicitly for Korean, Arabic, Cyrillic, Devanagari, Thai, Greek, Kannada, Tamil or Telugu if `auto` misreads a specific script. |
| `maxImages` | Safety cap on images processed per run (default 50) |

### Output

One row per image:

| Field | Description |
|---|---|
| `imageUrl` | The image processed |
| `text` | Full extracted text, in reading order |
| `blocks` | Every detected text line: `text`, `confidence` (0-1), `box` (4-point bounding box) |
| `blockCount` | Number of text lines/blocks detected |
| `averageConfidence` | Mean confidence across all blocks |
| `language` | The language mode used |
| `status` | `ok` or `error` |
| `error` | Error message, if any |

### Pricing

Billed **per image successfully processed**. Failed images (bad URLs, non-image content, etc.) are not charged.

### FAQ

**How do I extract text from an image?**
Paste the image URL into `images` (or upload the file) and run. The `text` field in the output holds everything found, in reading order.

**Does this work for Chinese and Japanese text?**
Yes. Verified against real Chinese and Japanese test images before shipping (see the accuracy table above). Leave `language` on `auto`.

**Does this read Korean?**
Yes, but set `language` to `korean` explicitly; leaving it on `auto` will not read Korean reliably (verified). With `korean` selected, accuracy was ~98% in testing.

**What about Arabic, Cyrillic, or other non-Latin scripts?**
Set `language` to the matching option. These use RapidOCR's dedicated per-script models; results are generally good but vary more than the verified Chinese/Japanese/Korean paths.

**Does it work on photos, not just clean scans?**
Yes. Tested against a deliberately degraded (rotated, blurred, noisy) photo of a sign and it read every line correctly.

**Do I get confidence scores and bounding boxes, or just plain text?**
Both. The `text` field gives you the plain reading-order output; `blocks` gives you each line individually with its confidence score and bounding-box coordinates, if you need to validate results or highlight regions.

**Is this using Google Lens or another third-party OCR API?**
No. OCR runs entirely inside the actor via the open-source RapidOCR engine, no external API call, no dependency on a third-party service staying up.

### Please note

Only process images you have the right to use. Images are processed transiently and not retained beyond the run.

Built with the [Apify Python SDK](https://docs.apify.com/sdk/python/) + [RapidOCR](https://github.com/RapidAI/RapidOCR).

# Actor input Schema

## `images` (type: `array`):

List of image URLs to run OCR on (JPG, PNG, WEBP, BMP, TIFF). Works on photos, screenshots, signs and scanned documents. Leave empty if you're only using the file upload field below.

## `uploadedImage` (type: `string`):

Have an image on your computer instead of a URL? Upload it here. Combines with any URLs listed above.

## `language` (type: `string`):

Auto (recommended) reads Chinese, Japanese, English, numbers and most Latin-alphabet text automatically. For Korean specifically, select it explicitly below (Auto does not read Korean reliably, but the dedicated Korean model does). Other scripts (Arabic, Cyrillic, Thai, etc.) also have dedicated options if Auto misreads them.

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

Safety cap on how many images to process in one run.

## Actor input object example

```json
{
  "images": [
    "https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/resources/test_files/ch_en_num.jpg"
  ],
  "language": "auto",
  "maxImages": 50
}
```

# Actor output Schema

## `images` (type: `string`):

One dataset row per image: imageUrl, text, blocks (with confidence + bounding box), language, status.

## `summary` (type: `string`):

Counts of images processed and errors.

# 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 = {
    "images": [
        "https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/resources/test_files/ch_en_num.jpg"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("raional/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 = { "images": ["https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/resources/test_files/ch_en_num.jpg"] }

# Run the Actor and wait for it to finish
run = client.actor("raional/ocr-text-extractor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "images": [
    "https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/resources/test_files/ch_en_num.jpg"
  ]
}' |
apify call raional/ocr-text-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=raional/ocr-text-extractor",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Image to Text OCR: Chinese, Japanese & 50+ Languages",
        "description": "Extract text from photos, screenshots, signs and scans. Strong Chinese and Japanese OCR, plus 50+ languages. Returns text, confidence scores and bounding boxes. Self-contained, no third-party API.",
        "version": "0.1",
        "x-build-id": "s6kI71E9GEf9vIjrO"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/raional~ocr-text-extractor/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-raional-ocr-text-extractor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/raional~ocr-text-extractor/runs": {
            "post": {
                "operationId": "runs-sync-raional-ocr-text-extractor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/raional~ocr-text-extractor/run-sync": {
            "post": {
                "operationId": "run-sync-raional-ocr-text-extractor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "images": {
                        "title": "Image URLs",
                        "type": "array",
                        "description": "List of image URLs to run OCR on (JPG, PNG, WEBP, BMP, TIFF). Works on photos, screenshots, signs and scanned documents. Leave empty if you're only using the file upload field below.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "uploadedImage": {
                        "title": "Or upload an image directly",
                        "type": "string",
                        "description": "Have an image on your computer instead of a URL? Upload it here. Combines with any URLs listed above."
                    },
                    "language": {
                        "title": "Language hint",
                        "enum": [
                            "auto",
                            "japan",
                            "chinese_cht",
                            "korean",
                            "latin",
                            "cyrillic",
                            "eslav",
                            "arabic",
                            "devanagari",
                            "th",
                            "el",
                            "ka",
                            "ta",
                            "te"
                        ],
                        "type": "string",
                        "description": "Auto (recommended) reads Chinese, Japanese, English, numbers and most Latin-alphabet text automatically. For Korean specifically, select it explicitly below (Auto does not read Korean reliably, but the dedicated Korean model does). Other scripts (Arabic, Cyrillic, Thai, etc.) also have dedicated options if Auto misreads them.",
                        "default": "auto"
                    },
                    "maxImages": {
                        "title": "Max images per run",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Safety cap on how many images to process in one run.",
                        "default": 50
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
