Image to Text OCR: Images & Scanned PDFs to Text (Tesseract) avatar

Image to Text OCR: Images & Scanned PDFs to Text (Tesseract)

Pricing

Pay per event

Go to Apify Store
Image to Text OCR: Images & Scanned PDFs to Text (Tesseract)

Image to Text OCR: Images & Scanned PDFs to Text (Tesseract)

OCR text from images, screenshots and scanned PDFs by URL or from a dataset: full text, lines and words with confidence and position, 17 built-in languages plus 100+ on demand. Blank pages and failed files are free. $1.50 per 1,000 pages.

Pricing

Pay per event

Rating

0.0

(0)

Developer

A Q

A Q

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Security

Limited permissions

Share

Extract text from images, screenshots, photos and scanned PDFs by URL, in bulk, with no API key and no outside service. The open-source Tesseract 5 OCR engine runs inside the Actor, so your files are never sent to Google, Microsoft or an AI API.

  • Images: PNG, JPG/JPEG, WebP, GIF, TIFF, BMP, AVIF and SVG, auto-rotated by EXIF, upscaled when small, contrast-normalised
  • Scanned PDFs: every page rendered and OCR'd, one row per page. In Auto mode pages that already have a text layer are copied exactly from the PDF instead (more accurate and 15x cheaper), so mixed PDFs just work
  • Full text with paragraphs and line breaks preserved, plus lines with confidence and bounding boxes (x, y, width, height in pixels) and optional word-level boxes
  • Confidence score per page, line and word, and a minimum confidence filter to drop noise from photos
  • 17 built-in languages (English, German, French, Spanish, Italian, Portuguese, Dutch, Polish, Russian, Ukrainian, Turkish, Arabic, Hindi, Chinese Simplified, Japanese, Korean, Vietnamese) and 100+ more on demand (Czech, Swedish, Hebrew, Thai, Greek, Chinese Traditional...), combinable for mixed documents
  • Layout modes: automatic, single column (receipts, lists), single block, sparse text (screenshots, signs, product labels), single line
  • Bulk input from a dataset: point it at the output of any other scraper (product images, document links) and every URL is OCR'd, with the original item kept in sourceItem
  • Blank images and failed downloads are free, and every failure is listed with its reason

Pricing: $1.50 per 1,000 pages

This ActorOther Tesseract OCR Actors on Apify
Image or scanned PDF page with text$0.0015 ($1.50 per 1,000)$0.002 to $0.005 per image
Digital PDF page (text layer, Auto mode)$0.0001 ($0.10 per 1,000)charged as a full OCR page
Images with no text, failed URLsfreeoften charged
Actor start$0.0005 per GB of memoryup to $0.005 per run

1,000 screenshots cost $1.50. A 20-page scanned contract costs $0.03. Set Max files and your Apify maximum cost per run to cap spending; the run stops cleanly at the limit.

Use cases

  • Document digitisation: scanned contracts, invoices, letters, archives, old reports and forms to searchable text
  • AI and RAG pipelines: make scanned PDFs and images readable for ChatGPT, Claude, LangChain or a vector database
  • E-commerce: read text on product images, labels, packaging and banners scraped by other Actors (use the dataset input)
  • Screenshot to text: UI text, error messages, charts, slides, social cards and memes
  • Compliance and monitoring: detect phrases in ad creatives, banners and screenshots; keep word boxes as evidence
  • Research: OCR historical documents and public records in many languages

Input

FieldWhat it does
urlsImage or PDF links. Empty = demo on two Tesseract test images
datasetId + urlFieldRead URLs from an Apify dataset (dotted paths like images.0 work; arrays of URLs are expanded)
languagesTesseract codes, e.g. ["eng"], ["eng","deu"], ["chi_sim"]
pdfModeauto (text layer when present, OCR otherwise) or ocr (OCR every page)
maxPdfPages, dpiPages per PDF (default 100) and render resolution for scanned pages (default 200, 300 for small print)
pageSegmentationLayout mode: 3 automatic, 4 single column, 6 single block, 11 sparse text, 7 single line
includeLines, includeWordsAdd line and/or word arrays with confidence and bounding boxes
minConfidenceDrop words below this confidence (0-99)
enhanceGrayscale, upscale and normalise images before OCR (on by default)
maxFiles, maxFileSizeMb, proxyConfigurationLimits and optional proxy

Example:

{
"urls": ["https://www.irs.gov/pub/irs-prior/f1040--1913.pdf", "https://raw.githubusercontent.com/tesseract-ocr/tessdoc/main/images/eurotext.png"],
"languages": ["eng", "deu", "fra"],
"pdfMode": "ocr",
"maxPdfPages": 1
}

Output

One row per image or PDF page:

{
"url": "https://raw.githubusercontent.com/tesseract-ocr/test/master/testing/phototest.tif",
"type": "image",
"page": 1,
"pages": 1,
"width": 640,
"height": 480,
"format": "tiff",
"method": "ocr",
"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.\n\nThe quick brown dog jumped over the\nlazy fox. ...",
"confidence": 95.3,
"wordCount": 60,
"lineCount": 10,
"languages": ["eng"],
"lines": [{ "text": "This is a lot of 12 point text to test the", "confidence": 95.9, "bbox": { "x": 36, "y": 92, "width": 544, "height": 30 } }],
"durationMs": 1033,
"error": null
}
  • method is ocr or text-layer (digital PDF page read directly; confidence 100)
  • Failed files get a row with error (for example HTTP 404, Not an image or PDF, PDF is password-protected) and are not charged
  • The SUMMARY record in the key-value store has counts of images, PDFs, OCR pages, text-layer pages, blank pages and failures

Tips

  • Use only the languages you need: each extra language slows OCR and can lower accuracy.
  • For screenshots and photos with scattered text, try layout mode Sparse text and Minimum word confidence 50.
  • For small print in scans, set DPI to 300.
  • Speed: about 1-3 seconds per image and 3-10 seconds per dense A4 page at the default 2 GB. More memory = more parallel OCR workers.
  • Need text from digital PDFs only (Markdown, chunks, metadata)? Use our PDF Text Extractor at $1 per 1,000 PDFs.

FAQ

Is OCR done by an external API? No. Tesseract runs inside the Actor container, so files stay on Apify and there are no third-party API costs or keys.

Does it read handwriting? Tesseract is built for printed text. Neat block handwriting sometimes works; cursive usually does not.

Can I OCR files that are not on the web? Upload them to an Apify key-value store or any storage with a public link, then pass the URLs.

Is it legal? The Actor only processes files whose URLs you supply. Make sure you have the right to process them.

Integrations: use it from the Apify API, Python and JavaScript clients, Make, Zapier, n8n, LangChain, or as an MCP tool for AI agents.