Google Lens OCR — Image to Text API avatar

Google Lens OCR — Image to Text API

Pricing

Pay per event

Go to Apify Store
Google Lens OCR — Image to Text API

Google Lens OCR — Image to Text API

Pricing

Pay per event

Rating

0.0

(0)

Developer

SR

SR

Maintained by Community

Actor stats

0

Bookmarked

3

Total users

2

Monthly active users

2 days ago

Last modified

Share

Google Lens OCR: Image to Text API

Extract text from an image with the same engine that powers Google Lens. This image to text API sends your images to the Google Lens crupload endpoint, reads the text back, and returns it as clean full text plus word-level bounding boxes. No browser, no OCR model to host, no GPU. Around two seconds per image.

Point it at a list of direct image URLs and get back the recognized text, paragraph structure, the detected language, and (optionally) a translation of the whole thing. It handles photos of signs, receipts, screenshots, scanned pages, handwriting, and product labels, the messy real-world images that trip up classic OCR libraries.

If you have ever wanted an image to text API that just works without wiring up a cloud vision account, this is it.

What you get

  • Full recognized text for every image, one paragraph per line, ready to index or search.
  • Paragraph blocks with their child lines and normalized geometry, so you can rebuild the layout of a document.
  • Word-level bounding boxes with pixel-normalized coordinates: center_x, center_y, width, height, and angle_deg for rotated text. Coordinates run 0 to 1 so they work at any image size.
  • Detected language so you know what the engine actually read.
  • Optional translation of the recognized text to any two-letter language code, in the same run, no second API call.
  • Word count, image dimensions, and timing on every row for quick QA and cost tracking.

Why use Google Lens OCR

Classic OCR engines like Tesseract were built for clean, high-contrast scans. Point them at a phone photo of a crumpled receipt, a street sign at an angle, or a handwritten note, and accuracy falls off a cliff. Google Lens was trained on exactly those images. It copes with skew, glare, low light, mixed fonts, and background clutter because that is the input it was designed for.

Lens also reads scripts that give lighter-weight engines trouble, including CJK (Chinese, Japanese, Korean), Arabic, Cyrillic, and Devanagari, and it handles mixed-language images without you telling it which language to expect. The ocr_language hint is a nudge, not a hard switch, so you rarely have to get it exactly right.

The practical payoff is that you get Google-grade recognition without a Google Cloud account. There is no service enablement, no API key rotation, no billing project to set up, and no client library to pin. You pass image URLs in, you get structured text out, and you pay per image on Apify. For a lot of teams that removes a week of plumbing.

Input

FieldTypeRequiredDescription
image_urlsarray of stringsYesDirect URLs of images to OCR (JPG, PNG, WEBP, TIFF, GIF). One per line, up to 200 per run.
ocr_languagestringNoTwo-letter language hint for recognition (en, nl, de, fr, ja, zh). Lens auto-detects; this only nudges it. Defaults to en.
translate_tostringNoTranslate the recognized text to this two-letter code (for example en, nl). Leave empty for OCR only.
include_word_boxesbooleanNoEmit every word with its normalized geometry (center, size, rotation). Turn off for smaller output. Defaults to true.

Output

One dataset row per image. Here is a trimmed example showing the full text plus a single word with its geometry.

{
"image_url": "https://example.com/receipt.jpg",
"full_text": "COFFEE HOUSE\n123 Main Street\nTotal 12.40",
"paragraphs": [
{
"text": "COFFEE HOUSE",
"lines": [
{ "text": "COFFEE HOUSE", "center_x": 0.5, "center_y": 0.08, "width": 0.62, "height": 0.05, "angle_deg": 0.0 }
]
}
],
"words": [
{
"text": "COFFEE",
"center_x": 0.41,
"center_y": 0.08,
"width": 0.22,
"height": 0.05,
"angle_deg": 0.0
}
],
"word_count": 6,
"translated_text": "KOFFIEHUIS\n123 Main Street\nTotaal 12.40",
"translate_to": "nl",
"ocr_language": "en",
"image_width": 1080,
"image_height": 1920,
"processed_in_seconds": 1.9,
"fetched_in_seconds": 2.4
}

Every geometry value is normalized to the 0 to 1 range. To convert a word box back to pixels, multiply center_x and width by image_width, and center_y and height by image_height. angle_deg is the rotation of the box, useful for rebuilding tilted or vertical text.

Use cases

Document digitization. Feed scanned pages, PDFs exported as images, or archive photos and get searchable full text with paragraph structure preserved. The line-level and paragraph-level geometry lets you reconstruct reading order and column layout instead of getting one flat blob of characters.

Receipt and invoice extraction. Point it at photos of receipts and invoices to pull line items, totals, dates, and vendor names. Because you get per-word bounding boxes, you can build downstream logic that reads the amount to the right of the word "Total" or groups words that sit on the same line, the spatial layer classic OCR text dumps throw away.

Accessibility. Generate alt text and read-aloud content from images that ship with no text alternative, including infographics, memes, screenshots, and photos of printed material. The detected language field lets you route each result to the right text-to-speech voice.

Translation workflows. Set translate_to and get the recognized text and its translation back in a single run. That covers localizing screenshots, reading foreign menus and signs, or building a "photo of text in, translated text out" pipeline without stitching an OCR service and a translation service together yourself.

How it compares

This actorzen-studio/google-lens-ocrborderline/google-lens (OCR mode)Google Cloud Vision OCR
Price per 1,000 images$3.99$4.99$2.50$1.50
Actor-start fee$0.002 / run$0.002 / run$0.01 / runn/a
Per-item feenone$0.00001 / itemnonen/a
Word-level boxesYesYesPartialYes
Optional translationYes, same runNoNoNo
Needs a cloud accountNoNoNoYes (GCP + billing)

We undercut the closest named competitor, zen-studio, by 20 percent while keeping the same low $0.002 per-run start fee and dropping the per-item fee entirely.

Being honest about the anchor: Google Cloud Vision is cheaper per image at $1.50 per 1,000. If you already run a Google Cloud project with billing enabled and Vision API turned on, Google's own API is the lower unit cost. The reason to choose this actor is everything around the price. There is no GCP account to create, no API key to manage, no billing setup, and no client library. You also get word-level bounding boxes and optional translation in one call, on Apify's pay-as-you-go billing you already have. For occasional or bursty workloads, the setup you skip is usually worth more than the cents you save.

Pricing

Pay-per-event, billed through Apify:

  • $0.00399 per image processed (the image_ocr event), which is $3.99 per 1,000 images.
  • $0.002 per run actor-start fee.

A run over 500 images costs roughly $2.00 plus the $0.002 start fee. You only pay for images the actor actually processes. No monthly minimum, no subscription.

Limits and gotchas

  • Direct image URLs only. Each entry in image_urls must resolve straight to the image bytes. Links to a gallery page, a viewer, or an HTML wrapper will not work. If your images sit behind a page, extract the real image URL first.
  • Images are downloaded with a browser user agent. Hosts that block hotlinking, require a login, or sit behind an aggressive WAF may refuse the fetch. Publicly reachable URLs work best.
  • Geometry is normalized 0 to 1. Every center_x, center_y, width, and height is a fraction of the image size, not a pixel count. Multiply by image_width and image_height to get pixels.
  • Free-tier runs are capped at 10 images per run. Upgrade to any paid Apify plan to lift the cap and process the full list.
  • The ocr_language hint is a nudge, not a filter. Lens auto-detects language. Setting the hint wrong rarely breaks recognition, but it will not force the engine to read text that is not there.
  • Translation quality follows Google's own translation. Short fragments, brand names, and heavy jargon translate less reliably than full sentences.
  • Very large or very low-resolution images can hurt accuracy. Extremely tiny text or heavily compressed photos give the engine less to work with. Reasonable resolution helps.

FAQ

How do I extract text from an image without an API key? Paste your image URLs into the image_urls field and run the actor. There is no Google Cloud account, no API key, and no billing project to configure. You authenticate with your normal Apify account, and the recognized text comes back in the dataset. This is the fastest way to get an image to text API running without cloud plumbing.

Does it return bounding boxes? Yes. With include_word_boxes on (the default), every recognized word comes back with center_x, center_y, width, height, and angle_deg. All values are normalized to the 0 to 1 range, so multiply by image_width and image_height to get pixel coordinates. Paragraphs and lines carry geometry too, which lets you rebuild the layout, not just the raw text.

Can it translate the text? Yes. Set translate_to to a two-letter language code such as en or nl, and the actor returns a translated_text field alongside the original recognized text in the same run. Leave translate_to empty if you only want OCR. You do not need a separate translation API.

What image formats and languages are supported? It reads JPG, PNG, WEBP, TIFF, and GIF. Because it uses the Google Lens engine, it handles a wide range of scripts including Latin, CJK (Chinese, Japanese, Korean), Cyrillic, Arabic, and Devanagari, and it copes with mixed-language images. The ocr_language hint is optional since Lens auto-detects.

Is it better than Tesseract or classic OCR for photos? For clean, high-contrast scans, classic OCR is fine. For real-world photos, receipts, signs, screenshots, angled or handwritten text, Google Lens is markedly more robust because it was trained on that kind of input. If your source images are messy, this actor will usually recover text that a traditional engine misses.

  • Google Lens - Reverse image search: find where an image appears online plus matching products.
  • Google AI Overview - Scrape Google AI Overview answers and the sources they cite.
  • Free Google Maps Scraper - Scrape Google Maps places: name, rating, phone, website, hours.