# Image to Text OCR (Tesseract, 20 languages) (`gigsmith/image-to-text-ocr`) Actor

Extract text from images, screenshots, scans and photos with local Tesseract OCR. 20 languages, confidence scores, optional word boxes. $0.002 per image.

- **URL**: https://apify.com/gigsmith/image-to-text-ocr.md
- **Developed by:** [Gigsmith](https://apify.com/gigsmith) (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 $2.00 / 1,000 image processeds

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: extract text from images, screenshots and scans

**Image to Text OCR** reads the text in your images and returns it as clean, searchable text with a confidence score. Paste image links or upload files and get one result row per image. It handles PNG, JPG, WEBP, TIFF (including multi-page faxes), BMP and GIF in 20 languages, and **costs $0.002 per image**.

OCR runs on a local Tesseract 5 engine inside the Actor. Your images are never sent to Google, OpenAI or any other third-party service, and nothing is kept after the run except your own results.

### What can this OCR Actor do?

- 🖼️ **Image to text** for screenshots, scanned documents, receipts, invoices, photos of notes, signs and memes
- 🌍 **20 OCR languages**: English, German, French, Spanish, Italian, Portuguese, Dutch, Polish, Turkish, Russian, Ukrainian, Hebrew, Arabic, Hindi, Chinese (simplified and traditional), Japanese, Korean, Vietnamese and Indonesian. You can mix them in one run.
- 📈 **Confidence score** for every image (0–100), so you can flag bad scans automatically
- 🔲 **Word boxes (optional)**: every word with its confidence and pixel position, ready for redaction, highlighting or layout analysis
- 📠 **Multi-page TIFF**: every page is read and returned in order
- ✨ **Automatic clean-up**: fixes phone-photo rotation (EXIF), flattens transparent backgrounds, upscales small screenshots, boosts contrast, and runs a denoise pass when confidence is low
- 💸 **Fair billing**: broken links, files that aren't images and oversized files are reported in the dataset and never charged

### Who uses image OCR?

- **Ops and finance teams** turning receipts, invoices and delivery notes into text for bookkeeping
- **Developers and AI builders** adding image text to search indexes, RAG pipelines and LLM prompts
- **Researchers and archivists** digitising scanned pages and faxes
- **Marketers and analysts** pulling text from ad creatives, social screenshots and memes

### How to extract text from images

1. Click **Try for free**.
2. Paste public image links into **Image URLs**, or upload files under **Or upload images**.
3. Pick the **Text languages** in your images. English is the default. Choose only the languages you need for the best accuracy.
4. Click **Start**. Each image becomes one row in the **Output** tab, which you can download as JSON, CSV, Excel or HTML, or read through the Apify API.

#### Input example

```json
{
  "fileUrls": [
    "https://example.com/receipts/2026-11-12.jpg",
    "https://example.com/screenshots/invoice.png"
  ],
  "languages": ["eng"],
  "layout": "auto",
  "enhance": true,
  "includeWords": false
}
```

| Field | What it does |
|---|---|
| `fileUrls` | Public http(s) links to images |
| `uploadedFiles` | Images uploaded in the Console (stored in your own key-value store) |
| `languages` | Tesseract language codes, e.g. `eng`, `deu`, `heb`, `chi_sim`. Default `["eng"]` |
| `layout` | `auto` for documents and screenshots, `sparse` for photos and signs, `single-block`, or `single-line` |
| `enhance` | Pre-processing (grayscale, upscale, contrast, denoise retry). Default `true` |
| `includeWords` | Add a `words` array with boxes and confidence |
| `maxConcurrency` | Images processed in parallel (default 2) |
| `maxFileSizeMb` | Skip images larger than this (default 50 MB) |

#### Output example

This is real output from a test run on an invoice screenshot:

```json
{
  "fileUrl": "https://example.com/screenshots/invoice.png",
  "fileName": "invoice.png",
  "status": "ok",
  "error": null,
  "text": "Invoice #INV-2026-0412\n\nCustomer Acme Logistics Ltd.\nIssue date 12 November 2026\nDue date 26 November 2026\nAmount due $1,284.50\n\nStatus Awaiting payment",
  "hasText": true,
  "meanConfidence": 95.5,
  "wordCount": 22,
  "imageCount": 1,
  "width": 900,
  "height": 420,
  "format": "PNG",
  "languages": ["eng"],
  "chargedImages": 1,
  "processingSeconds": 0.42
}
```

Failed images come back with `"status": "error"` and a plain-English `error`, for example `"File URL returned HTTP 404; make sure the link is public"`. The run's `OUTPUT` record in the key-value store holds a summary with files, ok/error counts and the events charged.

### How much does image OCR cost?

This Actor uses **pay-per-event** pricing. You pay only for images that were actually read.

| Event | Price | When it's charged |
|---|---|---|
| `image-processed` | **$0.002** | Once per image read with OCR. Each page of a multi-page TIFF counts as one image. |

- No monthly rental. Apify platform usage is included in the price. The only other charge is Apify's standard run-start event of $0.00005 per run (that's $0.05 per 1,000 runs), which covers the first seconds of compute.
- 1,000 images cost **$2.00**, and 10,000 cost **$20.00**.
- Images that fail (bad link, not an image, too large) are **not charged**.
- Set **Max charge per run** in the run options to cap your spend. When the cap is reached, the Actor stops cleanly and marks the remaining images `skipped`, free of charge.
- Apify's free plan includes monthly platform credit, which covers a few thousand images.

### Tips for the best OCR accuracy

- Select **only the languages that appear** in the images. Extra languages can lower accuracy.
- For photos of signs, whiteboards or memes with scattered text, set **Page layout** to **Sparse text**.
- Images with text at least 20 px high work best. Small screenshots are upscaled automatically.
- Check `meanConfidence`: below about 70 usually means a blurry or low-contrast image worth re-shooting.

### FAQ

**Can it read handwriting?** Only neat, printed-style handwriting. Tesseract is built for printed text, so cursive handwriting gives poor results.

**Does it read PDFs?** Not this Actor. Use a dedicated PDF to text Actor, which also keeps the PDF's own text layer and tables.

**Is my data private?** Images are downloaded into the run's container, processed locally and deleted when the run ends. Results stay in your own Apify storage.

**Which formats are supported?** PNG, JPG/JPEG, WEBP, TIFF, BMP and GIF (first frame only). HEIC and SVG aren't supported yet, so convert them to JPG or PNG first.

**Can I call it from code or no-code tools?** Yes. Use the Apify API, the Python or JavaScript client, or the Make, Zapier and n8n integrations. Send `fileUrls` and read the dataset.

**Something went wrong?** Open an issue on the **Issues** tab with the run link and I'll fix it.

### Keywords

image to text, OCR, OCR API, extract text from image, screenshot to text, photo to text, scanned image OCR, receipt OCR, invoice OCR, Tesseract OCR, multilingual OCR, Hebrew OCR, Arabic OCR, Chinese OCR, bulk OCR, TIFF OCR, image text extractor

***

Made by **Gigsmith**.

# Actor input Schema

## `fileUrls` (type: `array`):

Public http(s) links to PNG, JPG, WEBP, TIFF, BMP or GIF images. Each link is one image (multi-page TIFF: each page counts as one image).

## `uploadedFiles` (type: `array`):

Upload images from your computer. They are stored in your own Apify key-value store.

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

Languages that appear in the images. Pick only what you need: each extra language slows OCR a little. Default: English.

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

auto works for documents and screenshots. Use sparse for photos, signs and memes with scattered text, single-line for one line of text.

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

Grayscale, upscale small images and boost contrast. Usually improves accuracy on screenshots and phone photos.

## `includeWords` (type: `boolean`):

Add every word with its confidence and pixel position (left, top, width, height).

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

How many images to process at once. Raise it together with memory for large batches.

## `maxFileSizeMb` (type: `integer`):

Images larger than this are skipped and not charged.

## Actor input object example

```json
{
  "fileUrls": [
    "https://raw.githubusercontent.com/tesseract-ocr/tessdoc/main/images/eurotext.png"
  ],
  "languages": [
    "eng"
  ],
  "layout": "auto",
  "enhance": true,
  "includeWords": false,
  "maxConcurrency": 2,
  "maxFileSizeMb": 50
}
```

# Actor output Schema

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

Default dataset items, shown in the "Text" view.

## `detailsView` (type: `string`):

Default dataset items, shown in the "Details" view.

## `runSummary` (type: `string`):

JSON summary of the run: files processed, ok/error/skipped counts and charged events.

# 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 = {
    "fileUrls": [
        "https://raw.githubusercontent.com/tesseract-ocr/tessdoc/main/images/eurotext.png"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("gigsmith/image-to-text-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 = { "fileUrls": ["https://raw.githubusercontent.com/tesseract-ocr/tessdoc/main/images/eurotext.png"] }

# Run the Actor and wait for it to finish
run = client.actor("gigsmith/image-to-text-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 '{
  "fileUrls": [
    "https://raw.githubusercontent.com/tesseract-ocr/tessdoc/main/images/eurotext.png"
  ]
}' |
apify call gigsmith/image-to-text-ocr --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,gigsmith/image-to-text-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/5mhhxsDk5kZtoBsNu/builds/QAiKNOKh66fDycYCp/openapi.json
