# Image to Text OCR API

Image links in, text out. Each image comes back as plain text and markdown, read with Tesseract OCR. Works on PNG, JPG, WebP, GIF, BMP and multi-page TIFF: screenshots, receipts, scanned pages, photos of documents, slides. 8 languages. No LLM, no outside API.

- **Endpoint:** `POST https://api.apify.com/v2/acts/rentley~image-ocr/run-sync-get-dataset-items`
- **Auth:** `Authorization: Bearer <Apify API token>`
- **Price:** $0.50 per 1,000 images: $0.0005 per image that returned text ($0.0004375 Silver, $0.000375 Gold and up). Blank images and failed downloads are free. + $0.00005 per GB of run memory per run.
- **Good for:** reading text out of screenshots and receipts in an automation; making scanned images searchable; giving an AI agent the text inside an image link.
- **Store page:** https://apify.com/rentley/image-ocr
- **For PDFs:** use [PDF to Markdown & Text API](https://rentleyai.com/tools/pdf-tables.md).

## Call it

```bash
curl -s -X POST "https://api.apify.com/v2/acts/rentley~image-ocr/run-sync-get-dataset-items" \
  -H "Authorization: Bearer $APIFY_TOKEN" -H "Content-Type: application/json" \
  -d '{"images": [{"url": "https://api.apify.com/v2/key-value-stores/O6lBwMM6OaMDor2rM/records/ocr-test-receipt-png"}]}'
```

## Input

| Field | Type | Default | What it does |
|---|---|---|---|
| `images` | array of {url} | required | Public links to images, up to 30 MB each. |
| `languages` | array (eng, deu, fra, spa, por, ita, nld) | ["eng"] | OCR languages. Each extra one slows OCR. |
| `maxFramesPerImage` | integer | 10 | Frames read from a multi-page TIFF or animated GIF (1 to 50). Still one charge per image. |

## Output (one item per image)

`url`, `ok`, `format` (png, jpeg, webp...), `frames`, `language`, `wordCount`, `text`, `markdown`, `seconds`. Failed images: `{url, ok: false, error}`, free. A `SUMMARY` record counts images with text, blank images and failures.

## Accuracy

Clean screenshots and printed documents read well. Handwriting, text under about 10 px and steeply angled photos read worse; crop and straighten first.
