# Image to Text OCR: Screenshots, Scans & Photos (`plain_rows/image-ocr-text`) Actor

Extract text from images with OCR. Give it links to screenshots, scanned pages or photos of documents (PNG, JPEG, WebP, GIF, BMP) and get the text back with a confidence score, plus optional line-by-line positions. Over 100 languages. You only pay for images that are read; failed links are free.

- **URL**: https://apify.com/plain_rows/image-ocr-text.md
- **Developed by:** [Plain Rows](https://apify.com/plain_rows) (community)
- **Categories:** Developer tools, Automation, AI
- **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 image reads

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: Screenshots, Scans and Photos

Give this Actor links to images and get back the text in them. It reads screenshots, scanned pages and photos of documents, and tells you how confident it is in each result.

You are charged only for images that are actually read. Broken links, files that are not images and oversized files are reported and cost nothing.

### What it reads well, and what it does not

It uses Tesseract, the most widely used open-source OCR engine.

- **Reads well:** screenshots, scanned documents, book pages, printed forms, slides, and clear photos of printed text. In testing, three such images came back at 91 to 94 confidence out of 100.
- **Reads poorly:** handwriting, text on busy photo backgrounds, heavily skewed or blurry photos, and very small print. Use the confidence score to spot these.

### What you get for each image

- **The text**, with lines joined back into paragraphs (or kept line by line, if you prefer).
- **A confidence score** from 0 to 100.
- **Word and character counts**, and a flag when no text was found.
- **Each line with its position** in the image (optional), for when you need to know where the text sits.

### Input

| Field | What it does |
|---|---|
| **Image links** | One link per image: PNG, JPEG, WebP, GIF or BMP. |
| **Languages in the images** | Tesseract codes such as `eng`, `spa`, `fra`, `deu`, `jpn`. English if left empty. |
| **Keep the original line breaks** | On for receipts, tables and forms; off for running text. |
| **Include each line with its position** | Adds a list of lines with confidence and pixel position. |
| **Largest image to accept (MB)** | Default 20. Larger images are skipped and not charged. |

```json
{
    "imageUrls": [
        "https://raw.githubusercontent.com/naptha/tesseract.js/master/tests/assets/images/testocr.png",
        "https://raw.githubusercontent.com/tesseract-ocr/tessdoc/main/images/eurotext.png"
    ],
    "languages": [
        "eng"
    ],
    "includeLines": false
}
```

### Output

```json
{
    "url": "https://raw.githubusercontent.com/naptha/tesseract.js/master/tests/assets/images/testocr.png",
    "status": "ok",
    "error": null,
    "imageType": "png",
    "text": "This is a lot of 12 point text to test the ocr code and see if it works on all types of file format.\n\nThe quick brown dog jumped over the lazy fox.",
    "confidence": 94,
    "wordCount": 60,
    "hasText": true,
    "languages": [
        "eng"
    ],
    "extractedAt": "2026-11-21T00:30:00.000Z"
}
```

An image that could not be read comes back with `"status": "failed"` and a plain-language `error`.

### How to extract text from an image

1. Paste one or more image links into **Image links**. Each has to point straight at the image file.
2. If the text is not in English, add the language codes.
3. Click **Start**. A typical screenshot takes one to three seconds.
4. Download the results as JSON, CSV or Excel, or read them through the API.

### How much does image OCR cost?

You pay **$0.002 per image that is read**, so 1,000 images cost $2. Links that fail and files that are not images are free.

Apify's free plan includes $5 of usage a month, which is about 2,500 images. Users on Apify's Silver plan pay 10% less and on Gold 20% less.

### Frequently asked questions

#### Which languages are supported?

More than 100, using Tesseract's language codes: `eng`, `spa`, `fra`, `deu`, `ita`, `por`, `nld`, `rus`, `jpn`, `kor`, `chi_sim`, `ara`, `hin` and so on. The language data is downloaded when the run starts.

#### Can it read PDFs?

No. This Actor reads image files. For PDFs, including scanned ones, use the PDF Text Extractor listed below.

#### Can it read handwriting?

Not reliably. Tesseract is built for printed text.

#### How do I know if a result can be trusted?

Check `confidence`. Above about 85, printed text is usually right. Below about 70, check it by eye.

#### Can I upload an image instead of giving a link?

The Actor reads links. Put the image somewhere it can be fetched without a login, such as an Apify key-value store, and use that link.

### Other tools by Plain Rows

- [ATS Jobs Scraper](https://apify.com/plain_rows/ats-jobs-scraper): Search 11,400+ company career pages by keyword, with pay ranges and an only-new mode.
- [Greenhouse Jobs Scraper](https://apify.com/plain_rows/greenhouse-jobs-scraper): Greenhouse boards in depth: pay ranges, departments, offices and custom fields.
- [PDF Text Extractor](https://apify.com/plain_rows/pdf-text-extractor): PDF to text and Markdown, page by page, with OCR for scans.
- [US New Business Leads](https://apify.com/plain_rows/us-business-registry): Newly registered and newly licensed businesses from official state and city data.
- [Bulk Domain Lookup](https://apify.com/plain_rows/domain-lookup): Registration dates, availability, DNS records, mail provider, SPF and DMARC for a list of domains.
- [Website Screenshot](https://apify.com/plain_rows/website-screenshot): Full-page or mobile screenshots of many web pages at once.

### Questions or problems

Open the **Issues** tab on this Actor's page and describe what you ran and what you expected. Issues are answered there.

# Actor input Schema

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

One link per image. Each link must point straight at an image file: PNG, JPEG, WebP, GIF or BMP.

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

Three-letter Tesseract language codes, for example eng, spa, fra, deu, ita, por, jpn or chi_sim. Leave empty for English. List more than one if an image mixes languages.

## `keepLineBreaks` (type: `boolean`):

Off: lines are joined back into paragraphs, which reads better and suits AI models. On: every line of the image stays on its own line, which suits receipts, tables and forms.

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

Add a list of every line of text with its confidence and where it sits in the image (x, y, width, height in pixels).

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

Images larger than this are skipped and reported, not charged.

## Actor input object example

```json
{
  "imageUrls": [
    "https://raw.githubusercontent.com/naptha/tesseract.js/master/tests/assets/images/testocr.png",
    "https://raw.githubusercontent.com/tesseract-ocr/tessdoc/main/images/eurotext.png"
  ],
  "keepLineBreaks": false,
  "includeLines": false,
  "maxFileSizeMb": 20
}
```

# Actor output Schema

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

One item per image.

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

How many images were read, failed, or had no text.

# 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/naptha/tesseract.js/master/tests/assets/images/testocr.png",
        "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("plain_rows/image-ocr-text").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/naptha/tesseract.js/master/tests/assets/images/testocr.png",
        "https://raw.githubusercontent.com/tesseract-ocr/tessdoc/main/images/eurotext.png",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("plain_rows/image-ocr-text").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/naptha/tesseract.js/master/tests/assets/images/testocr.png",
    "https://raw.githubusercontent.com/tesseract-ocr/tessdoc/main/images/eurotext.png"
  ]
}' |
apify call plain_rows/image-ocr-text --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,plain_rows/image-ocr-text"
        }
    }
}
```

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/TBtx92YX2iaB17e4p/builds/H14RigXaPMgpkbydF/openapi.json
