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

Bulk OCR for image URLs or a dataset: get text plus lines and words with confidence and bounding boxes. Receipts, menus, labels, screenshots, scans. 100+ languages, only-new mode for schedules. Pay only for images with text; blank and failed images are free.

- **URL**: https://apify.com/rjmacarthy/image-ocr-text-extractor.md
- **Developed by:** [rj](https://apify.com/rjmacarthy) (community)
- **Categories:** Developer tools, Automation, MCP servers
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 image with text extracteds

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

Extract text from images in bulk: give a list of image URLs, or point the Actor at another Actor's dataset, and get back the text of every image with **line- and word-level bounding boxes and confidence scores**. It works on receipts, invoices, menus, product labels, screenshots, scanned forms and document photos, in **100+ languages** (English built in; German, French, Spanish, Portuguese, Italian, Dutch, Polish, Turkish, Russian, Arabic, Hindi, Japanese, Chinese, Korean and more on demand). OCR runs with Tesseract inside the Actor: no third-party OCR API, and your images aren't sent to another service. **You pay $3 per 1,000 images with text, and only for those.** Blank images, unreadable photos and failed downloads are free, with no start fee and no per-image "checked" fee. "Only new images" mode skips images you've already processed, which makes scheduled runs over a folder or a growing dataset cheap.

### What data can you get?

| Field | Example | Notes |
|---|---|---|
| `text` | `"SANDWICHES\nSmoked Pulled Pork 10.50\n..."` | Full text, lines separated by `\n`, paragraphs by a blank line |
| `lines` | `[{ "text": "from beyond", "confidence": 96, "bbox": { "x0": 102, "y0": 59, "x1": 255, "y1": 87 } }]` | Every line with confidence (0-100) and a box in the **original image's pixels** |
| `words` | same shape as lines | Only with Output detail "Text + lines + words" |
| `status` | `ok` / `no-text` / `error` | Only `ok` is charged |
| `confidence` | `93.2` | Mean word confidence |
| `lineCount`, `wordCount` | `15`, `97` | |
| `width`, `height`, `format`, `bytes` | `957`, `307`, `png`, `92802` | Image size after EXIF rotation; detected from the file, not the URL |
| `languages` | `["eng", "nld"]` | OCR languages used |
| `processingMs` | `1552` | Preprocessing + OCR time |
| `error` | `HTTP 404: the file was not found at this URL` | Why an image failed |
| `id`, `url`, `scrapedAt` | SHA-1 of the URL, the URL, ISO time | `id` is stable across runs |

### Use cases

- **Receipts and invoices:** digitise expense receipts and supplier invoices into text you can parse for totals, dates and VAT.
- **Product images:** read ingredients, nutrition facts, model numbers and claims from e-commerce product photos. Chain it after a product scraper with "Dataset ID".
- **Screenshots:** turn app, chat, dashboard or social media screenshots into searchable text.
- **AI and RAG pipelines:** feed text from scanned pages, slides and infographics into embeddings or an LLM. Line boxes let you keep the layout.
- **Ad creatives and marketing:** collect the copy written on competitors' ad images and banners.
- **Menus and signage:** extract dishes and prices from restaurant menu boards.

### How to use

1. Paste image URLs into **Image URLs**, or set **Dataset ID** plus **URL field in dataset** to read them from a previous run (for example a product or Instagram scraper).
2. Pick the **Languages** of the text (default `eng`).
3. Choose the **Output detail**: text only, text + lines (default), or text + lines + words.
4. Run it, then download the results as JSON, CSV or Excel, or read them through the API.

#### Input examples

Basic, English images:

```json
{
    "imageUrls": [
        "https://raw.githubusercontent.com/naptha/tesseract.js/master/tests/assets/images/testocr.png",
        "https://upload.wikimedia.org/wikipedia/commons/b/b4/Harry_the_K%27s_Restaurant_Menu_Board%2C_Citizens_Bank_Park.jpg"
    ],
    "languages": ["eng"]
}
```

Dutch and English receipts, laid out as one block of text:

```json
{
    "imageUrls": ["https://example.com/receipts/2026-11-01.jpg"],
    "languages": ["eng", "nld"],
    "pageSegMode": "single-block",
    "outputFormat": "text+lines"
}
```

Chain after another Actor: OCR every image in the `images` array of each item, process only new images on each scheduled run:

```json
{
    "datasetId": "YOUR_DATASET_ID",
    "urlField": "images",
    "languages": ["eng", "deu"],
    "maxImages": 500,
    "onlyNew": true
}
```

`urlField` accepts dotted paths (`product.image`), and the field may hold a URL, an array of URLs, or objects with a `url` field.

### Output example

From a real run (the `lines` array is shortened):

```json
{
    "id": "72ae8fc992b840e3187ef24f9d253e684431bb6f",
    "url": "https://raw.githubusercontent.com/naptha/tesseract.js/master/tests/assets/images/cosmic.png",
    "status": "ok",
    "error": null,
    "text": "HellO World\nfrom beyond\nthe Cosmic Void",
    "lines": [
        { "text": "HellO World", "confidence": 72, "bbox": { "x0": 102, "y0": 18, "x1": 287, "y1": 41 } },
        { "text": "from beyond", "confidence": 96, "bbox": { "x0": 102, "y0": 59, "x1": 255, "y1": 87 } }
    ],
    "words": null,
    "confidence": 89.1,
    "lineCount": 3,
    "wordCount": 7,
    "languages": ["eng"],
    "width": 400,
    "height": 400,
    "format": "png",
    "bytes": 13037,
    "processingMs": 182,
    "scrapedAt": "2026-11-09T12:54:07.851Z"
}
```

A run summary (counts per status, images charged, errors per URL, timing, requests per host) is saved as `RUN_SUMMARY` in the run's key-value store.

### Pricing

Pay per event:

| Event | Price | When |
|---|---|---|
| `image` | $0.003 | One image where text was found (`status: "ok"`) |

That's all. **1,000 images with text = $3.00.** Images with no readable text (`no-text`), images that fail to download or aren't images (`error`), and images skipped by "Only new images" are **free**. There's no start fee.

**When an image counts as having text:** at least one word that Tesseract reads with ≥ 60% confidence and that has 2+ letters or digits. A photo where Tesseract only guesses at shapes comes back as `no-text` with empty `text` and isn't charged.

Set **Maximum cost per run** in the run options to cap spend. The Actor reserves budget before it runs OCR on each image and stops cleanly when the budget runs out.

### Tips and limits

- **Best results:** printed text on documents, receipts, screenshots, labels and menu boards, with text at least ~20 px high. Small images (under 1000 px) are upscaled 2x automatically.
- **Hard cases:** Tesseract reads documents, not scenes. Street signs at an angle, neon, stylised logos, handwriting and very busy photos give weak or no text. Try **Page layout: Sparse text** for photos and ads, and **Single block** for receipts and labels.
- **Languages:** add only the languages that are really in the images. Each extra language slows OCR down and can add noise. Japanese, Chinese and Korean need `jpn`, `chi_sim`/`chi_tra` and `kor`. English (`eng`) is built in. Other languages are downloaded once per run (2-15 MB, a few seconds).
- **Formats:** JPG, PNG, WebP, GIF (first frame), BMP, TIFF (first page), AVIF. Not supported: HEIC, SVG and **PDF** (for PDFs, use our [PDF to Markdown & Text Converter](https://apify.com/rjmacarthy/pdf-to-markdown)). Files over "Max image size" (default 15 MB) are skipped. Images larger than 4000 px are scaled down before OCR.
- **Speed:** OCR is CPU-bound. At the default 1024 MB, expect roughly 2-6 seconds per image (about 15 images per minute). Apify gives 1 CPU core per 4 GB of memory, so to go faster, raise the run's memory. Workers scale with it (1 per 2 GB).
- **Rotated photos** are turned upright from their EXIF orientation. Pages scanned sideways without EXIF aren't auto-rotated.
- **Only new images** keys each image by its URL and a hash of its content, shared by all runs of this Actor in your account. Turn it off to reprocess, for example with different languages.

### FAQ

**Is it legal?** The Actor only downloads images from the URLs you provide, like a browser would. You're responsible for having the right to process those images and for complying with copyright, privacy (GDPR/CCPA) and the source sites' terms. Don't use it to extract personal data from documents you aren't allowed to process.

**Does my image go to a third-party AI or OCR API?** No. Tesseract runs inside the Actor's container. The only outbound requests are the image downloads and, for non-English languages, the language model download from cdn.jsdelivr.net.

**Why is an image `no-text` when I can see text in it?** Tesseract wasn't confident about any word, which is common with angled photos, decorative fonts and low-resolution text. Try a sharper or larger image, the right language, or another Page layout. These images are never charged.

**Can I use images that need a login?** No, only public URLs. Files in an Apify key-value store work through their record URL (`https://api.apify.com/v2/key-value-stores/STORE_ID/records/KEY`). The run's own token is sent to Apify only.

**Do I need a proxy?** Usually not. If a site blocks downloads from Apify's servers (HTTP 403/429), enable Apify Proxy (datacenter). Residential and SERP proxy groups aren't supported: the run falls back to datacenter proxy and logs a warning.

**Are the bounding boxes in the original image's coordinates?** Yes. They're in the pixels of the image after EXIF rotation, even when the Actor upscaled or downscaled it for OCR.

### Integrations

- **API:** start runs and read results with the [Apify API](https://docs.apify.com/api/v2) or the JavaScript/Python clients, and download the dataset as JSON, CSV, Excel or XML.
- **Chaining Actors:** use **Dataset ID** to OCR the images collected by any scraper (product, real-estate, social media), or start this Actor from a webhook when the scraper finishes.
- **Make, Zapier and n8n:** run OCR on images from a form, email or spreadsheet, and send the text on to Google Sheets, Notion or an LLM step.
- **MCP:** AI agents can call this Actor as a tool through the [Apify MCP server](https://mcp.apify.com) to read text from images on demand.
- **Schedules:** with **Only new images**, a daily schedule over the same folder or dataset only processes, and only charges for, new images.

### Changelog

- **0.1 (November 2026):** First release. Tesseract OCR (tesseract.js 7, LSTM best_int models), 100+ languages, line and word boxes with confidence, EXIF auto-rotation and small-image upscaling, JPG/PNG/WebP/GIF/BMP/TIFF/AVIF, dataset input, "only new images" mode, pay only for images with text.

### More scrapers by the same developer

- [Apple App Store Scraper: Apps, Search & Reviews](https://apify.com/rjmacarthy/app-store-scraper)
- [Broken Link Checker & SEO Site Audit - 404s & Redirects](https://apify.com/rjmacarthy/broken-link-checker)
- [Bulk File Downloader - PDFs, Images & Files from URL Lists](https://apify.com/rjmacarthy/bulk-file-downloader)
- [ESPN Scraper - Scores, Odds, Standings & Tennis](https://apify.com/rjmacarthy/espn-scraper)
- [Google Play Scraper: Apps, Search & Reviews](https://apify.com/rjmacarthy/google-play-scraper)
- [PDF to Markdown & Text Converter for LLMs and RAG](https://apify.com/rjmacarthy/pdf-to-markdown)

Browse all my Actors on [my Apify Store profile](https://apify.com/rjmacarthy).

### Support

Found a bug or need a feature (another language, PDF pages, a different output shape)? Open an issue on the Issues tab with the run ID and an example image URL. We usually reply within a day.

# Actor input Schema

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

Direct links to image files, one per line (JPG, PNG, WebP, GIF first frame, BMP, TIFF first page, AVIF). The image must be public (no login). Apify key-value store record URLs work too. Required unless you set a Dataset ID below. PDFs are not supported: use our PDF to Markdown Actor.

## `datasetId` (type: `string`):

Read image URLs from an Apify dataset, e.g. the output of a product or social media scraper. Give the dataset ID or name; set the field that holds the image link below. Combined with Image URLs.

## `urlField` (type: `string`):

Field of each dataset item holding the image URL. Dotted paths work (e.g. product.image). The field may also be an array of URLs or of objects with a url field, e.g. images.

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

Tesseract language codes of the text in the images, e.g. eng, deu, fra, spa, por, ita, nld, pol, tur, rus, ara, hin, jpn, chi_sim, chi_tra, kor (2-letter codes like de or fr are accepted too). English is built in; other languages are downloaded once per run (2-15 MB each). Combine languages only when images really mix them: each extra language slows OCR.

## `outputFormat` (type: `string`):

Text only is smallest. Lines and words include a confidence (0-100) and a bounding box {x0, y0, x1, y1} in the original image's pixels.

## `preprocess` (type: `boolean`):

Rotate photos upright from their EXIF orientation and upscale small images (under 1000 px) 2x, which improves accuracy on small text. Huge images (over 4000 px) are always scaled down.

## `pageSegMode` (type: `string`):

How Tesseract looks for text. Auto suits most documents and screenshots; try Sparse text for photos and ad creatives, Single block for receipts and labels.

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

Maximum number of images to process in this run (0 = no limit).

## `maxImageMb` (type: `integer`):

Larger files are skipped with an error item (not charged).

## `concurrency` (type: `integer`):

OCR workers running in parallel. OCR is CPU-bound and Apify gives 1 CPU core per 4 GB of memory, so more workers only help with more memory: the Actor uses at most one worker per 2 GB of run memory.

## `onlyNew` (type: `boolean`):

Skip images already processed by an earlier run of this Actor in your account (same URL and same file content). Ideal for scheduled runs over a folder or a growing dataset. Skipped images are not output or charged; an image replaced at the same URL is processed again.

## `proxyConfiguration` (type: `object`):

Not needed for most images. Enable Apify Proxy (datacenter) if a site blocks downloads from Apify's servers (HTTP 403/429), or add your own proxy URLs. Residential and SERP proxy groups are not supported: the run falls back to Apify datacenter proxy.

## Actor input object example

```json
{
  "imageUrls": [
    "https://raw.githubusercontent.com/naptha/tesseract.js/master/tests/assets/images/testocr.png",
    "https://raw.githubusercontent.com/naptha/tesseract.js/master/tests/assets/images/bill.png",
    "https://raw.githubusercontent.com/naptha/tesseract.js/master/tests/assets/images/cosmic.png",
    "https://raw.githubusercontent.com/tesseract-ocr/test/main/testing/phototest.tif",
    "https://upload.wikimedia.org/wikipedia/commons/b/b4/Harry_the_K%27s_Restaurant_Menu_Board%2C_Citizens_Bank_Park.jpg"
  ],
  "urlField": "url",
  "languages": [
    "eng"
  ],
  "outputFormat": "text+lines",
  "preprocess": true,
  "pageSegMode": "auto",
  "maxImages": 50,
  "maxImageMb": 15,
  "concurrency": 2,
  "onlyNew": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

Text, status and confidence per image.

## `items` (type: `string`):

Every field including lines, words and bounding boxes.

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

Counts per status, charged images, errors, timing and request statistics.

# 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/naptha/tesseract.js/master/tests/assets/images/bill.png",
        "https://raw.githubusercontent.com/naptha/tesseract.js/master/tests/assets/images/cosmic.png",
        "https://raw.githubusercontent.com/tesseract-ocr/test/main/testing/phototest.tif",
        "https://upload.wikimedia.org/wikipedia/commons/b/b4/Harry_the_K%27s_Restaurant_Menu_Board%2C_Citizens_Bank_Park.jpg"
    ],
    "languages": [
        "eng"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("rjmacarthy/image-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 = {
    "imageUrls": [
        "https://raw.githubusercontent.com/naptha/tesseract.js/master/tests/assets/images/testocr.png",
        "https://raw.githubusercontent.com/naptha/tesseract.js/master/tests/assets/images/bill.png",
        "https://raw.githubusercontent.com/naptha/tesseract.js/master/tests/assets/images/cosmic.png",
        "https://raw.githubusercontent.com/tesseract-ocr/test/main/testing/phototest.tif",
        "https://upload.wikimedia.org/wikipedia/commons/b/b4/Harry_the_K%27s_Restaurant_Menu_Board%2C_Citizens_Bank_Park.jpg",
    ],
    "languages": ["eng"],
}

# Run the Actor and wait for it to finish
run = client.actor("rjmacarthy/image-ocr-text-extractor").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/naptha/tesseract.js/master/tests/assets/images/bill.png",
    "https://raw.githubusercontent.com/naptha/tesseract.js/master/tests/assets/images/cosmic.png",
    "https://raw.githubusercontent.com/tesseract-ocr/test/main/testing/phototest.tif",
    "https://upload.wikimedia.org/wikipedia/commons/b/b4/Harry_the_K%27s_Restaurant_Menu_Board%2C_Citizens_Bank_Park.jpg"
  ],
  "languages": [
    "eng"
  ]
}' |
apify call rjmacarthy/image-ocr-text-extractor --silent --output-dataset

```

## MCP server setup

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

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/baCZG3J5buqfcGo2v/builds/ZCGRc2RYPEzJ2vhOA/openapi.json
