# Image OCR Text Extractor: text from image URLs, per line (`steadydata/image-ocr-text`) Actor

Text extraction (OCR) 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.

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

## Pricing

from $1.40 / 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 OCR Text Extractor: text from image URLs, 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 a free error row, not an empty paid one.

### 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 4,000 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 example

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

### Output example

- `url`
- `text`
- `lines`
- `lineCount`
- `avgConfidence`
- `boxes`
- `width`
- `height`
- `format`
- `fileBytes`
- `processedMs`

Error codes: `INVALID_URL`, `ROBOTS_DISALLOWED`, `NOT_AN_IMAGE`, `TOO_LARGE`, `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.

**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.

### 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?** Not here; the PDF Text Extractor below reads PDFs with a text layer. A scanned PDF needs its pages exported as images first.

**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?** No. Only images delivered with text are charged.

**Is personal data collected?**
`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 or TIFF.

## `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"
  ],
  "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"
    ]
};

// 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"] }

# 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"
  ]
}' |
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/K0d5MQvsjMoFOdvY6/openapi.json
