# Image to Text OCR: images and scanned PDF OCR, per line (`steadydata/image-ocr-text`) Actor

Text extraction (OCR) from images and scanned PDFs by URL, up to 200 per run: every line with its confidence and position, the full text joined, image size and format, for screenshots, scans, receipts, menus and product labels, without a browser or an API key. Pay per image with text.

- **URL**: https://apify.com/steadydata/image-ocr-text.md
- **Developed by:** [Steadydata Team](https://apify.com/steadydata) (community)
- **Categories:** AI, Automation, Developer tools
- **Features:** Limited permissions
- **Stats:** 242 total users, 172 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.95 / 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: images and scanned PDF OCR, per line

Text from images by URL, up to 200 per run: every line with its confidence and position, the full text joined, image size and format, for screenshots, scans, receipts, menus and product labels, without a browser or an API key. Pay per image with text.

### Why this scraper

- **Only delivered results are charged.** Inputs that fail come back as clear error
  records at no cost.
- Open-source OCR (PaddleOCR models on onnxruntime) inside the actor, so no external API, no key and no per-call vendor fee: a 640 by 480 screenshot reads in about two seconds. Measured on the platform: eight lines at 0.98 confidence for seven hundredths of a cent.
- Every line separately with its confidence and its box (x, y, width, height), plus the full text joined in reading order, the image size and format. Lines under the confidence you set are dropped, so noisy backgrounds do not produce garbage rows. Every URL is checked against its host's robots.txt first; an image without readable text is an error row, not an empty `image-read` row (from 3 November 2026 it costs the small `image-checked` fee, see Pricing).

### Who this is for

Paste image URLs in `urls` (up to 200 per run; PNG, JPEG, WebP, GIF, BMP, TIFF) and set `minConfidence` (default 0.5). Every row carries the URL, the full text, the lines, the line count, the average confidence, the boxes, the image width and height, the format, the file size and the OCR time.

### Who this is not for

This is OCR, not vision: printed and clean screen text reads reliably, handwriting, tiny text, heavy skew or low contrast read poorly or not at all, and the confidence column tells you which lines to trust. The models cover Latin scripts and Chinese; other scripts are not supported. Images longer than 2,600 pixels on a side are scaled down before reading; files above 20 MB are refused for free. Reading order is top to bottom, then left to right, which can interleave columns in multi-column layouts.

### Input fields

| Field | Type | Required or default | What it does |
|---|---|---|---|
| `urls` | list of text | required | One URL per row, up to 200: PNG, JPEG, WebP, GIF, BMP, TIFF, or a scanned PDF (up to 50 pages; each page counts as one image read per started 20 lines, at least one). |
| `minConfidence` | text | 0.5 | Lines below this OCR confidence (0 to 1) are dropped; 0.5 keeps almost everything, 0.8 only clean text. |

### Input example

```json
{
    "urls": [
        "https://raw.githubusercontent.com/madmaze/pytesseract/master/tests/data/test.png"
    ],
    "minConfidence": "0.5"
}
```

### Output example

| Field | Type | What it holds | Example |
|---|---|---|---|
| `url` | text | The page or file this row is about. | `https://raw.githubusercontent.com/madmaze/pytesseract/mas...` |
| `text` | text | All text found in the image, in reading order. | `This is a lot of 12 point text to test the ocr code and s...` |
| `lines` | list | The same text split into lines, each with its own reading. | `["This is a lot of 12 point text to test the", "ocr code...` |
| `lineCount` | number | How many lines of text were found. | `8` |
| `avgConfidence` | number | How sure the reader is on average, from 0 to 1; below roughly 0.6 the reading deserves a check. | `0.984` |
| `boxes` | list | The place of every line in the image, as coordinates, so you can point back to where it stood. | `["36,90,546,30 0.967", "34,123,584,33 0.994"]` |
| `width` | number | The width of the image in pixels. | `640` |
| `height` | number | The height of the image in pixels. | `480` |
| `format` | text | The image format, for example png or jpeg. | `PNG` |
| `fileBytes` | number | The size of the file in bytes. | `11513` |
| `processedMs` | number | How long the reading took, in milliseconds. | `3752` |
| `pageCount` | number |  |  |
| `chargedReads` | number |  |  |
| `pages` | list |  |  |

Error codes: `INVALID_URL`, `ROBOTS_DISALLOWED`, `NOT_AN_IMAGE`, `TOO_LARGE`, `TOO_SLOW` (download not finished within 20 s), `NO_TEXT`, `FETCH_FAILED`, `BLOCKED`.

One delivered row looks like this:

```json
{
  "url": "https://raw.githubusercontent.com/madmaze/pytesseract/master/tests/data/test.png",
  "text": "This is a lot of 12 point text to test the\nocr code and see if it works on all types\nof file format.\nThe quick brown dog jumped over the\nlazy fox. The quick bro...",
  "lines": [
    "This is a lot of 12 point text to test the",
    "ocr code and see if it works on all types",
    "of file format.",
    "The quick brown dog jumped over the",
    "lazy fox. The quick brown dog jumped",
    "over the lazy fox. The quick brown dog",
    "jumped over the lazy fox. The quick",
    "brown dog jumped over the lazy fox."
  ],
  "lineCount": 8,
  "avgConfidence": 0.984,
  "boxes": [
    "36,90,546,30 0.967",
    "34,123,584,33 0.994",
    "37,160,189,26 0.972",
    "34,190,553,36 0.999",
    "33,225,555,34 0.981",
    "34,260,565,33 0.984",
    "41,293,523,34 0.992",
    "35,329,528,32 0.986"
  ],
  "width": 640,
  "height": 480,
  "format": "PNG",
  "fileBytes": 11513,
  "processedMs": 4251,
  "status": "ok"
}
```

### Related actors from steadydata

- [pdf-text-extractor](https://apify.com/steadydata/pdf-text-extractor): the same for PDF files with a text layer
- [webpage-to-markdown](https://apify.com/steadydata/webpage-to-markdown): the text of web pages without OCR
- [google-images](https://apify.com/steadydata/google-images): find the images to read

### Pricing

Pay per event: one `image-read` event per delivered result. No charge for inputs
that fail, no separate platform-usage surcharge.

**From 3 November 2026** two small events are added: `image-checked` ($0.001) for every image
that was downloaded and read to the end, also when it holds no readable text, and Apify's
`apify-actor-start` ($0.0005 per GB, so $0.001 per run at the fixed 2 GB). Images that cannot be
downloaded, are blocked, too large or too slow stay free. `image-read` stays as it is.

**Free Apify plan:** this actor delivers up to 25 rows per run for accounts on the Apify free
plan, and then stops with a message. That limit is set by us, not by Apify. It exists so the
actor keeps paying for itself for the people who do pay. Any paid Apify plan runs it at full
size, billed per delivered row, with failed rows never charged.

**Reviews:** if this actor saves you time, a short review on this page is the one thing that
helps most. Ratings are what other buyers look at first, and we have no other way to ask.

### Use with AI agents

AI assistants such as Claude, ChatGPT or Cursor can run this actor through Apify's own MCP server. Ask for the actor `steadydata/image-ocr-text` by its full name, so the assistant does not pick a different one, and start from this minimal input:

```json
{
  "urls": [
    "https://raw.githubusercontent.com/madmaze/pytesseract/master/tests/data/test.png",
    "https://raw.githubusercontent.com/madmaze/pytesseract/master/tests/data/test-european.jpg",
    "https://raw.githubusercontent.com/madmaze/pytesseract/master/tests/data/test.jpg"
  ]
}
```

The assistant can read the price per event from the Pricing section above before the first paid run. Failed input comes back as an error row, as described above.

### FAQ

**Does it read receipts and invoices?** Yes, printed ones read well; use the boxes to keep amounts next to their labels.

**Can I OCR a PDF?** Yes, a scanned PDF by URL works like an image: every page is rendered and read (at most 50 pages per file), and the file comes back as one row with `pages` (text per page) and `pageCount`. Each page is charged as one `image-read` per started 20 lines of text, at least one per page (a page of 18 lines is one, a dense page of 70 lines is four), because reading time grows with the number of lines; `chargedReads` on the row shows the count. If the first two pages hold no readable text, reading stops there and the file is reported as `NO_TEXT`. A PDF that already has a text layer is cheaper and exact with the PDF Text Extractor below.

**Which languages?** Latin-script languages (English, Dutch, German, French, Spanish and so on) and Chinese. Cyrillic, Arabic and Asian scripts other than Chinese are not supported.

**Is my image sent to a third party?** No. The OCR runs inside the actor; nothing leaves Apify.

**Do I pay for an image without text?** Until 2 November 2026, no. From 3 November 2026 an image that was read to the end without readable text costs $0.001 (`image-checked`); reading it uses the same computing time as an image with text.

**Is personal data collected?**
Only what is in the images you send: the actor returns the text it reads in them and keeps nothing after the run. Send only images you are allowed to process.

**What do the fields mean?**
`boxes` entries read `x,y,width,height confidence` in pixels of the original image; `avgConfidence` is the mean over the delivered lines; `processedMs` is the OCR time only.

**What happens when the source changes?**
Sources change from time to time; that is the nature of this work. The actor is
monitored daily and fixed fast, and while it is broken you are not charged, because
only delivered results cost anything.

# Changelog

This Actor's version history is a separate document: https://apify.com/steadydata/image-ocr-text/changelog.md

# Actor input Schema

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

One URL per row, up to 200: PNG, JPEG, WebP, GIF, BMP, TIFF, or a scanned PDF (up to 50 pages; each page counts as one image read per started 20 lines, at least one).

## `minConfidence` (type: `string`):

Lines below this OCR confidence (0 to 1) are dropped; 0.5 keeps almost everything, 0.8 only clean text.

## Actor input object example

```json
{
  "urls": [
    "https://raw.githubusercontent.com/madmaze/pytesseract/master/tests/data/test.png",
    "https://raw.githubusercontent.com/madmaze/pytesseract/master/tests/data/test-european.jpg",
    "https://raw.githubusercontent.com/madmaze/pytesseract/master/tests/data/test.jpg"
  ],
  "minConfidence": "0.5"
}
```

# 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://raw.githubusercontent.com/madmaze/pytesseract/master/tests/data/test.png",
        "https://raw.githubusercontent.com/madmaze/pytesseract/master/tests/data/test-european.jpg",
        "https://raw.githubusercontent.com/madmaze/pytesseract/master/tests/data/test.jpg"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("steadydata/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 = { "urls": [
        "https://raw.githubusercontent.com/madmaze/pytesseract/master/tests/data/test.png",
        "https://raw.githubusercontent.com/madmaze/pytesseract/master/tests/data/test-european.jpg",
        "https://raw.githubusercontent.com/madmaze/pytesseract/master/tests/data/test.jpg",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("steadydata/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 '{
  "urls": [
    "https://raw.githubusercontent.com/madmaze/pytesseract/master/tests/data/test.png",
    "https://raw.githubusercontent.com/madmaze/pytesseract/master/tests/data/test-european.jpg",
    "https://raw.githubusercontent.com/madmaze/pytesseract/master/tests/data/test.jpg"
  ]
}' |
apify call steadydata/image-ocr-text --silent --output-dataset

```

## MCP server setup

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