Lens Visual Search
/api/google/lens
Run a Google Lens search for a public image URL and return visual matches, exact matches, and related content
Scrappa is a Google Lens API and reverse image search API that runs a Google Lens search for any public HTTPS image URL and returns structured JSON. Get visual matches, exact matches, product prices, and related content with titles, links, source domains, thumbnails, and positions in one stable response shape.
Try it now
Use the first endpoint in this API family with a Scrappa API key. Every account includes 500 free monthly credits, so you can validate the response shape before buying credits.
curl -X GET "https://scrappa.co/api/google/lens?url=https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2F4%2F45%2FA_small_cup_of_coffee.JPG&type=visual_matches" \
-H "Accept: application/json" \
-H "X-API-KEY: YOUR_API_KEY"
{
"search_parameters": {
"url": "https://upload.wikimedia.org/wikipedia/commons/4/45/A_small_cup_of_coffee.JPG",
"q": null,
"type": "visual_matches"
},
"visual_matches": [
{
"source": "google.com",
"title": "Coffee - Wikipedia",
"link": "https://www.google.com/goto?url=CAESYAHrOzAVIMXaDPw1bXXICh6LX7l5PNsxQQd1yRcyrVvg7AudGrt9MDowqIfl50xW7qJIxy5k4XRZFkMgUwS9z7vnnKyVN6J7gj6VL8wCGSL06oNOfJ3GmDl0rAff8kvW5w",
"thumbnail": null,
"price": null,
"position": 2
}
],
"exact_matches": [],
"related_content": []
}
Structured data for real applications. Here are some ideas.
Find visually similar products for an item photo with type set to products, then compare the price text Google Lens shows for each match.
Discover where an image is published on the web with exact_matches for copyright checks, brand protection, and content verification.
Identify objects, landmarks, or artworks from a photo and link to the source pages Google Lens returns for them.
Enrich product catalogs with matching retailer pages, source domains, and thumbnails for each product image you already store.
Add a search by image feature to your own app or internal tools by sending a public image URL and rendering the structured matches.
Google Lens reverse image search API
The Google Lens API is built for developers who need image-based product discovery, image provenance checks, or a search by image feature without parsing Google pages. Send a public HTTPS image URL and get back the matches Google Lens finds. Every response has the same three arrays, visual_matches, exact_matches, and related_content, even when they are empty, so your parser does not depend on the result type you request.
Each match includes title, link, source domain, thumbnail, price, and a 1-based position.
Use type to focus on all (default), products, exact_matches, or visual_matches.
Product results for type=products are returned in visual_matches, with price set when Google Lens shows one.
Refine all, product, and visual match searches with optional q text, for example to narrow a photo of a mug to espresso cup.
search_parameters echoes the image URL, query, and type used, which makes logging and caching straightforward.
Works with any public HTTPS image URL up to 2,048 characters.
Test the Google Lens API with 500 free monthly credits before scaling production traffic.
Submit a public HTTPS image URL with the default type=all to get the main Lens results, or choose products, exact_matches, or visual_matches to focus on one result tab.
Open Google Lens API docsA 200 response with empty arrays means Google Lens found no results for that image and type. Failures always return a non-200 status with an error_code and a retryable flag, so you can retry only when it makes sense. A visual search can take several seconds, so use a client timeout of at least 45 seconds.
Every Scrappa account includes 500 free monthly credits, and the pricing page explains pay-as-you-go credit packs for larger reverse image search workloads.
View pricingEverything you need in one API.
/api/google/lens
Run a Google Lens search for a public image URL and return visual matches, exact matches, and related content
Search Google Images by keyword when you start from text instead of an image URL.
Search Google Shopping by keyword for ranked product cards with prices, sellers, ratings, and product IDs.
Add organic Google results for the products, landmarks, or brands you identify with Google Lens.
Compare Scrappa against SerpAPI for pricing, free tier, and workflow fit before moving Google Lens workloads.
See how Scrappa compares to the official API.
| Feature | Scrappa | SerpAPI |
|---|---|---|
| Google Lens results | ||
| Price per 1k requests | $0.20 | $3.75 to $25.00 |
| Free tier | 500 credits/month | 250 searches/month |
| Billing model | Pay-as-you-go credit packs | Monthly subscription |
| Search by image URL | ||
| Google Cloud required | ||
| Same key for other Scrappa APIs | N/A |
A Google Lens API runs a Google Lens visual search for an image and returns the matches as structured data. Scrappa accepts a public HTTPS image URL and returns visual_matches, exact_matches, and related_content arrays as JSON.
Yes. Send an image URL with type=exact_matches to find pages that show the same image, or type=visual_matches to find visually similar images and pages. Use type=products to focus on shopping results with prices.
No. The endpoint accepts a public HTTPS image URL. Host the image somewhere publicly reachable, for example object storage with a public or signed URL, and pass that URL.
Product results are returned in visual_matches, with price set when Google Lens shows one. This keeps the response shape identical for every type.
These fields are only filled when Google Lens displays them for a match. Treat both as optional in your parser.
No. A 200 response with empty arrays means Google Lens found no results for that image and type. Failures always return a non-200 status.
No. Scrappa is an independent service and is not affiliated with or endorsed by Google. You only need a Scrappa API key, sent as the X-API-KEY header, and no Google Cloud account.
Yes. Every Scrappa account includes 500 free credits per month, so you can test reverse image searches before buying credit packs. Paid usage costs as little as $0.20 per 1,000 requests, and failed requests are not billed.