Google Lens Reverse Image Search API
Pricing
Pay per event
Google Lens Reverse Image Search API
Pricing
Pay per event
Rating
0.0
(0)
Developer
SR
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
2 days ago
Last modified
Categories
Share
Google Lens API: Reverse Image Search for Visual Matches, Products, and Prices
Run a reverse image search API at scale with clean JSON. This actor takes any direct image URL, uploads it to Google Lens, and returns the visual matches Lens finds across the web, each with a page URL, a title, the source domain, and a price when the match is a shopping result. Point it at a list of URLs for bulk reverse image search across a whole catalog. It also returns the image regions Lens detected, with normalized bounding boxes. No browser, no headless Chrome, just pure HTTP against the Lens upload endpoint.
If you have ever wanted a "search by image API" that gives you the same visual matches you see in the Google Lens results page, but as structured rows you can pipe into a database, this is that.
What you get
- Visual matches for each input image: an array of results, where every match carries a
title, apage_url(the web page the image appears on), asource_domain(for example amazon.com or etsy.com), athumbnail, and, when Lens exposes it, apriceandcurrency. - A match count per image so you can filter, rank, or bill on volume.
- Detected regions: the bounding boxes Lens found inside the image, each with a
labeland abox_cxcywh(center-x, center-y, width, height, all normalized 0 to 1). Useful when an image has multiple objects. - The Lens results page URL (
search_url), so you can open the exact search a human would see. - Run metadata:
attempts,error(null on success), andfetched_in_secondsper image.
Why use Google Lens reverse image search
Reverse image search answers a different question than text search. Instead of "what pages mention this phrase", it asks "where does this exact image, or something visually close to it, appear online". That is the right tool when you start from a picture and need context: a product photo with no name, a screenshot of a book cover, a creative asset you suspect was copied, a marketplace listing you want to trace back to its source.
Google Lens is the strongest public visual-match engine, and it is especially good at products. Feed it a product image and it tends to return shopping listings from real sellers, often with prices attached, which turns a single photo into a live price-comparison set. Feed it a book cover and it returns the sellers carrying that edition. Feed it a logo or a piece of packaging and it surfaces the pages using it.
The catch is that Google does not ship an official public Google Lens API. To get Lens results programmatically you either drive a real browser (slow, fragile, expensive) or you talk to the Lens upload endpoint directly. This actor does the latter. It uploads your image, follows the redirect to the results page, and parses the visual matches and regions out of the response, so you get Lens-quality data without running a browser.
Input
| Field | Type | Required | Description |
|---|---|---|---|
image_urls | array of strings | Yes | Direct image URLs (JPG, PNG, or WEBP). Each URL must point straight at the image file, not at a page that contains it. One output row is produced per URL. |
language | string | No | Two-letter Google hl language code (for example en, de, fr). Controls the language of the Lens results page. |
retries | integer (0 to 8) | No | Number of anti-bot retries. On a blocked response the actor rotates its session cookies and tries again, up to this many times. |
Output
One dataset row per input image. Trimmed example showing a shopping match and a detected region:
{"image_url": "https://example.com/book-cover.jpg","search_url": "https://lens.google.com/search?ep=...","match_count": 59,"matches": [{"title": "The Midnight Library by Matt Haig (Hardcover)","page_url": "https://www.amazon.com/dp/0525559477","source_domain": "amazon.com","thumbnail": "https://encrypted-tbn0.gstatic.com/images?q=...","price": "18.99","currency": "USD"},{"title": "The Midnight Library - AbeBooks","page_url": "https://www.abebooks.co.uk/9780525559474/...","source_domain": "abebooks.co.uk","thumbnail": "https://encrypted-tbn0.gstatic.com/images?q=...","price": null,"currency": null}],"regions": [{"label": "Book","box_cxcywh": [0.5012, 0.4876, 0.7203, 0.9411]}],"attempts": 1,"error": null,"fetched_in_seconds": 2.7}
price and currency are populated only when Lens returns a shopping-style match. For pages that are not listings they stay null, but page_url, title, and source_domain are still filled. box_cxcywh is normalized: multiply by your image width and height to get pixels.
Use cases
Brand and counterfeit monitoring. Take your official product photos and run them through Lens on a schedule. The visual matches tell you every marketplace and page carrying that image, which is exactly how you catch grey-market resellers and counterfeit listings reusing your studio shots. The source_domain field makes it trivial to flag domains that are not authorized retailers.
Product identification. You have a photo but no SKU, no name, no barcode. Lens matches it against real listings and hands back titles and seller pages. In the verified book-cover test, a single cover image returned around 59 matches from amazon.com, ebay.com, etsy.com, abebooks.co.uk, and other sellers, each with the product title and the page URL. That is enough to identify the item and pull its identifiers downstream.
Price comparison from an image. Because product matches often include a price and currency, one image can become a price sheet. Point it at a competitor's product photo and you get back the sellers listing it and what they charge, without ever knowing the product name up front.
Image provenance and copyright. Photographers, agencies, and rights holders can trace where an image has spread. The page URLs show which sites republished an asset, which is the raw material for takedown notices or licensing follow-up.
How it compares
- vs borderline/google-lens: that actor charges per mode, from $0.0015 for a visual match up to a $0.01 start fee, so cost depends on which Lens features you trigger. This actor is a flat rate for reverse-image visual matches with no per-mode fees to reason about.
- vs zen-studio Google Lens: that one is OCR-focused (text extraction from images). This actor is built for visual matches, merchant and page results, and detected regions, not text reading. If you need OCR, use zen-studio; if you need "where does this image appear and what products match it", use this.
- Flat, predictable pricing: one event type, billed only when there is at least one match, so empty searches do not cost you.
Pricing
Pay-per-event, so you pay for results, not for time.
- $0.0015 per image search, charged only when the image returns at least one match. No match, no charge.
- $0.002 per-run actor-start fee.
That works out to roughly $1.50 per 1000 images that return matches, plus the small start fee per run. Batch many images into one run to amortize the start fee.
Limits and gotchas
- Direct image URLs only. Each entry in
image_urlsmust resolve straight to a JPG, PNG, or WEBP file. A link to a product page or a gallery will not work; extract the image URL first. - Matches depend on web presence. Lens can only match an image to pages where that image (or a close variant) already exists online. A brand-new photo that has never been published may return zero matches.
- Art and generic images may return only regions. Abstract art, plain textures, or highly generic scenes often produce detected regions but few or no merchant matches.
- Anti-bot cookie rotation. Google will occasionally block a request. The actor rotates session cookies and retries up to your
retriesvalue. Set it higher (4 to 8) for large batches to keep the success rate up. - Title pairing is best-effort. Lens does not always attach a clean title to every visual match, so some matches may carry a
page_urlandsource_domainbut a thin or emptytitle. - Prices are not guaranteed.
priceandcurrencyappear only when Lens surfaces a shopping result. Non-listing pages returnnullfor both. - Free-tier cap. Free Apify accounts are limited to 10 results per run. Paid accounts run uncapped.
FAQ
How do I do a reverse image search with an API?
Pass one or more direct image URLs in image_urls and run the actor. It uploads each image to Google Lens, follows the redirect to the results page, and returns the visual matches as structured JSON, one row per image. No browser automation on your side.
Can I find products from an image? Yes. Product photos are where Lens is strongest. It matches your image against real seller listings and returns titles, page URLs, source domains, and a price plus currency when the match is a shopping result. A single product image commonly returns dozens of listings.
Does it return the source websites of an image?
Yes. Every match includes page_url (the exact page the image appears on) and source_domain (the host, for example amazon.com or etsy.com). That is what makes it usable for provenance, monitoring, and takedown work.
Why did my image return regions but no matches? That usually means Lens detected objects inside the image but could not find published pages carrying a matching image. It is common for original art, generic scenes, or freshly created assets that have no web footprint yet.
Can I control the language of the results?
Yes. Set language to a two-letter hl code (for example de or fr) to get the Lens results page in that language. Leave it unset to use the default.
Related Actors
- Google Lens OCR - Extract text from any image with word-level bounding boxes.
- Google AI Overview - Scrape Google AI Overview answers and the sources they cite.
- Free Google Maps Scraper - Scrape Google Maps places: name, rating, phone, website, hours.