{"uid":"cap_4i1nLSw-GkCYLWYXygpd4","slug":"agents-openwebninja-com-image-to-text-ocr-via-google-lens-31c8a583","name":"Image to Text (OCR) via Google Lens","description":"Extract text from an image and get paragraph, sentence and word level text detections from Google Lens.","url":"https://agents.openwebninja.com/realtime-lens-data/ocr?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","description":"URL of an image from which to extract text."},"language":{"type":"string","default":"en","description":"Set the language of the results. Allowed values: 2-letter language code, see ISO 639-1."}}},"responseSchema":{"type":"object","properties":{"data":{"type":"object","properties":{"text":{"type":"string","description":"The full extracted text content"},"language":{"type":"string","description":"The language of the extracted text"},"paragraphs":{"type":"array","items":{"type":"object","properties":{"box":{"type":"object","properties":{"top":{"type":"number","description":"The y-coordinate of the top edge of the paragraph box"},"left":{"type":"number","description":"The x-coordinate of the left edge of the paragraph box"},"width":{"type":"number","description":"The width of the paragraph box"},"height":{"type":"number","description":"The height of the paragraph box"}}},"sentences":{"type":"array","items":{"type":"object","properties":{"box":{"type":"object","properties":{"top":{"type":"number","description":"The y-coordinate of the top edge of the sentence box"},"left":{"type":"number","description":"The x-coordinate of the left edge of the sentence box"},"width":{"type":"number","description":"The width of the sentence box"},"height":{"type":"number","description":"The height of the sentence box"}}},"words":{"type":"array","items":{"type":"object","properties":{"box":{"type":"object","properties":{"top":{"type":"number","description":"The y-coordinate of the top edge of the word box"},"left":{"type":"number","description":"The x-coordinate of the left edge of the word box"},"width":{"type":"number","description":"The width of the word box"},"height":{"type":"number","description":"The height of the word box"}}},"word":{"type":"string","description":"The individual word detected in the image"}}}}}}}}}}}},"status":{"type":"string","description":"The status of the API response"},"parameters":{"type":"object","properties":{"url":{"type":"string","description":"The URL of the image being processed"},"language":{"type":"string","description":"Detected or specified language code"}}},"request_id":{"type":"string","description":"A unique identifier for the request"}}},"example":null,"exampleRequest":null,"tags":[],"displayCostAmount":"unknown","displayCostAsset":"USD","priceDynamic":true,"priceHint":null,"priceStatus":"unprobed","priceSource":"registry","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"unknown","summary":"price unknown","primary":{"kind":"dynamic","protocol":"mpp","network":"tempo","amountUsd":null,"per":"call","confidence":"unknown"},"accepted":[{"kind":"dynamic","protocol":"mpp","network":"tempo","amountUsd":null,"per":"call","confidence":"unknown"}]},"paymentMethods":[{"uid":"pm_DkFPjcBIw8O9woAgnNxIs","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"unknown","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":"agents.openwebninja.com","brandSlug":"agents-openwebninja-com-x402","brandBaseUrl":"https://agents.openwebninja.com","brandDocsUrl":null,"whatItDoes":"Extracts full text from an image URL with paragraph, sentence, and word-level bounding box detections using Google Lens.","exampleAgentPrompt":"Can you extract all the text from this image — https://example.com/receipt.jpg — and give me the full text along with word-level positions? Use English as the output language.","exampleUseCases":[{"title":"Receipt digitization for expense tracking","prompt":"I have a photo of a receipt at https://example.com/hotel-receipt.jpg — can you extract all the text from it so I can log the line items and totals?"},{"title":"Multilingual sign translation pipeline","prompt":"Extract the text from this street sign image at https://cdn.example.com/sign-french.png — please set the language to French so the results come back correctly."},{"title":"Scanned document indexing","prompt":"Pull all the text out of this scanned contract page at https://docs.example.com/contract-page3.jpg, including the paragraph and sentence breakdowns with their positions on the page."}],"resultDescription":"Returns the full extracted text string, detected language, and a structured breakdown of paragraphs, sentences, and words — each with pixel-level bounding box coordinates (top, left, width, height). Also includes a request ID and status field for tracking.","failureModes":["Invalid or inaccessible image URL returns an error status","Unsupported language code may fall back to default or return an error","Low-quality or extremely small images may produce empty or incomplete text extraction","Non-image URLs (e.g. HTML pages) will fail or return no text","Rate limit or payment issues may return a 402 or 429 response"],"whenToPreferThis":"Choose this endpoint when you need structured, multi-level OCR output (paragraph, sentence, and word with bounding boxes) powered by Google Lens, especially for images publicly accessible via URL. It is ideal when positional layout information matters alongside raw text — such as document parsing, form reading, or sign recognition — and when you need multilingual support via ISO 639-1 language codes.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-14T00:35:28.658Z","isFirstParty":false,"canonicalSlug":"agents-openwebninja-com-image-to-text-ocr-via-google-lens-31c8a583"}