Google Lens OCR API: Batch Image to Text avatar

Google Lens OCR API: Batch Image to Text

Pricing

from $2.99 / 1,000 listing scrapeds

Go to Apify Store
Google Lens OCR API: Batch Image to Text

Google Lens OCR API: Batch Image to Text

Google Lens OCR API for image URLs, Base64, and Apify storage records. Get extracted text, language, dimensions, line geometry, translation, stable input IDs, and explicit per-image errors for batch OCR workflows.

Pricing

from $2.99 / 1,000 listing scrapeds

Rating

0.0

(0)

Developer

GetAScraper

GetAScraper

Maintained by Community

Actor stats

0

Bookmarked

74

Total users

32

Monthly active users

13 hours ago

Last modified

Share

πŸ”Ž Google Lens OCR API: Batch Image to Text with Bounding Boxes

Extract text from image URLs, Base64 payloads, and Apify key-value store records in one batch. Every submitted image returns one correlated dataset row with its status, detected language, dimensions, word count, timing, and any real error.

Use the output for document indexing, searchable archives, translation workflows, content moderation, accessibility pipelines, and RAG preparation.

✨ What this Actor gives you

  • Three input modes: Public URLs, Base64 image data, and Apify key-value store records.
  • Stable correlation: Supply your own inputId, or use deterministic IDs assigned in input order.
  • Honest batch rows: Successful, partial, and failed inputs all remain visible.
  • Source dimensions: Get the original image width and height when the image can be decoded.
  • Detected language: Receive the language returned by the OCR source.
  • Word count: Get a count calculated from the extracted text.
  • Real line geometry: Receive normalized and pixel line boxes when the OCR source supplies them.
  • Optional translation: Request a target language while retaining the original OCR text.
  • Bounded concurrency: Process batches without launching every image request at once.
  • Run summary: Review submitted, successful, partial, and failed counts in RUN_SUMMARY.

🎯 Common workflows

  • AI and RAG teams: Turn screenshots and scanned pages into searchable text with source correlation.
  • Automation teams: Process receipt, label, menu, poster, and document image batches.
  • Localization teams: Extract original text and request a translated version in the same row.
  • Data operations teams: Reconcile every input against a clear success, partial, or failure status.
  • Developers: Retain pixel coordinates for line highlighting and review interfaces.

πŸš€ Run your first OCR batch

  1. Open the Actor in Apify Console.
  2. Add a single image URL or choose a bulk source field.
  3. Optionally add input IDs and a translation target.
  4. Choose the output detail and concurrency.
  5. Start the run.
  6. Open the dataset for correlated rows or RUN_SUMMARY for run totals.

πŸ“₯ Input

At least one image source is required.

FieldTypeRequiredWhat it controls
imageUrlstringConditionalOne public HTTP or HTTPS image URL.
imageUrlInputIdstringNoCorrelation ID for imageUrl. Defaults to single-1.
imageUrlsarrayConditionalBulk URL objects. Each item can include url and userData.inputId.
imagesBase64arrayConditionalObjects containing data and an optional inputId. Raw Base64 and image data URIs are accepted.
imageKvsRecordsarrayConditionalObjects containing key, optional storeId, and optional inputId.
outputDetailstringNofull, lines, or text_only.
translateTostringNoTarget language code such as es, de, or pt-BR.
maxConcurrencyintegerNoImages processed at once, from 1 to 10.

URL batch example

{
"imageUrls": [
{
"url": "https://tesseract.projectnaptha.com/img/eng_bw.png",
"userData": { "inputId": "poem-page-1" }
},
{
"url": "https://example.com/document-page-2.png",
"userData": { "inputId": "document-page-2" }
}
],
"outputDetail": "full",
"translateTo": "es",
"maxConcurrency": 3
}

Apify storage example

{
"imageKvsRecords": [
{
"storeId": "my-image-store",
"key": "receipts/july-001.png",
"inputId": "receipt-july-001"
}
],
"outputDetail": "lines"
}

The default key-value store is used when storeId is omitted. A storage record can contain binary image data, a Base64 string, or a JSON object with a Base64 data field.

Recurring document OCR workflow

Use the same imageUrls input from an Apify schedule. Keep inputId stable so downstream systems can reconcile each image across runs.

{
"imageUrls": [
{
"url": "https://example.com/invoices/2026-08-01.png",
"userData": { "inputId": "invoice-2026-08-01" }
}
],
"outputDetail": "full"
}

πŸ“€ Output

The Actor writes one row for each submitted image. This abbreviated example comes from the public Tesseract sample image:

{
"inputId": "sample-1",
"sourceType": "URL",
"sourceReference": "https://tesseract.projectnaptha.com/img/eng_bw.png",
"imageUrl": "https://tesseract.projectnaptha.com/img/eng_bw.png",
"status": "SUCCEEDED",
"language": "en",
"fullText": "Mild Splendour of the various-vested Night!\nMother of wildly-working visions! hail!\nI watch thy gliding, while with watery light\nThy weak eye glimmers through a fleecy veil;\nAnd when thou lovest thy pale orb to shroud\nBehind the gather'd blackness lost on high;\nAnd when thou dartest from the wind-rent cloud\nThy placid lightning o'er the awaken'd sky.",
"translationTarget": "es",
"wordCount": 58,
"imageWidth": 1486,
"imageHeight": 668,
"lineGeometryAvailable": true,
"wordGeometryAvailable": false,
"geometryLevel": "LINE",
"durationMs": 3154,
"processedAt": "2026-08-01T16:51:13.248Z"
}

Result status

StatusMeaning
SUCCEEDEDOCR completed. Requested translation also completed when text was available.
PARTIALOCR completed, but an optional translation request failed. OCR text remains in the row.
FAILEDThe image could not be loaded, decoded, or processed. The row contains errorCode and errorMessage.

Field reference

FieldDescription
inputIdUser-provided or deterministic correlation ID.
sourceTypeURL, BASE64, or KEY_VALUE_STORE.
sourceReferenceURL or storage record reference. Base64 content is never copied into this field.
statusPer-input processing outcome.
languageLanguage reported by the OCR source.
fullTextExtracted lines joined with newline characters.
translatedTextReal translated text when requested and completed.
wordCountWhitespace-delimited word count calculated from fullText.
imageWidth, imageHeightSource image dimensions in pixels.
lineGeometryAvailableWhether at least one genuine line box is present.
wordGeometryAvailableAlways false because the current OCR source does not expose word boxes.
linesExtracted lines with source-provided normalized and pixel geometry when available.
durationMsTotal processing time for that input.
errorCode, errorMessageReal failure details for partial or failed rows.

One real element from the sample row's lines array:

{
"text": "Mild Splendour of the various-vested Night!",
"boundingBox": {
"normalized": {
"centerX": 0.44486331939697266,
"centerY": 0.1067144051194191,
"width": 0.8516666889190674,
"height": 0.11873840540647507
},
"pixel": {
"x": 28,
"y": 32,
"width": 1266,
"height": 79
}
}
}

πŸ›‘οΈ Data integrity and limits

  • The Actor does not fill missing values with invented labels, zero coordinates, or placeholder text.
  • Word-level boxes are not estimated. The current OCR source exposes reliable line-level segments, so only genuine line geometry is returned.
  • A known full-image geometry fallback from the upstream parser is removed instead of being presented as a precise box.
  • Input images are limited to 25 MB each.
  • Translation is optional. If it fails after OCR succeeds, the row is marked PARTIAL and keeps the original text.
  • OCR and translation depend on external services, so response time and availability can vary.
  • Only process images that you are authorized to use.

πŸ’³ Pricing

The local PPE configuration charges the Processed OCR image event only for successful or partial OCR results. Failed inputs still receive an honest dataset row but are not charged. Current Store tiers are Free $3.99, Bronze $3.66, Silver $3.32, and Gold or above $2.99 per 1,000 processed images.

❓ FAQ

Does the Actor keep batch order?

Yes. Rows are pushed in the same order as the normalized input list, even when images finish at different times.

Can I match results to my own database records?

Yes. Add a unique inputId to each item. The same value appears in its dataset row.

Does it return word bounding boxes?

No. It returns source-provided line geometry. It does not split a line box into estimated word boxes.

What happens when one image fails?

The rest of the batch continues. The failed image receives its own FAILED row with an error code and message.

What happens when translation fails?

Valid OCR data is retained, and the row is marked PARTIAL.

Does it run as a Standby web server?

No. Standby mode is disabled. Each Actor run processes its input batch, writes results and a run summary, then exits.

⭐ Was this useful?

⭐ ⭐ ⭐ ⭐ ⭐
If this Actor made your image batch easier to audit, leave a rating.
Your review helps other automation and AI teams find it and tells us which workflows to improve next.
β˜…Β Β Rate this Actor on Apify

πŸ”— Other actors