# Image OCR (text from images, 20 languages) (`psypherz/image-ocr`) Actor

Extract text from images in bulk: JPEG, PNG, WebP, GIF, BMP, TIFF. 20 languages including Chinese, Japanese, Arabic and Hindi. Confidence scores included. Open-source Tesseract.

- **URL**: https://apify.com/psypherz/image-ocr.md
- **Developed by:** [Muhammad Yasin Bin Abdul Rahman](https://apify.com/psypherz) (community)
- **Categories:** AI, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.50 / 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 (text from images, 20 languages)

Pull the text out of images in bulk: screenshots, scanned documents, receipts, photos of signs, product labels, memes and charts. Paste image links or upload an image. It supports 20 languages, including Chinese, Japanese, Korean, Arabic and Hindi (with vertical text for the first three), and gives a confidence score for every result. It runs on the open-source Tesseract engine, so you need no API key.

**Price: US$0.0025 per image, plus a US$0.001 run fee.** 100 images cost US$0.251.

### What people use it for

- **Data entry:** text from scanned forms, invoices and receipts.
- **Screenshot search:** make screenshots and social media images searchable.
- **E-commerce:** read product labels, ingredients and packaging text.
- **Content moderation and research:** find text inside images at scale.
- **AI pipelines:** turn images into text an LLM can read, cheaply, before reaching for a vision model.

### Example output

Illustrative values. Real output has the same fields.

| fileName | text | meanConfidence | charCount | width | height |
|---|---|---|---|---|---|
| receipt-0412.jpg | CORNER CAFE\nLatte 4.50\nCroissant 3.20\nTOTAL 7.70 | 91.4 | 48 | 1080 | 1920 |
| slide-07.png | Quarterly results\nRevenue up 12% | 95.2 | 31 | 1280 | 720 |

```json
{
  "sourceUrl": "https://example.com/receipt-0412.jpg",
  "fileName": "receipt-0412.jpg",
  "width": 1080,
  "height": 1920,
  "languages": ["eng"],
  "meanConfidence": 91.4,
  "charCount": 48,
  "text": "CORNER CAFE\nLatte 4.50\nCroissant 3.20\nTOTAL 7.70",
  "processedAt": "2026-10-27T09:00:00+00:00"
}
```

With `includeLines` on, each item also has `lines`: every line of text with its own confidence score. Paragraphs are separated by a blank line in `text`.

### Input

| Field | What it does | Default |
|---|---|---|
| `imageUrls` | Direct links to images, up to 1,000. JPEG, PNG, WebP, GIF, BMP, TIFF. 30 MB and 60 megapixels per image. | 1 sample image |
| `uploadedFile` | Or upload one image from your computer. | none |
| `languages` | Up to 4 of: English, German, French, Spanish, Italian, Portuguese, Dutch, Polish, Turkish, Russian, Ukrainian, Arabic, Hindi, Indonesian, Vietnamese, Thai, Japanese, Korean, Chinese (Simplified), Chinese (Traditional), plus vertical-text Japanese, Korean and Chinese. | English |
| `layout` | `auto` for documents and screenshots, `single-block`, `single-line` for labels, `sparse` for signs and photos. | `auto` |
| `includeLines` | Add line-by-line output with confidence scores. | `false` |

Small images are enlarged before OCR, and phone photos are rotated using their camera data, both of which improve accuracy.

### Pricing

| Event | Price |
|---|---|
| Run fee, once per run (per GB of memory; the default is 1 GB) | US$0.001 |
| Image read | US$0.0025 |

Examples: 1 image costs US$0.0035. 100 images cost US$0.251. 1,000 images cost US$2.501. Images that fail to download or open are listed with the reason and not charged.

### Limits

- Printed text works best. Handwriting is read poorly.
- Old newspapers and dense multi-column pages, especially in Chinese or Japanese, are read poorly. Modern printed text and screenshots work well.
- Very stylised fonts, text on busy photos and tiny text lower accuracy. `meanConfidence` below about 60 means the result needs checking.
- Pages behind a login cannot be fetched.

### FAQ

**How accurate is it?** It is best on clean printed text such as screenshots and scans. Photos, small text and low-resolution images do worse. Check `meanConfidence` to spot results that need a second look.

**Should I pick more languages to be safe?** No. Pick only the languages in your images. Each extra language makes OCR slower and less accurate.

**Can it read PDFs?** Use PDF to Text and Markdown below. It reads the text layer and uses OCR only on scanned pages.

**Can an AI agent call it?** Yes. Pass image links, get compact JSON back, and pay per image.

### More tools from the same developer

Same style: clean JSON output, pay only for results, no charge on failed items.

| Tool | What it does |
|---|---|
| [Bulk Keyword Search Volume](https://apify.com/PsypherZ/keyword-search-volume) | Google Ads search volume, CPC, competition and 12-month trend for up to 10,000 keywords |
| [Google Trends API](https://apify.com/PsypherZ/google-trends-api) | Interest over time, by region, and rising queries and topics for up to 500 keywords |
| [Google SERP Results](https://apify.com/PsypherZ/google-serp-results) | Organic results, featured snippets and People Also Ask for any keyword, country and device |
| [Google AI Overview Tracker](https://apify.com/PsypherZ/google-ai-overview-tracker) | Which keywords show an AI Overview, what it says, and whether it cites your site |
| [Audio and Video Transcriber](https://apify.com/PsypherZ/audio-video-transcriber) | Timestamped transcripts from audio and video files in 90+ languages |
| [Subtitle Generator](https://apify.com/PsypherZ/subtitle-generator) | Ready-to-use SRT and WebVTT subtitles from audio and video files |
| [Podcast Transcriber](https://apify.com/PsypherZ/podcast-transcriber) | Timestamped transcripts of podcast episodes from any RSS feed or Apple Podcasts link |
| [PDF to Text and Markdown](https://apify.com/PsypherZ/pdf-to-text-markdown) | Clean text and Markdown from PDFs, with OCR for scanned pages |
| [Bulk PageSpeed Insights Audit](https://apify.com/PsypherZ/bulk-pagespeed-audit) | Core Web Vitals and Lighthouse scores for many pages, mobile and desktop |

# Actor input Schema

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

Direct links to images. Up to 1,000 per run, 30 MB each.

## `uploadedFile` (type: `string`):

Upload one image from your computer.

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

Languages in the text. Pick up to 4. Fewer languages give better accuracy.

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

How text is arranged in the images.

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

Add each line with its own confidence score.

## Actor input object example

```json
{
  "imageUrls": [
    "https://upload.wikimedia.org/wikipedia/commons/thumb/a/af/Atomist_quote_from_Democritus.png/500px-Atomist_quote_from_Democritus.png"
  ],
  "languages": [
    "eng"
  ],
  "layout": "auto",
  "includeLines": false
}
```

# Actor output Schema

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

One row per image: extracted text, mean confidence score and image size.

# 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://upload.wikimedia.org/wikipedia/commons/thumb/a/af/Atomist_quote_from_Democritus.png/500px-Atomist_quote_from_Democritus.png"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("psypherz/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://upload.wikimedia.org/wikipedia/commons/thumb/a/af/Atomist_quote_from_Democritus.png/500px-Atomist_quote_from_Democritus.png"] }

# Run the Actor and wait for it to finish
run = client.actor("psypherz/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://upload.wikimedia.org/wikipedia/commons/thumb/a/af/Atomist_quote_from_Democritus.png/500px-Atomist_quote_from_Democritus.png"
  ]
}' |
apify call psypherz/image-ocr --silent --output-dataset

```

## MCP server setup

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