Google Lens OCR API — Image to Text avatar

Google Lens OCR API — Image to Text

Pricing

from $5.00 / 1,000 image ocrs

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

Google Lens OCR API — Image to Text

Extract text from public image URLs using the same Google Lens OCR engine Chromium uses. Returns full text, detected language, and line/word bounding boxes. Cookieless HTTP, no Google login, MCP-ready. Not visual search.

Pricing

from $5.00 / 1,000 image ocrs

Rating

0.0

(0)

Developer

Khadin Akbar

Khadin Akbar

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

6 days ago

Last modified

Share

Turn public image URLs into source-linked OCR dataset rows for automation engineers, RAG builders, and AI agents. Each result returns fullText, detected language, optional line/word boxes, and collection time from cookieless Google Lens OCR on Apify with Pay per event pricing and MCP-ready inputs.

Best paired with reverse visual search when you need lookalikes — use Google Lens Visual Search for matches, then this Actor when the next step is text extraction.

Best fit for this Actor

  • You need text from screenshots, signs, receipts, product labels, or scanned page images that are publicly reachable over HTTP(S).
  • You want batch URL OCR with predictable Pay per event billing and a stable OUTPUT.outcome for agents.
  • You need line-level geometry from Lens, with optional word-level layout hints for indexing or cropping.
  • For reverse image search and product lookalikes, start with Google Lens Visual Search, then pass selected image URLs here for OCR.

Support workflow: screenshot URL to searchable text

A support lead collects public screenshot URLs from a ticket thread. They run this Actor with outputDetail: "text_only". Each dataset row returns fullText and language. They push fullText into a search index and keep imageUrl plus scrapedAt as provenance. When one URL is missing in a mixed batch, the Actor finishes PARTIAL and successful rows stay billed once each.

Quick start input

{
"imageUrls": ["https://tesseract.projectnaptha.com/img/eng_bw.png"],
"outputDetail": "full",
"languageHint": "en",
"regionHint": "US",
"maxConcurrency": 2
}

Input reference

FieldTypeWhat it controls
imageUrlsarrayPublic HTTP(S) image URLs (JPEG/PNG/WebP/GIF/BMP/TIFF). Max 50. Private, localhost, and credentialed URLs are rejected.
outputDetailenumfull (default), lines, words, or text_only.
languageHintstringISO language nudge for Lens locale (default en).
regionHintstringTwo-letter region nudge (default US).
maxConcurrencyintegerParallel images, 1–5 (default 2).

What data you receive

One dataset item is one OCR'd image.

FieldDescriptionExample
imageUrlSource public image URLhttps://example.com/sign.png
fullTextRecognized text in reading orderOPEN DAILY
languageDetected language when Lens returns oneen
lines / wordsGeometry when outputDetail requests itline boxes from Lens
wordCount / lineCountSize metrics12 / 2
processedInSecondsPer-image wall time1.8
scrapedAtCollection timeISO timestamp
{
"imageUrl": "https://tesseract.projectnaptha.com/img/eng_bw.png",
"fullText": "Mild Splendour of the various-vested Night!\nMother of wildly-working visions! hail!",
"language": "en",
"wordCount": 12,
"lineCount": 2,
"outputDetail": "full",
"lines": [
{
"text": "Mild Splendour of the various-vested Night!",
"boundingBox": { "centerX": 0.44, "centerY": 0.10, "width": 0.85, "height": 0.11 }
}
],
"processedInSeconds": 1.8,
"scrapedAt": "2030-01-01T00:00:00.000Z"
}

Download the dataset as JSON, CSV, Excel, or HTML from the Apify Console Output tab.

Pricing

This Actor uses Pay per event plus Apify platform usage. The live Pricing tab is the current source of truth for billing details.

  • apify-actor-start: $0.00005
  • image-ocr: $0.005 per successfully OCR'd persisted image

Invalid input and total upstream failures leave image-ocr uncharged. Partial batches charge only the rows that persisted.

API example

curl "https://api.apify.com/v2/acts/khadinakbar~google-lens-ocr-api/runs?token=$APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"imageUrls": ["https://tesseract.projectnaptha.com/img/eng_bw.png"],
"outputDetail": "text_only"
}'
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('khadinakbar/google-lens-ocr-api').call({
imageUrls: ['https://tesseract.projectnaptha.com/img/eng_bw.png'],
outputDetail: 'text_only',
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.map((row) => row.fullText));

Agent / MCP prompt card

OCR these public image URLs with khadinakbar/google-lens-ocr-api (outputDetail: text_only). Return imageUrl, fullText, and language for each row. Read OUTPUT.outcome and charge only succeeded OCR rows.

Provenance: each row includes imageUrl and scrapedAt. Cost: $0.005 per OCR row plus start and platform usage. Scope: public image OCR — visual search and Cloud Vision BYOK stay on dedicated Actors.

Best results

  • Provide direct image URLs (.png / .jpg / .webp) rather than HTML gallery pages.
  • Start with sharp, upright text; handwriting and heavy skew can reduce recall.
  • Keep maxConcurrency at 1 when you need the most stable upstream path.
  • Line boxes come from Lens. Word boxes in full / words modes are character-proportional layout hints marked approximated: true.

Responsible use

Collect public images you are authorized to access and follow applicable laws and site terms. Google and Google Lens are trademarks of Google LLC. This independent Actor is not affiliated with, associated with, or endorsed by Google. Keep legal and medical ID OCR outside this workflow.

Builder's note

I built this as a lean URL-batch OCR Actor after I found that folding OCR into the visual-search sibling muddied billing and MCP routing. My goal is one public image in, one text row out, with Lens line geometry and explicit approximation labels when word boxes are derived.