# Google Lens API - Reverse Image Search Results as JSON > Source: https://scrape.do/products/ready-api/google-lens-scraper/ Search Google Lens with a public image URL. Get visually similar images, exact-image matches, product prices, ratings, stock status, and related searches as structured JSON. > Each successful request costs **10 credits**. **Google Lens Image Search Results as Structured JSON** Send a public image URL and get visual matches, pages that contain the exact image, product prices, ratings, and related searches from Google Lens. 10 credits per search. ![Google Lens Image Search Results as Structured JSON](/uploads/google-lens-api.png) ## Highlights ### Visual, Exact, and Product Data - Each search returns **about 60 visual matches** with page title, link, source, domain, thumbnail, and the full-size image with width and height. - Use `type=exact` to get **up to 400 pages that contain the same image**. The first 50 links come back as resolved page URLs. Product rows add price, a numeric `extracted_price`, currency, rating, review count, and stock status. ### Localized Results and Text Refinement - Set the interface language with **hl** and the market with **gl** (a two-letter ISO 3166-1 code such as `us`, `gb`, `de`, or `jp`) to get local prices and currencies. - Add `q` to refine visual matches by color, model, or another product detail. Add `include_html=true` to also receive the Google Lens results page at no extra cost. ## How It Works ### Visual Matches Send a public image URL and get visually similar results with product details, plus the related searches Google suggests for the image. ![Visual Matches](/uploads/google-lens-visual-matches.png) **cURL (API mode)** ```bash curl --location --request GET 'https://api.scrape.do/plugin/google/lens?token=&url=https%3A%2F%2Fm.media-amazon.com%2Fimages%2FI%2F61bK6PMOC3L._AC_SL1500_.jpg' ``` **Python (API mode)** ```python import requests import json token = "" image_url = "https://m.media-amazon.com/images/I/61bK6PMOC3L._AC_SL1500_.jpg" response = requests.get( "https://api.scrape.do/plugin/google/lens", params={"token": token, "url": image_url}, ) print(json.dumps(response.json(), indent=2)) ``` **Node.js (API mode)** ```javascript const token = ""; const imageUrl = "https://m.media-amazon.com/images/I/61bK6PMOC3L._AC_SL1500_.jpg"; const url = `https://api.scrape.do/plugin/google/lens?token=${token}&url=${encodeURIComponent(imageUrl)}`; fetch(url) .then((res) => res.json()) .then((data) => console.log(JSON.stringify(data, null, 2))); ``` *(Go, Ruby, Java, C#, PHP examples are also available on the HTML version.)* **Example response** ```json { "search_parameters": { "image_url": "https://m.media-amazon.com/images/I/61bK6PMOC3L._AC_SL1500_.jpg", "type": "all", "hl": "en", "gl": "us" }, "visual_results": [ { "position": 1, "title": "Amazon.com: Apple iPhone 14, 128GB, Blue for T-Mobile ...", "link": "https://www.amazon.com/Apple-iPhone-128GB-T-Mobile-Renewed/dp/B0BN746959", "source": "Amazon.com", "domain": "www.amazon.com", "thumbnail": "https://encrypted-tbn0.gstatic.com/images?q=tbn:...", "image": { "link": "https://m.media-amazon.com/images/I/61aEBeER-+L._AC_UF894,1000_QL80_.jpg", "width": 755, "height": 1000 } }, { "position": 2, "title": "Pre-Owned Apple iPhone 14 Plus - Carrier Unlocked - 128GB ...", "link": "https://www.walmart.com/ip/Apple-iPhone-14-Plus-128GB-Blue/1603165541?conditionGroupCode=3", "source": "Walmart", "domain": "www.walmart.com", "price": "$339*", "extracted_price": 339, "currency": "$", "in_stock": true, "thumbnail": "https://encrypted-tbn0.gstatic.com/images?q=tbn:...", "image": { "link": "https://i5.walmartimages.com/asr/6e450140-8237-4084-8996-4cb6ebc53694.c116087ed2ce71e7315765d9e264e6a8.jpeg", "width": 1448, "height": 1448 } } ], "related_searches": [ { "query": "Apple iPhone 14 Plus", "link": "https://www.google.com/search?q=Apple+iPhone+14+Plus&..." }, { "query": "iPhone 14", "link": "https://www.google.com/search?q=iPhone+14&..." } ] } ``` ### Exact Matches Set type=exact to find pages that contain the same image. A widely used image returns up to 400 matches, and the first 50 links are resolved page URLs. ![Exact Matches](/uploads/google-lens-exact-matches.png) **cURL (API mode)** ```bash curl --location --request GET 'https://api.scrape.do/plugin/google/lens?token=&url=https%3A%2F%2Fm.media-amazon.com%2Fimages%2FI%2F61bK6PMOC3L._AC_SL1500_.jpg' ``` **Python (API mode)** ```python import requests import json token = "" image_url = "https://m.media-amazon.com/images/I/61bK6PMOC3L._AC_SL1500_.jpg" response = requests.get( "https://api.scrape.do/plugin/google/lens", params={"token": token, "url": image_url}, ) print(json.dumps(response.json(), indent=2)) ``` **Node.js (API mode)** ```javascript const token = ""; const imageUrl = "https://m.media-amazon.com/images/I/61bK6PMOC3L._AC_SL1500_.jpg"; const url = `https://api.scrape.do/plugin/google/lens?token=${token}&url=${encodeURIComponent(imageUrl)}`; fetch(url) .then((res) => res.json()) .then((data) => console.log(JSON.stringify(data, null, 2))); ``` *(Go, Ruby, Java, C#, PHP examples are also available on the HTML version.)* **Example response** ```json { "search_parameters": { "image_url": "https://m.media-amazon.com/images/I/61bK6PMOC3L._AC_SL1500_.jpg", "type": "exact", "hl": "en", "gl": "us" }, "exact_results": [ { "position": 1, "title": "Apple iPhone 14 A2649 AT&T Only 128GB Blue Good - eBay", "link": "https://www.ebay.com/itm/186531796972", "source": "eBay", "image_size": { "width": 756, "height": 1000 } }, { "position": 3, "title": "Apple iPhone 14 A2649 Unlocked 256GB Blue B- | eBay", "link": "https://www.ebay.com/itm/177424912448", "source": "eBay", "price": "$303.59", "extracted_price": 303.59, "currency": "$", "image_size": { "width": 756, "height": 1000 } } ] } ``` ## FAQ ### What do I need to send? A public http or https image URL in the url parameter, plus your token. Google must be able to fetch the image. Hosts that block Google can return a successful response with no result array. ### What do I get back? The default type=all returns about 60 visual_results and, when q is not sent, related_searches. Each visual result has title, link, source, domain, thumbnail, and the full-size image. Product rows add price, extracted_price, currency, rating, reviews, and in_stock when Google shows them. type=visual returns visual results only, and type=exact returns exact_results. ### How many exact matches can I get? Up to 400 per search. The first 50 links are resolved page URLs. Later links are Google redirect links, which you can resolve with the Google Redirect (Goto) Link Resolver at 1 credit per link. ### How much does a search cost? 10 credits per successful request, for any type, with or without include_html. A search that finds no matches still costs 10 credits. Validation errors (400) and failed requests that return 502 are not charged. ### How long does a search take? type=all and type=visual usually complete in about 5 seconds. type=exact takes longer, up to about 35 seconds, because page links are resolved before the response is returned. ### Can I get results for a specific country or language? Yes. Set hl for the interface language and gl for the market, prices, and currencies. gl takes a two-letter ISO 3166-1 code, so use gb for the United Kingdom, not uk. ### Where can I find the full API reference? See the Google Lens API [documentation](/documentation/google-scraper-api/lens/) for every parameter, the full response schema, and the error table.