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

Extract text from images, screenshots and photos of documents in bulk with OCR. PNG, JPEG, WebP, TIFF and more, 7 languages, confidence scores and optional line positions. Scanned PDFs work too. Pay only per image read.

- **URL**: https://apify.com/cuestadata/image-to-text-ocr.md
- **Developed by:** [Cuesta Data](https://apify.com/cuestadata) (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 read (ocr)s

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

### What does Image to Text OCR do?

**Image to Text OCR** reads the text inside images and gives it back as clean, copyable text. Paste links to **screenshots, photos of documents, receipts, scanned pages, labels or any PNG/JPEG**, and get the text for every image in one run, with a confidence score for each.

It is built for bulk work: one image or thousands, from direct links or Google Drive and Dropbox share links. Results land in a dataset you can download as JSON, CSV or Excel, or pull straight into your app through the API.

### Why use this image to text converter?

- **Bulk OCR, no setup.** No Tesseract install, no Python, no API keys. Paste links and press Start.
- **Built-in clean-up.** Small screenshots are upscaled, photos are auto-rotated from their EXIF data, transparent PNGs are flattened and contrast is corrected before OCR, which noticeably improves accuracy on low-resolution images.
- **7 languages.** English, Spanish, French, German, Portuguese, Italian and Dutch, alone or combined in one run.
- **Confidence scores.** Every image gets an average confidence (0-100), so you can flag blurry or low-quality images automatically.
- **Line positions (optional).** Get every text line with its bounding box and confidence for layout-aware processing.
- **All common formats.** PNG, JPEG, WebP, GIF, BMP and multi-page TIFF. Scanned or digital PDFs also work in the same run.
- **Fair pricing.** Broken links, unsupported files and failed downloads are listed with a clear error code and are never charged.

### What can I use it for?

- **Receipts and invoices:** turn photos into text for expense tracking or bookkeeping automations.
- **Screenshots:** make screenshots of dashboards, error messages, slides and charts searchable.
- **Product images and labels:** pull ingredients, specs or serial numbers out of packaging photos for a catalog.
- **Scanned documents and forms:** convert old scans into editable, searchable text.
- **AI pipelines:** give an LLM or RAG system the text inside images at a fraction of the cost of a vision model.
- **No-code workflows:** send image links from Google Sheets, Airtable, Make, Zapier or n8n and get text back.

### How to extract text from images

1. Click **Try for free** / **Start**.
2. Paste your image links into **Image URLs**, one per line.
3. Pick the **Languages** in your images (English by default).
4. Click **Start**. The text appears in the **Output** tab, ready to download as JSON, CSV, Excel or HTML.

### Input example

```json
{
    "urls": [
        "https://tesseract.projectnaptha.com/img/eng_bw.png",
        "https://example.com/receipt.jpg"
    ],
    "languages": ["eng"],
    "includeLines": false
}
```

### Output example

This is the real output for the first test image above (a 1486 x 668 PNG of a printed poem), which took about 4 seconds:

```json
{
    "url": "https://tesseract.projectnaptha.com/img/eng_bw.png",
    "fileName": "eng_bw.png",
    "fileType": "png",
    "fileSizeBytes": 26854,
    "pageCount": 1,
    "ocrPages": 1,
    "avgOcrConfidence": 94.6,
    "languages": ["eng"],
    "charCount": 352,
    "wordCount": 58,
    "metadata": { "width": 1486, "height": 668, "format": "PNG" },
    "text": "Mild Splendour of the various-vested Night!\nMother of wildly-working visions! hail!\nI watch thy gliding, while with watery light\n...",
    "pages": [
        { "page": 1, "method": "ocr", "confidence": 94.6, "charCount": 352, "text": "Mild Splendour of the various-vested Night! ..." }
    ],
    "error": null
}
```

With **Include line positions** turned on, each page also contains:

```json
"lines": [
    { "text": "Mild Splendour of the various-vested Night!", "confidence": 94.3, "box": { "x": 38, "y": 34, "width": 1256, "height": 77 } }
],
"imageSize": { "width": 1486, "height": 668 }
```

Errors look like this and are **not charged**:

```json
{ "url": "https://example.com/missing.png", "error": "Download failed with HTTP 404", "errorCode": "HTTP_404" }
```

Error codes: `INVALID_URL`, `HTTP_<status>`, `DOWNLOAD_FAILED`, `FILE_TOO_LARGE` (over 100 MB), `UNSUPPORTED_TYPE`, `CORRUPT_FILE`.

### How much does it cost?

This Actor uses **pay-per-event** pricing:

- **Image read with OCR:** about **$2.50 per 1,000 images** on the Free plan, and less on paid Apify plans (see the Pricing tab). Each page of a multi-page TIFF or scanned PDF counts as one image.
- **Digital PDF page** (text extracted directly, no OCR needed): about $0.20 per 1,000 pages.

So 100 screenshots cost about $0.25. Failed downloads and unsupported files are free.

### Tips for best accuracy

- Select every language that appears in your images, and only those.
- Sharp, well-lit images with dark text on a light background work best. Values of `avgOcrConfidence` above 85 are usually very good.
- Crop out large photos or graphics around the text when you can.
- For big batches, give the run more memory (2-4 GB): more memory means more CPU, so more images are read in parallel.

### Integrations and API

Use it from the [Apify API](https://docs.apify.com/api/v2), the JavaScript or Python client, Make, Zapier, n8n, Google Sheets or any AI agent that supports MCP. Run it on a schedule, or trigger it from a webhook whenever new images arrive.

### Use with AI agents (MCP)

Connect this tool to Claude, ChatGPT, Cursor or any other MCP client through the [Apify MCP server](https://docs.apify.com/mcp). Add this server URL to your client and sign in with your Apify account:

```json
{
  "mcpServers": {
    "apify": { "url": "https://mcp.apify.com/?tools=actors,docs,cuestadata/image-to-text-ocr" }
  }
}
```

Then ask in plain words, for example: *"Read the text in these 50 receipt photos and give me one row per image."* The agent fills in the input, runs Image to Text OCR and reads the results.

AI agents without an Apify account can pay per run with a prepaid token (x402, Skyfire or card) through [Apify agentic payments](https://docs.apify.com/agents/payments). This tool uses limited permissions, so it works with those tokens.

### More tools from Cuesta Data

| Tool | What it does |
|---|---|
| [Website Screenshot & PDF](https://apify.com/cuestadata/website-screenshot-pdf) | Full-page, mobile and element screenshots or PDFs of any list of URLs, with change detection. |
| [PDF & Image to Text (OCR)](https://apify.com/cuestadata/pdf-image-text-extractor) | Text from digital and scanned PDFs and images, page by page, with OCR in 7 languages. |
| [Company Jobs API](https://apify.com/cuestadata/company-jobs-feed) | Every open job from company career pages on Greenhouse, Lever, Ashby, Workable and more. |
| [SEO Site Audit](https://apify.com/cuestadata/seo-site-audit) | Crawl a site and check titles, meta tags, headings, broken links, duplicates and schema, with an HTML report. |
| [PageSpeed & Lighthouse Bulk Audit](https://apify.com/cuestadata/pagespeed-lighthouse-audit) | Lighthouse scores, Core Web Vitals and top fixes for many URLs or a whole sitemap, with HTML reports. |
| [Domain Availability Checker](https://apify.com/cuestadata/domain-availability-checker) | Bulk domain availability for name ideas x TLDs, confirmed by registry RDAP/WHOIS, with registrar and expiry dates. |
| [Bulk File Downloader](https://apify.com/cuestadata/bulk-file-downloader) | Download files from a URL list or every PDF/image linked on a page, with one ZIP link and SHA-256 hashes. |
| [Link Preview & Website Metadata](https://apify.com/cuestadata/link-preview-metadata) | Title, description, Open Graph image, favicon, logo, brand color, JSON-LD and oEmbed for any list of URLs. |

### FAQ

**Are my images stored?**
Images are downloaded only to read them and are not kept by this Actor. The extracted text is saved in your own Apify dataset, which you control and can delete.

**Can it read handwriting?**
Printed and typed text works best. Neat handwriting is sometimes recognized, but results vary.

**Can I upload files instead of links?**
The tool reads files from links. Direct image links and public Google Drive or Dropbox share links all work.

**Which OCR engine does it use?**
Tesseract, the widely used open-source OCR engine, with our own image clean-up in front of it.

**Is it legal to extract text from images?**
Extracting text from images you own or have permission to process is generally fine. You are responsible for complying with copyright and privacy laws for the files you process.

**I found a bug or need a feature.**
Open an issue on the **Issues** tab and we will take a look.

*Image to Text OCR is built and maintained by Cuesta Data.*

# Actor input Schema

## `urls` (type: `array`):

Links to images (PNG, JPEG, WebP, GIF, BMP, TIFF), one per line. Screenshots, photos of documents, receipts and scans all work. Public Google Drive and Dropbox share links are supported, and PDFs work too.

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

Languages used for OCR. Pick every language that appears in your documents (more languages = slightly slower).

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

For OCR pages, adds every text line with its confidence and bounding box (pixels of the processed image, see imageSize).

## Actor input object example

```json
{
  "urls": [
    "https://tesseract.projectnaptha.com/img/eng_bw.png"
  ],
  "languages": [
    "eng"
  ],
  "includeLines": false
}
```

# Actor output Schema

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

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

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

```

## MCP server setup

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