Google Lens Search API - Reverse Image Search & OCR avatar

Google Lens Search API - Reverse Image Search & OCR

Pricing

from $7.99 / 1,000 image searches

Go to Apify Store
Google Lens Search API - Reverse Image Search & OCR

Google Lens Search API - Reverse Image Search & OCR

Reverse image search via Google Lens. Returns visual matches, AI descriptions, related links, related searches, and OCR text with bounding boxes. Four modes from fast OCR-only to full all-tabs extraction.

Pricing

from $7.99 / 1,000 image searches

Rating

0.0

(0)

Developer

Zen Studio

Zen Studio

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

a day ago

Last modified

Share

Google Lens Reverse Image Search API

Extract visual matches, AI-generated descriptions, related links, and related searches from any image using Google Lens. Optionally includes OCR text extraction with word-level bounding boxes.

Four search modes give you control over speed, cost, and data depth: scan a single tab for visual or exact matches, get the full results page, or run a complete extraction across all tabs with parallel OCR.

Google Lens Search Scraper
Google SuiteLens OCR API — text extraction under 500msMaps Directions — route data and travel timesApple Maps Directions — routes, ETAs and distances

What Data You Get

Each image returns a structured result containing:

  • AI description -- Google's AI-generated summary of the image content
  • Visual matches -- pages containing visually similar images, with title, URL, source domain, and thumbnail
  • Related links -- broader web pages related to the image subject
  • Related searches -- suggested search queries based on the image
  • Available tabs -- result categories Google identified (AI Mode, Exact matches, Visual matches)
  • OCR text (optional) -- extracted text with word-level bounding boxes and pixel coordinates

Search Modes

ModeWhat it doesSpeed
All resultsDefault page with AI description, matches, links, searches~30s
Visual matchesPages with visually similar images only~30s
Exact matchesPages containing this exact image only~30s
OCR onlyText extraction via protobuf API, no browser~1s

Enable Include all tabs in All results mode to also navigate Visual matches and Exact matches tabs, merging results for maximum coverage. Enable Include OCR text to run text extraction in parallel with any browser mode at no extra time cost.

Pricing

$7.99 per 1,000 images -- flat rate, every mode, every option included.

No per-feature surcharges. All tabs, OCR, any search mode -- same price.

Free trial: 5 runs with 1 image each, no credit card required.

Quick Start

Minimal

{
"imageUrl": "https://images.unsplash.com/photo-1526336024174-e58f5cdd8e13?w=640"
}

Full extraction

{
"imageUrl": "https://images.unsplash.com/photo-1502602898657-3e91760cbb34?w=640",
"searchType": "all",
"includeAllTabs": true,
"includeOcr": true,
"countryCode": "US",
"language": "en",
"maxResults": 50
}

OCR only (fastest, no browser)

{
"imageUrl": "https://tesseract.projectnaptha.com/img/eng_bw.png",
"searchType": "ocr_only"
}

Input Parameters

ParameterTypeDefaultDescription
imageUrlstringrequiredPublic image URL to reverse search (JPEG, PNG, WebP)
searchTypestringallSearch mode: all, visual_matches, exact_matches, ocr_only
includeAllTabsbooleanfalseNavigate extra tabs for more results (All results mode only)
includeOcrbooleanfalseAdd OCR text extraction in parallel
languagestringenISO 639-1 language code for results
countryCodestringUSCountry for proxy geolocation (52 countries supported)
maxResultsinteger50Max visual matches + related links (1-200)

The image must be publicly accessible since Google's servers fetch it directly.

Output Example

{
"imageUrl": "https://images.unsplash.com/photo-1502602898657-3e91760cbb34?w=640",
"searchType": "all",
"searchUrl": "https://www.google.com/search?vsrid=CIicteuihfq71QEQAhgBIiRh...",
"aiDescription": "This image shows the Eiffel Tower in Paris, France, along the River Seine.",
"visualMatches": [
{
"title": "The Most Romantic Hotels in Paris with views of the Eiffel Tower",
"link": "https://www.worldexclusivegroup.com/hotels/the-most-romantic-hotels-in-paris-with-views-of-the-eiffel-tower",
"source": "",
"thumbnail": "data:image/png;base64,..."
},
{
"title": "Why is Paris called the City of Love? - The Travelling Twins",
"link": "https://the-travelling-twins.com/paris-city-of-love/",
"source": "",
"thumbnail": "data:image/png;base64,..."
}
// ... and 8 more
],
"relatedLinks": [
{
"title": "Facts about France – The Travelling Twins",
"link": "https://the-travelling-twins.com/facts-about-france/",
"source": "",
"thumbnail": ""
},
{
"title": "Explore the magnificence of France with a Utah-based travel ...",
"link": "https://www.ksl.com/article/51325338/explore-the-magnificence-of-france-with-a-utah-based-travel-company",
"source": "",
"thumbnail": ""
}
// ... and 8 more
],
"relatedSearches": ["Eiffel Tower"],
"tabs": [
{ "name": "AI Mode", "udm": 50 },
{ "name": "Exact matches", "udm": 48 },
{ "name": "Visual matches", "udm": 44 }
// ... and 6 more
]
}

When includeOcr is enabled, the result also contains:

{
"ocr": {
"language": "en",
"fullText": "Extracted text from image...",
"lines": [
{
"text": "Line of text",
"boundingBox": {
"centerX": 0.5, "centerY": 0.12,
"width": 0.9, "height": 0.04,
"pixelCoords": { "x": 32, "y": 64, "width": 576, "height": 26 }
},
"words": [{ "text": "Line", "boundingBox": { "..." : "..." } }]
}
],
"paragraphs": [{ "text": "Full paragraph...", "boundingBox": { "..." : "..." } }]
}
}

How to Reverse Image Search with Python

from apify_client import ApifyClient
client = ApifyClient("your_token")
run = client.actor("zen-studio/google-lens-visual-search").call(run_input={
"imageUrl": "https://images.unsplash.com/photo-1526336024174-e58f5cdd8e13?w=640",
"searchType": "all",
"includeOcr": True,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(f"AI says: {item['aiDescription']}")
for match in item["visualMatches"]:
print(f" - {match['title']}: {match['link']}")

How to Reverse Image Search with JavaScript

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'your_token' });
const run = await client.actor('zen-studio/google-lens-visual-search').call({
imageUrl: 'https://images.unsplash.com/photo-1526336024174-e58f5cdd8e13?w=640',
searchType: 'all',
includeOcr: true,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
for (const item of items) {
console.log(`AI says: ${item.aiDescription}`);
item.visualMatches.forEach(m => console.log(` - ${m.title}: ${m.link}`));
}

Advanced Usage

Full extraction with max coverage

Get all tabs and OCR for maximum data:

{
"imageUrl": "https://example.com/product.jpg",
"searchType": "all",
"includeAllTabs": true,
"includeOcr": true,
"maxResults": 100
}

Find exact copies of an image

Use exact_matches mode to find pages hosting the same image:

{
"imageUrl": "https://example.com/my-photo.jpg",
"searchType": "exact_matches"
}

OCR-only for text extraction

Extract text without browser overhead:

{
"imageUrl": "https://example.com/screenshot.png",
"searchType": "ocr_only"
}

Technical Details

  • Memory: 4 GB (browser modes), 256 MB (OCR only)
  • Speed: ~30s per image (browser), ~1s per image (OCR only)
  • Proxy: Residential proxy required for browser modes, included in platform cost
  • Retry logic: Automatic session rotation on blocks (up to 3 retries with fresh proxy)
  • 52 countries supported for geo-targeted results

Data Export

Results are available in JSON, CSV, Excel, and XML via the Apify platform. Use the API, webhooks, or scheduled runs to integrate with your data pipeline.

FAQ

Why do some images return empty results? Google may block requests from certain proxy IPs. The actor automatically retries with a fresh proxy up to 3 times. If all retries fail, the image is marked with an error.

What image formats are supported? JPEG, PNG, and WebP. Images must be publicly accessible via URL since Google's servers fetch them directly.

What's the difference between visual matches and related links? Visual matches are pages containing visually similar images (found via aria-label links and h3 headings). Related links come from the broader card grid (data-snf sections) and may include tangentially related content.

Can I use this for real-time monitoring? Yes. Schedule runs on Apify to periodically check where your images appear. Use webhooks to get notified when new matches are found.

Is OCR included in browser search modes? Not by default. Enable includeOcr to run text extraction in parallel. OCR uses a separate protobuf API and adds zero extra browser time.

This actor extracts publicly available data from Google Lens search results. Users are responsible for compliance with Google's Terms of Service and applicable data protection regulations (GDPR, CCPA).


Start Reverse Image Searching Now