# Image to Text OCR | Extract Text from Images & Screenshots (`trev0n/image-ocr`) Actor

Extract text from JPG, PNG, WebP, GIF, TIFF and BMP images and screenshots in 28 languages: plain text, lines and words with positions and confidence scores.

- **URL**: https://apify.com/trev0n/image-ocr.md
- **Developed by:** [Paweł](https://apify.com/trev0n) (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 $3.00 / 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.

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

🎯 **Turn images, screenshots, scans and photos of documents into clean, searchable text in seconds.**

Paste links to your images and get back every word they contain: the full text, each line with its position on the image, and (if you want) every single word with its position and a confidence score. Works with JPG, PNG, WebP, GIF, TIFF and BMP, in 28 languages including English, Polish, German, French, Spanish, Chinese, Japanese and Arabic.

### 🚀 What Does It Do?

This tool automatically downloads each image you give it, reads the text in it and returns **structured, ready-to-use results**. No manual retyping and no copy-paste from screenshots: add your links and hit Start.

💡 Give it public links, signed cloud links (S3, Google Cloud Storage, Dropbox) or base64 `data:image` URLs. One row per image, with errors reported per image so one broken link never stops the run.

### 👥 Who Is This For?

| 🏢 Use Case                  | 💬 How It Helps                                                                    |
| ---------------------------- | ---------------------------------------------------------------------------------- |
| 🧾 **Finance & back office** | Pull numbers, dates and invoice IDs out of receipt and invoice photos              |
| 🛒 **E-commerce teams**      | Read text from product images, labels and banners scraped from shops               |
| 📣 **Marketing & research**  | Extract copy from ad creatives, social media images and competitor screenshots     |
| 🤖 **AI & automation**       | Feed image text into LLMs, search indexes and workflows (Make, n8n, Zapier)        |
| 📚 **Archives & libraries**  | Digitise scanned pages and old documents into searchable text                      |
| 🧑‍💻 **QA & product teams**    | Check what users actually see in app screenshots, find untranslated or broken text |

### ✨ Features

- 🖼️ **All common formats**: JPG, PNG, WebP, GIF, TIFF, BMP
- 🌍 **28 languages**, mix several at once (for example English + Polish)
- 📍 **Positions included**: every line and word comes with its box on the image (x, y, width, height)
- 🎯 **Confidence scores** per word, per line and for the whole image
- 🧹 **Noise filter**: drop low-confidence words from busy photos and logos
- 🪟 **Transparent screenshots** handled: text on transparent backgrounds is read correctly
- 📏 **Huge images** are scaled automatically; positions are still given in original pixels
- ⚡ **Parallel processing** for big batches
- 🛡️ **Robust**: a dead link or a non-image file gives an error row, the rest of the batch keeps going

### 🎛️ Filters & Options

| ⚙️ Option                 | 📝 What It Does                                          |
| ------------------------- | -------------------------------------------------------- |
| 🔗 **Image URLs**         | Links to the images (or base64 `data:image` URLs)        |
| 🌍 **Languages**          | Languages printed in your images; pick all that appear   |
| 📋 **Output detail**      | Text only / text + lines / text + lines + words          |
| 🎯 **Minimum confidence** | Drop words read with confidence below this value (0-100) |
| 🔢 **Max images**         | Stop after N images (0 = all)                            |
| ⚡ **Parallel images**    | How many images are read at the same time                |
| 📦 **Max file size**      | Skip files above this size (MB)                          |
| 🌐 **Proxy**              | Only needed when the image host blocks downloads         |

### 📦 What You Get (Output Fields)

#### 🖼️ Image

| Field         | Example                                  |
| ------------- | ---------------------------------------- |
| 🔗 `url`      | `https://example.com/receipts/r-117.jpg` |
| 📄 `fileName` | `r-117.jpg`                              |
| 🏷️ `format`   | `jpeg`                                   |
| 📐 `width`    | `1240`                                   |
| 📐 `height`   | `1754`                                   |

#### 📝 Text

| Field              | Example                                             |
| ------------------ | --------------------------------------------------- |
| 📝 `text`          | `INVOICE 2026-117\nTotal amount: 1,250.00 EUR`      |
| 🔢 `wordCount`     | `42`                                                |
| 📏 `lineCount`     | `9`                                                 |
| 🎯 `avgConfidence` | `91.4`                                              |
| ✅ `hasText`       | `true`                                              |
| 🌍 `languages`     | `["eng"]`                                           |
| 📍 `lines`         | text, confidence and box of every line              |
| 🔤 `words`         | text, confidence and box of every word (words mode) |
| ⏱️ `processingMs`  | `840`                                               |
| ⚠️ `error`         | `null`, or why the image could not be read          |
| 🕒 `scrapedAt`     | `2026-11-24T12:00:00.000Z`                          |

### 📊 Example Output

```json
{
    "url": "https://example.com/receipts/r-117.png",
    "fileName": "r-117.png",
    "format": "png",
    "width": 900,
    "height": 260,
    "languages": ["eng"],
    "text": "INVOICE 2026-117\nTotal amount: 1,250.00 EUR\nPayment due in 14 days",
    "wordCount": 11,
    "lineCount": 3,
    "avgConfidence": 95.6,
    "hasText": true,
    "lines": [
        { "text": "INVOICE 2026-117", "confidence": 96.1, "bbox": { "x": 31, "y": 41, "width": 329, "height": 29 } },
        {
            "text": "Total amount: 1,250.00 EUR",
            "confidence": 95.3,
            "bbox": { "x": 33, "y": 105, "width": 497, "height": 36 }
        },
        {
            "text": "Payment due in 14 days",
            "confidence": 95.5,
            "bbox": { "x": 33, "y": 169, "width": 428, "height": 37 }
        }
    ],
    "processingMs": 612,
    "error": null,
    "scrapedAt": "2026-11-24T12:00:00.000Z"
}
```

### 📋 Dataset Views

| 👁️ View             | 📝 What It Shows                                             |
| ------------------- | ------------------------------------------------------------ |
| 📊 **Overview**     | Image preview, text, word count, confidence, size and errors |
| 📋 **Full details** | Every field including lines and words with their positions   |

### 💰 Pricing

You pay a small fee per image that was read. Broken links and files that are not images are free.

### ❓ FAQ

**🖼️ Which images work best?**
Screenshots, scans and sharp photos of printed text. Text should be at least about 15 pixels tall. Handwriting is not supported.

**🌍 My text is in two languages. What should I pick?**
Select both languages. Each extra language makes reading a little slower, so only pick the ones that really appear.

**📍 What are the boxes in `lines` and `words`?**
The position of the text on the original image in pixels: left (`x`), top (`y`), `width` and `height`. Use them to highlight text, crop fields or find a value next to a label.

**🧹 I get random characters from photos. How do I clean them?**
Set **Minimum word confidence** to 50-70. Words read with low confidence (usually patterns, logos and textures) are dropped.

**🔐 Can I use private images?**
Yes, as long as there is a link the tool can open: signed links from S3, Google Cloud Storage or Dropbox, or base64 `data:image` URLs.

**🔒 Are my signed links safe?**
The query string of every link (where signed URLs keep their tokens) is removed before results are saved. Links to private or internal network addresses are refused.

**📄 Do you support PDFs?**
This tool reads images. For PDFs, Word and other documents use our **Document to Markdown** actor, which also OCRs scanned pages.

### 🛠️ Need Custom Filters or Features?

**I'm happy to customize this tool for your specific needs!** 🤝

Whether you need:

- 🧾 Field extraction from receipts and invoices (totals, dates, tax IDs) as separate columns
- 📊 Extra data fields or custom output formats
- 🔄 Integration with your CRM, Google Sheets, or database
- ⏰ Scheduled processing of new images from a folder or bucket
- ✍️ Support for more languages or special scripts

👉 **Don't hesitate to reach out via private message** — I respond quickly and I'm always open to building exactly what you need. No request is too small or too specific!

### ⚖️ Legal & Ethical Use

Only process images you own or have the right to use. Do not use this tool to read personal data without a legal basis. You are responsible for complying with copyright, privacy (GDPR) and the terms of the sites you take images from.

# Actor input Schema

## `images` (type: `array`):

Links to JPG, PNG, WebP, GIF, TIFF or BMP images. Base64 data:image URLs work too.

## `startUrls` (type: `array`):

Optional: the same as above as a request list (you can also upload a text file with one URL per line).

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

Languages of the text in the images. Pick every language that appears; each extra language makes reading a bit slower.

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

Text only; text + lines with positions and confidence; or text + lines + every word with its position.

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

Drop words read with lower confidence (noise from photos and logos). 0 keeps everything.

## `maxResults` (type: `integer`):

Stop after this many images. 0 = all.

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

Images read at the same time. Higher values need more memory (about 300 MB each).

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

Larger files are skipped with an error row.

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

Only needed when the image host blocks downloads.

## Actor input object example

```json
{
  "images": [
    "https://tesseract.projectnaptha.com/img/eng_bw.png"
  ],
  "languages": [
    "eng"
  ],
  "outputFormat": "lines",
  "minConfidence": 0,
  "maxResults": 0,
  "maxConcurrency": 2,
  "maxFileSizeMb": 20,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `results` (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 = {
    "images": [
        "https://tesseract.projectnaptha.com/img/eng_bw.png"
    ]
};

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

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

```

## MCP server setup

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