# Image to Text OCR: Extract Text from Images & Screenshots (`richiedc95/image-to-text-ocr`) Actor

Extract text from images, photos, scans and screenshots (PNG, JPG, WebP, GIF, BMP, AVIF) with OCR in 100+ languages. Optional lines with positions and confidence. $0.002 per image; failed images are free.

- **URL**: https://apify.com/richiedc95/image-to-text-ocr.md
- **Developed by:** [Richie Data](https://apify.com/richiedc95) (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 $1.60 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

Turn **images into text** with OCR: photos of documents, scans, receipts, screenshots, slides, signs and product labels. Paste image links and get the text of each one, its OCR confidence and, optionally, every line with its position. **100+ languages**, PNG, JPEG, WebP, GIF, BMP and AVIF.

⭐ **Is this Actor useful to you?** A short review on the Reviews tab helps other users find it, and tells us what to build next.

- 🖼️ **Any common image format**: PNG, JPG/JPEG, WebP, GIF, BMP and AVIF, from any direct link.
- 🌍 **100+ languages**: English, Spanish, French, German, Portuguese, Chinese, Japanese, Arabic, Hindi and more, or mixes such as `eng+spa`.
- 📐 **Lines with positions**: each line's text, confidence and bounding box, for highlighting, redaction or layout analysis.
- 🔍 **Two layouts**: document mode for pages and receipts, scattered-text mode for screenshots, labels and signs.
- 🔎 **Better results on small images**: screenshots and phone crops are upscaled before OCR automatically.
- 🔒 **Private**: images are processed in memory and never stored; only the text is saved.
- 💵 **$0.002 per image** (2 USD per 1,000). Failed images cost nothing.

### Who uses it

- **AI and RAG developers** who need the text inside images and screenshots for their LLM pipelines.
- **Operations and finance teams** digitizing receipts, invoices and scanned forms in bulk.
- **Marketers and analysts** reading text from social media images, ads, banners and memes.
- **E-commerce teams** pulling product label and packaging text from product photos.
- **Developers** who want an OCR API without installing or hosting Tesseract.

### How to use it

1. Paste one or more **image URLs** (direct links to the image files).
2. Set **OCR languages** if the text is not in English (for example `spa`, `deu` or `eng+fra`).
3. Pick **Scattered text** for screenshots, signs or labels; keep **Document** for pages and receipts.
4. Click **Start**. Download the results as JSON, CSV or Excel, or read them through the API.

#### Input fields

| Field | What it does | Default |
|---|---|---|
| **Image URLs** | Direct links to PNG, JPEG, WebP, GIF, BMP or AVIF files | — |
| **OCR languages** | Tesseract codes joined with +, e.g. `eng`, `spa`, `eng+deu`, `chi_sim` | `eng` |
| **Text layout** | Document (paragraphs, columns) or Scattered text (screenshots, signs) | Document |
| **Include lines with positions** | Adds each line with confidence and bounding box | off |
| **Minimum confidence** | Skip (and don't pay for) images read with lower confidence | 0 |
| **Max file size (MB)** | Larger files are skipped | 20 |

#### Input example

```json
{
    "imageUrls": [
        "https://tesseract.projectnaptha.com/img/eng_bw.png"
    ],
    "languages": "eng",
    "layout": "auto",
    "includeLines": true
}
```

### Output

One result per image:

```json
{
    "url": "https://tesseract.projectnaptha.com/img/eng_bw.png",
    "fileName": "eng_bw.png",
    "contentType": "image/png",
    "width": 1486,
    "height": 668,
    "languages": "eng",
    "text": "Mild Splendour of the various-vested Night!\nMother of wildly-working visions! hail\n...",
    "characters": 351,
    "words": 58,
    "confidence": 92,
    "hasText": true,
    "lines": [
        { "text": "Mild Splendour of the various-vested Night!", "confidence": 95, "x": 38, "y": 34, "width": 1256, "height": 77 }
    ],
    "extractedAt": "2026-11-08T01:00:00.000Z"
}
```

#### Output fields

| Field | Meaning |
|---|---|
| `text` | All the text found, line breaks kept |
| `confidence` | Average OCR confidence, 0–100 (above ~80 is usually clean text) |
| `hasText` | false when no readable text was found |
| `words` / `characters` | Size of the extracted text |
| `lines` | Each line with its confidence and box (x, y, width, height), when enabled |
| `width` / `height` | Original image size in pixels |
| `fileName`, `contentType`, `fileSizeBytes` | File details |
| `ocrMs` | Time spent on the image |

Images that could not be read (broken links, web pages instead of images, files over the size limit) are not saved or charged; the `SUMMARY` record lists each one with the reason.

### Pricing

**$0.002 per image** read, plus a tiny start fee. 1,000 images cost about $2.00. Failed images and images below your **Minimum confidence** cost nothing.

### FAQ

**Which OCR engine does it use?** Tesseract, the open-source OCR engine, with its LSTM models. It works offline inside the Actor: your images are not sent to Google, OpenAI or any other third party.

**Does it read handwriting?** Clear block letters often work; cursive handwriting usually gives low confidence. Use **Minimum confidence** to drop poor results.

**Can it read scanned PDFs?** Use the [PDF to Text & Markdown Extractor](https://apify.com/richiedc95/pdf-text-extractor): it reads digital PDFs exactly and runs the same OCR on scanned pages.

**How do I process images from my computer?** Upload them anywhere that gives a direct link (for example an Apify key-value store, Google Cloud Storage, S3 or Dropbox with a direct-download link) and paste the links.

**How do I get better accuracy?** Set the right language, use images where letters are at least ~15 px tall, and pick **Scattered text** for screenshots and labels. Small images are upscaled automatically.

**Is it fast?** A typical image takes 1–3 seconds. For thousands of images, give the run 2–4 GB of memory.

### Limitations

- Links must point to the image file itself, not to a gallery or a page that shows it.
- Tables come out as text in reading order, not as structured cells.
- Very stylized fonts, low-resolution photos and cursive handwriting give low confidence.
- TIFF and HEIC files are not supported yet; convert them to PNG or JPEG first.

### Use it from your code, AI agents and automations

**Python**

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("richiedc95/image-to-text-ocr").call(run_input={
    "imageUrls": [
        "https://tesseract.projectnaptha.com/img/eng_bw.png"
    ],
    "languages": "eng",
    "layout": "auto",
    "includeLines": True
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

**JavaScript**

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('richiedc95/image-to-text-ocr').call({
    "imageUrls": [
        "https://tesseract.projectnaptha.com/img/eng_bw.png"
    ],
    "languages": "eng",
    "layout": "auto",
    "includeLines": true
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

- 🤖 **AI agents (MCP)**: add the [Apify MCP server](https://mcp.apify.com) to Claude, ChatGPT, Cursor or any MCP client and this Actor becomes a tool your agent can call.
- 🔗 **No-code (n8n, Make, Zapier)**: one HTTP request runs the Actor and returns the results, so any automation tool can use it. In n8n, add an *HTTP Request* node with method `POST`, URL `https://api.apify.com/v2/acts/richiedc95~image-to-text-ocr/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>` and the JSON input above as the body, then send the items to Slack, Google Sheets, email or a CRM. Put a *Schedule* node in front for daily alerts. Make and Zapier have official Apify apps (*Run an Actor* → *Get dataset items*). Ready-made n8n workflows (import from URL) and a step-by-step guide: [n8n / Make / Zapier examples](https://github.com/richiedc95/job-search-mcp/blob/main/examples/README.md).
- 📥 **Exports**: download every run as JSON, CSV, Excel, XML or RSS, or read it through the [Apify API](https://docs.apify.com/api/v2).

### Process new images automatically

1. Click **Save as a new task** with your input.
2. Run it on a **schedule**, or trigger it with an **integration** when another Actor finishes (for example, OCR every image a scraper just collected).
3. Read the latest results from one stable URL:

```text
https://api.apify.com/v2/actor-tasks/<TASK_ID>/runs/last/dataset/items?token=<YOUR_APIFY_TOKEN>&status=SUCCEEDED&format=json
```

### Related Actors

- [PDF to Text & Markdown Extractor](https://apify.com/richiedc95/pdf-text-extractor): digital and scanned PDFs to text, Markdown and RAG chunks.
- [Global News Scraper](https://apify.com/richiedc95/global-news-scraper): worldwide news with sentiment, every 15 minutes.

Found a bug or need a feature? Open an issue on the Issues tab and we will usually answer within a day.

# Actor input Schema

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

Direct links to image files: PNG, JPEG, WebP, GIF, BMP or AVIF (http or https). Each image is one result.

## `languages` (type: `string`):

Tesseract language codes, joined with +. Examples: eng, spa, fra, deu, por, ita, nld, pol, tur, rus, ukr, ara, hin, chi_sim, chi_tra, jpn, kor, or eng+spa for mixed text.

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

Auto suits scans, receipts and photos of pages. Scattered text finds words spread around an image, such as app screenshots, product labels or street signs.

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

Add a "lines" array with each text line, its confidence and its bounding box (x, y, width, height in pixels of the original image).

## `minConfidence` (type: `integer`):

Skip images whose average OCR confidence is below this value. Skipped images are not saved or charged and are listed in the run SUMMARY. 0 = keep everything.

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

Larger files are skipped and listed in the run SUMMARY.

## Actor input object example

```json
{
  "imageUrls": [
    "https://tesseract.projectnaptha.com/img/eng_bw.png"
  ],
  "languages": "eng",
  "layout": "auto",
  "includeLines": false,
  "minConfidence": 0,
  "maxFileSizeMb": 20
}
```

# Actor output Schema

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

No description

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

No description

# 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://tesseract.projectnaptha.com/img/eng_bw.png"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("richiedc95/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 = { "imageUrls": ["https://tesseract.projectnaptha.com/img/eng_bw.png"] }

# Run the Actor and wait for it to finish
run = client.actor("richiedc95/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 '{
  "imageUrls": [
    "https://tesseract.projectnaptha.com/img/eng_bw.png"
  ]
}' |
apify call richiedc95/image-to-text-ocr --silent --output-dataset

```

## MCP server setup

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