# Bulk OCR — Scanned PDF & Image to Text, 6 Languages (`kadro/bulk-ocr-image-pdf-to-text`) Actor

Extract text from image and scanned-PDF URLs with Tesseract OCR. 6 languages, per-page or per-file rows, confidence score. $1.50 per 1,000 pages.

- **URL**: https://apify.com/kadro/bulk-ocr-image-pdf-to-text.md
- **Developed by:** [Kadro Tools](https://apify.com/kadro) (community)
- **Categories:** AI, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.20 / 1,000 page ocr'ds

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

## Bulk OCR: Scanned PDFs and Images to Text in 6 Languages

Turn scanned PDFs and pictures of text into searchable plain text in bulk. Give it links, pick the language, and get the text with a word count and a confidence score per file or per page.

### What you get

| Field | Meaning |
|---|---|
| `url` | The file link you gave |
| `type` | `pdf` or `image` |
| `page` | Page number (only with `outputPerPage`) |
| `pages` | Pages with recognized text (per file), or total pages (per page rows) |
| `text` | The recognized text |
| `words` | Word count |
| `meanConfidence` | 0 to 100; below about 60 the text is probably unreliable |
| `error` | Reason when a file failed, otherwise `null` |

Example row:

```json
{"url": "https://example.com/scan.pdf", "type": "pdf", "pages": 2, "text": "VERFASSUNG DER VEREINIGTEN STAATEN VON AMERIKA\n17. September 1787\nPRÄAMBEL\n\nWir, das Volk ...", "words": 1216, "meanConfidence": 95.5, "error": null}
```

### How to use it in 3 steps

1. Paste links to images (JPEG, PNG, WebP, TIFF, BMP, GIF) or PDFs, up to 2,000 files and 50 MB each.
2. Choose the language (`eng`, `spa`, `fra`, `deu`, `ita`, `por`) and whether you want one row per page.
3. Run it and read the text and the confidence score from the dataset.

### Pricing

**$1.50 per 1,000 pages** ($0.0015 per page). Example: a 40-page scanned report = $0.06; 2,000 single-page scans = $3. You pay per page with recognized text. Blank pages, unreadable images and failed downloads are free.

### Integrations

- **Apify API and clients**: start the Actor from any language with the Apify API (or the JavaScript and Python clients) and read the dataset when the run ends.
- **Make, n8n and Zapier**: use the official Apify modules, pick `kadro/bulk-ocr-image-pdf-to-text`, pass the input as JSON and map the dataset rows to your next step.
- **Google Sheets**: send the dataset to a sheet with the Apify integration or export it as CSV or Excel from the Console.
- **MCP (Claude, Cursor and other AI agents)**: add the Apify MCP server `https://mcp.apify.com/?actors=kadro/bulk-ocr-image-pdf-to-text` and ask, for example: "Run OCR in Spanish on these 15 scanned invoices (as PDF links) and return the text per page."

### FAQ

**Does it work on PDFs that already contain text?**
Yes, every page is rendered as an image and read, but for text PDFs the cheaper and more exact way is our PDF Text Extractor.

**Can I mix languages?**
Through the API you can set a combination such as `eng+spa`. In the Console form, pick the main language.

**Does it read handwriting or tables?**
Not well. Handwriting, tiny, curved or low-contrast text give poor results (check `meanConfidence`). Tables are not rebuilt: layout is reduced to lines and paragraphs.

**Is it private?**
Files are fetched from the public links you give and processed in the run; nothing is shared. Make sure you have the right to process the documents.

### Limitations

- OCR quality depends on the scan: clean printed text at 200+ DPI works well.
- Only the first 50 pages of each file are read. Password-protected PDFs are not supported.
- Output is plain text: no Markdown, no table reconstruction.
- Only public http(s) links are fetched; internal or private addresses are blocked.

### Other Kadro tools

- [PDF Text Extractor](https://apify.com/kadro/pdf-text-extractor-api)
- [Bulk Image Converter & Resizer](https://apify.com/kadro/bulk-image-converter-resizer)
- [AI Image Upscaler](https://apify.com/kadro/ai-image-upscaler-esrgan)
- [Article Text Extractor](https://apify.com/kadro/article-text-extractor)

### Credits and license

Text recognition uses [Tesseract OCR](https://github.com/tesseract-ocr/tesseract) and its language data (Apache License 2.0). PDF pages are rendered with [pypdfium2](https://github.com/pypdfium2-team/pypdfium2) (Apache-2.0 / BSD-3-Clause) and images handled with Pillow (HPND). This Actor is not affiliated with Google or the Tesseract project.

Found it useful? Please leave a review ⭐ — it helps a lot. Bugs or feature ideas: open an issue, I answer within 24 h.

# Actor input Schema

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

Direct links to images (JPEG, PNG, WebP, TIFF, BMP, GIF) or PDFs (scanned or not). Max 2,000 files, up to 50 MB each.

## `language` (type: `string`):

Language of the text in the files. For mixed text, set the main language (or use the API with e.g. 'eng+spa').

## `outputPerPage` (type: `boolean`):

Off: one row per file with all pages joined. On: one row per page (useful for long PDFs).

## `maxPages` (type: `integer`):

Only the first N pages of each PDF or multi-page TIFF are read (hard limit 50).

## `dpi` (type: `integer`):

Resolution used to turn PDF pages into images. 200 is fine for normal print; use 300 for small text.

## Actor input object example

```json
{
  "urls": [
    "https://tesseract.projectnaptha.com/img/eng_bw.png"
  ],
  "language": "eng",
  "outputPerPage": false,
  "maxPages": 50,
  "dpi": 200
}
```

# Actor output Schema

## `results` (type: `string`):

One row per result.

# 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("kadro/bulk-ocr-image-pdf-to-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://tesseract.projectnaptha.com/img/eng_bw.png"] }

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,kadro/bulk-ocr-image-pdf-to-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/FwXOkYBB0IeB9mcYP/builds/2ySZdEgMuBrovUjlj/openapi.json
