Google Lens OCR API — Image to Text
Pricing
from $5.00 / 1,000 image ocrs
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
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
0
Monthly active users
6 days ago
Last modified
Categories
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.outcomefor 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
| Field | Type | What it controls |
|---|---|---|
imageUrls | array | Public HTTP(S) image URLs (JPEG/PNG/WebP/GIF/BMP/TIFF). Max 50. Private, localhost, and credentialed URLs are rejected. |
outputDetail | enum | full (default), lines, words, or text_only. |
languageHint | string | ISO language nudge for Lens locale (default en). |
regionHint | string | Two-letter region nudge (default US). |
maxConcurrency | integer | Parallel images, 1–5 (default 2). |
What data you receive
One dataset item is one OCR'd image.
| Field | Description | Example |
|---|---|---|
imageUrl | Source public image URL | https://example.com/sign.png |
fullText | Recognized text in reading order | OPEN DAILY |
language | Detected language when Lens returns one | en |
lines / words | Geometry when outputDetail requests it | line boxes from Lens |
wordCount / lineCount | Size metrics | 12 / 2 |
processedInSeconds | Per-image wall time | 1.8 |
scrapedAt | Collection time | ISO 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.00005image-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). ReturnimageUrl,fullText, andlanguagefor each row. ReadOUTPUT.outcomeand 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
maxConcurrencyat 1 when you need the most stable upstream path. - Line boxes come from Lens. Word boxes in
full/wordsmodes are character-proportional layout hints markedapproximated: 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.
Related Actors
- Google Lens Visual Search — reverse image matches before OCR
- AI Content Detector — classify pasted text after OCR
- Broken Link Checker — validate image URLs before OCR batches
- Email Address Validator — validate emails extracted from OCR text
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.