Image to Text OCR - Extract Text from Images & PDFs avatar

Image to Text OCR - Extract Text from Images & PDFs

Pricing

from $5.00 / 1,000 image ocrs

Go to Apify Store
Image to Text OCR - Extract Text from Images & PDFs

Image to Text OCR - Extract Text from Images & PDFs

Extract text from images, screenshots and scanned PDFs with OCR in 100+ languages. Returns plain text, Markdown, word confidence and bounding boxes per image or page. Bulk input from URLs, datasets or CSV. Failed downloads are not charged.

Pricing

from $5.00 / 1,000 image ocrs

Rating

0.0

(0)

Developer

Rosario Vitale

Rosario Vitale

Maintained by Community

Actor stats

0

Bookmarked

182

Total users

91

Monthly active users

10 days ago

Last modified

Share

Why use this Actor?

Extract text from images, screenshots and scanned PDFs with OCR in 100+ languages. Returns plain text, Markdown, word confidence and bounding boxes per image or page. Bulk input from URLs, datasets or CSV. Failed downloads are not charged.

Features

  • Image URLs — Direct HTTP/HTTPS image URLs to process. Can be combined with documentUrls.
  • Languages — OCR languages. Use Tesseract codes such as eng, ita, deu, fra, spa or chi_sim; common forms like en, it, English or eng+ita are converted automatically. Unknown values are skipped with a warning instead of failing the run. Up to 8 languages.
  • Preprocessing — Image preprocessing strategy before OCR.
  • Page segmentation — Tesseract page-layout assumption.
  • Include word-level data — Add per-word confidence and bounding boxes. Same as Layout detail = "Words with boxes".
  • Layout detail — Adds the layout to each result: lines, paragraphs or words, each with text, confidence, a pixel box (bbox) and a 0–1 box (bboxNorm) that does not depend on image size. Useful for tables, forms and highlighting. "Include word-level data" still works and equals "Words with boxes".
  • Max image size (MB) — Reject images larger than this limit to prevent runaway memory use.
  • Download timeout (seconds) — Maximum time allowed for each image download.
  • Download retries — Retry transient download failures with exponential backoff.
  • Image or scanned PDF URLs — Public HTTP/HTTPS image or PDF URLs. PDFs are rasterized page by page before OCR.
  • Images or PDFs as base64 — For files that are not online: base64 strings or data URIs (data:image/png;base64,...), one per file, up to 100. Size limits are the same as for URLs. Results have sourceType "base64" and sourceKey "base64:1", "base64:2"…
  • Include Markdown — Add Markdown text; PDF pages are labeled with page headings.

Use cases

  • Scanned document ocr.
  • Screenshot text extraction.
  • Pdf digitization.
  • Searchable text and rag preparation.

Example input

{
"languages": [
"eng"
],
"preprocessMode": "auto",
"segmentationMode": "auto",
"includeWords": false,
"outputDetail": "text",
"maxImageSizeMb": 20
}

Pricing & cost control

The primary event costs $0.005000 per image ocr (about $5.00 per 1,000 successful primary events). Only successful primary events are intentionally billed by this Actor; summary/status rows add context without adding primary-event charges.

Use the bounded input limits and filters to keep both event charges and platform usage predictable.

FAQ

What is this Actor for?
It is designed for scanned document OCR, screenshot text extraction, PDF digitization.

Can I run it on a schedule?
Yes. You can schedule Actor runs on Apify and send the resulting dataset into automations, webhooks, storage, or downstream APIs.

How do I control cost and run size?
Use the input limits and filters shown in the Actor input form. The Actor applies bounded defaults and hard caps so large jobs remain predictable.

Pricing at a glance

Price per 1,000 OCR'd images or PDF pages
This Actor$5.00
Median of 8 comparable Apify Store Actors (October 2026)$6.50

That is about 23% below the median per-result price for this task in Apify Store.

From 16 October 2026, Apify platform usage (compute, storage, data transfer) is included — you pay only the result price plus a small run start fee per GB of run memory (exact live amounts on the Pricing tab). No surprise compute bill, even on long runs.

Use the run's maximum charge setting to cap spending — the Actor stops cleanly when the limit is reached.

Use it from AI agents (MCP) and code

AI agents — Claude, ChatGPT, Cursor, VS Code, n8n AI agents and any MCP client can run this Actor through the official Apify MCP server: add https://mcp.apify.com?tools=zenomastro/image-ocr-text-extractor to your client. Then just ask, for example:

"Extract the text from these scanned invoices (Italian and English) and flag low-confidence pages."

The agent fills the input from the field descriptions and receives clean JSON it can reason over.

API — one HTTP call runs the Actor and returns the results directly:

curl -X POST "https://api.apify.com/v2/acts/zenomastro~image-ocr-text-extractor/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"imageUrls": ["https://tesseract.projectnaptha.com/img/eng_bw.png"], "languages": ["eng"], "includeWords": false, "includeMarkdown": true, "retries": 1}'

The same works from the Apify Python/JavaScript clients, Make, n8n, Zapier, LangChain and LlamaIndex integrations, or on a schedule.

Extract text from images, screenshots, scans, receipts, labels, forms, and photos with a robust OCR pipeline built for Apify.

This Actor uses Tesseract OCR plus optional image preprocessing, automatic orientation handling, bounded retries, download timeouts, input limits, confidence scores, and optional word-level bounding boxes. It is designed for production workflows where predictable failures and structured output matter as much as raw OCR accuracy.

Why use this Image OCR Actor?

  • Reliable downloads with retry and timeout controls.
  • Automatic preprocessing for contrast, grayscale normalization, and sharpening.
  • Orientation recovery for suspicious portrait/rotated images.
  • 100+ Tesseract languages and multilingual combinations. Codes like en, it or names like English are converted automatically, and an unknown language never fails the run.
  • Batch processing of up to 1,000 direct URLs per run, or up to 5,000 from CSV/JSON manifests, public Google Sheets or an Apify Dataset. Larger lists are trimmed and reported, never a failed run.
  • Scanned PDF OCR page by page at the same per-page price as images, with a document summary and low-confidence page list.
  • PDF tables and metadata (optional, no extra charge): rows of cells from digital PDFs and the document's title, author, dates and page size.
  • All common image formats: PNG, JPEG, WebP, GIF, TIFF, BMP, SVG and iPhone HEIC/HEIF photos (converted automatically).
  • Word-level output with confidence and bounding boxes when requested.
  • Cost protection through image-size and input-count limits.
  • Structured JSON output ready for APIs, RAG pipelines, search, spreadsheets, and automation.

How to use it

  1. Add direct HTTP/HTTPS image URLs (imageUrls) and/or scanned PDF URLs (documentUrls), or point the Actor at a CSV/JSON/Google Sheets list (sourceListUrls) or an Apify Dataset (inputDatasetId).
  2. Select the OCR languages, for example eng, ita, or eng+ita (en, it, English also work).
  3. Keep Auto preprocessing for most photos and screenshots.
  4. Optionally enable word-level data when you need positions or per-word confidence.
  5. Run the Actor and download the Dataset as JSON, CSV, Excel, or another supported format.

Input

Main fields:

  • imageUrls — direct HTTP/HTTPS image URLs.
  • documentUrls — image or scanned PDF URLs; PDFs are rasterized page by page (maxPdfPages, pdfDpi).
  • sourceListUrls — CSV, JSON, plain-text or public Google Sheets lists of URLs.
  • inputDatasetId / datasetUrlField — read URLs from another Actor's Dataset.
  • languages — Tesseract language codes (ISO codes and language names are converted).
  • preprocessMode — auto, none, grayscale, or threshold.
  • segmentationMode — automatic layout, single text block, or sparse text.
  • includeWords — adds per-word confidence and bounding boxes.
  • maxImageSizeMb — rejects oversized images before they consume excessive memory.
  • requestTimeoutSecs — maximum download time per image.
  • retries — bounded retries with exponential backoff.
  • extractTables — PDF tables as rows of cells, for pages read from the PDF's text layer (off by default).
  • extractMetadata — PDF title, author, dates, page size and more on the document summary (off by default).

Example:

{
"imageUrls": ["https://example.com/document.png"],
"languages": ["eng"],
"preprocessMode": "auto",
"includeWords": true,
"requestTimeoutSecs": 30,
"retries": 2
}

Output

Each image produces one Dataset item (recordType: "ocr"). Each PDF produces one ocr item per page plus one document_summary item with the combined Markdown, average confidence and the list of low-confidence pages. Anything that could not be processed is returned as a recordType: "error" item with a readable message, and the run keeps going:

{
"url": "https://example.com/document.png",
"success": true,
"language": "eng",
"confidence": 94.2,
"text": "Recognized text...",
"wordCount": 42,
"characterCount": 256,
"processingMs": 830,
"image": { "width": 1600, "height": 900, "format": "png" }
}

When includeWords=true, the result also contains individual words with confidence and bounding boxes.

Output fields

FieldDescription
recordTypeocr, document_summary or error
urlOriginal image URL
successWhether OCR completed successfully
languageOCR language combination
confidenceOverall Tesseract confidence
textRecognized text
wordCountNumber of recognized words
characterCountNumber of output characters
pageNumber / pageCountPDF page position (null for single images)
lowConfidencetrue when confidence is below minConfidence
processingMsProcessing time for the image
imageSource width, height, and detected format
wordsOptional per-word confidence and bounding boxes
tablesWith extractTables: rows of cells of a PDF page read from its text layer
tablesErrorWhy tables is missing on a page (its text is still complete)
metadataWith extractMetadata: PDF metadata, on the document_summary row
errorClean error message when processing fails

PDF tables and metadata

Two optional switches for PDFs. Both are off by default and add no charge: tables go into the page rows you already get, metadata into the free document_summary row.

Extract tables (extractTables: true). Pages read from the PDF's own text layer (textSource: "text_layer", typical for digital PDFs) also get tables: the page's rows from top to bottom, each split into cells by the position of the text. A row with a single cell is a plain line of text. With Include Markdown on, a page that has a table gets an ### Extracted table section in its Markdown and in the document summary. Detection is position-based, the same method as PDF to Structured Data: very good for clean, grid-like tables, approximate for complex layouts. Scanned pages read with OCR get no tables (use Layout detail for their line or word boxes). If a page's layout cannot be read, the page keeps its full text and gets a short tablesError note instead.

{
"recordType": "ocr",
"pageNumber": 1,
"textSource": "text_layer",
"text": "Product Units Price\nWidget A 120 9.99",
"tables": [["Product", "Units", "Price"], ["Widget A", "120", "9.99"]],
"markdown": "## Page 1\n\n...\n\n### Extracted table\n\n| Product | Units | Price |\n| --- | --- | --- |\n| Widget A | 120 | 9.99 |"
}

Include PDF metadata (extractMetadata: true). The PDF's document_summary row gets metadata:

"metadata": {
"title": "Price list 2026",
"author": "Jane Doe",
"subject": null,
"keywords": "prices, catalog",
"creator": "Microsoft Word",
"producer": "Microsoft: Print To PDF",
"creationDate": "2026-03-02T09:15:00Z",
"modDate": "2026-03-02T09:15:00Z",
"pageCount": 4,
"encrypted": false,
"pageSize": { "width": 595.276, "height": 841.89, "unit": "pt", "name": "A4" },
"pdfVersion": "1.7"
}

Dates are converted to ISO 8601 (UTC) when the PDF's date can be read; otherwise the PDF's own text is kept. Fields the PDF does not have are null. pageSize is the size of the first page, in points.

Moving from PDF to Structured Data?

Your input works here unchanged: just change the Actor name. pdfUrls, maxPages (0 = all pages, up to 100 per PDF), maxPdfSizeMb, extractTables, extractMetadata, includeMarkdown, requestTimeoutSecs and retries are all accepted. What is different: results come as one row per page plus one document_summary row per PDF (with the combined Markdown and the metadata) instead of one row per PDF; metadata is added only with extractMetadata: true (it was on by default there); without maxPages, up to 25 pages per PDF are read; scanned pages are read with OCR instead of coming back empty; and each page is billed as one OCR result.

Pricing and cost control

The Actor uses pay-per-event pricing and charges only for successfully processed images. Failed downloads or OCR attempts are returned with success: false and are not intentionally billed as successful OCR events.

To keep runs predictable, the Actor limits the number of images per run, rejects excessively large inputs, uses bounded retries, and resizes extremely large images before OCR.

Accuracy tips

Use auto preprocessing first. For already-clean screenshots, none can preserve the original pixels. For difficult high-contrast scans, try threshold. If the image contains scattered labels rather than paragraphs, use sparse_text segmentation.

OCR accuracy depends on resolution, compression, lighting, blur, font style, and language selection. No OCR engine can guarantee perfect recognition on every image, so use confidence scores when downstream decisions are sensitive.

FAQ and support

Which languages can I use? Any Tesseract language (eng, ita, deu, fra, spa, por, chi_sim, jpn, ara, …), up to 8 per run. Two-letter codes (en, de), locale tags (zh-TW, pt-BR) and English names (Italian) are converted for you; unknown values are skipped with a warning and the run falls back to English instead of failing.

What happens when a URL is broken, private or too large? That item is returned with recordType: "error" and a clear message, it is not billed as an OCR result, and the rest of the batch continues. An unreachable manifest or an empty input also produces an error item instead of a failed run.

Does it work with scanned PDFs? Yes. Each page is rendered (default 160 DPI, up to 300) and OCR'd one page at a time, so long documents do not exhaust memory. Use maxPdfPages to cap cost per document.

How is it priced? One OCR event per image or per PDF page plus a small run start fee — from 16 October 2026 Apify platform usage is included, so there is no separate compute bill. You can cap spending with the run's maximum charge; the Actor stops cleanly when the limit is reached.

This Actor processes image URLs supplied by the user. Make sure you have the right to process the images and that your use complies with applicable laws and the source site's terms.

For reproducible bug reports, provide the run ID, input settings, and a non-sensitive sample image URL. Never include API tokens, passwords, or private credentials in issue reports.

Extended capabilities

  • OCR images, screenshots, scans, and PDFs with preprocessing, orientation recovery, confidence, words, bounding boxes, and Markdown.
  • Process PDFs page by page with explicit page metadata and bounded file/image sizes.
  • Accept direct URLs or read file URLs from an Apify Dataset field for native Actor-to-Actor pipelines.