Google Lens API
The Google Lens API enables reverse image search functionality through Scrapingdog, supporting product results, visual matches, and exact matches from Google Lens. Costs 10 API credits per request.
Endpoint: https://api.scrapingdog.com/google_lens
API Parameters
π
Authentication
api_keyRequiredThis is your API key.
Type: StringurlRequiredThe Google Lens URL.
Type: String
π
Search Query
queryOptionalThe parameter specifies the search query you want to execute, just like a standard Google search. Example1 -query=pizza
Type - String
π
Geographic Location and Localization
countryOptionalThis is the ISO code of the country from which you are seeking Google Lens results.
Default Value -us
Type - StringlanguageOptionalLanguage of the results. Possible Values -en,es,fr,de, etc.
Default Value -en
Type - String
β
οΈ Result Type Parameters
productOptionalThis parameter is used to get product results from Google Lens. Set ittrueto enable it.
Default Value -false
Type: Stringvisual_matchesOptionalThis parameter is used to get visual match results from Google Lens. Set ittrueto enable it.
Default Value -false
Type: Stringexact_matchesOptionalThis parameter is used to get exact match results from Google Lens. Set ittrueto enable it.
Default Value -false
Type: String
API Examples

curl "https://api.scrapingdog.com/google_lens?api_key=APIKEY&url=https://lens.google.com/uploadbyurl?url=https://i.imgur.com/HBrB8p0.png"
import requests url = "https://api.scrapingdog.com/google_lens" params = { "api_key": "APIKEY", "url": "https://lens.google.com/uploadbyurl?url=https://i.imgur.com/HBrB8p0.png" } response = requests.get(url, params=params) if response.status_code == 200: print(response.json())
const axios = require('axios'); axios.get('https://api.scrapingdog.com/google_lens', { params: { api_key: 'APIKEY', url: 'https://lens.google.com/uploadbyurl?url=https://i.imgur.com/HBrB8p0.png' } }).then(response => console.log(response.data)) .catch(error => console.error(error.message));
<?php $url = 'https://api.scrapingdog.com/google_lens/?' . http_build_query([ 'api_key' => 'APIKEY', 'url' => 'https://lens.google.com/uploadbyurl?url=https://i.imgur.com/HBrB8p0.png', ]); $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); echo curl_exec($ch); curl_close($ch);
require 'net/http' require 'uri' url = URI.parse("https://api.scrapingdog.com/google_lens/") url.query = URI.encode_www_form( 'api_key' => 'APIKEY', 'url' => 'https://lens.google.com/uploadbyurl?url=https://i.imgur.com/HBrB8p0.png' ) http = Net::HTTP.new(url.host, url.port) http.use_ssl = true puts http.request(Net::HTTP::Get.new(url)).body
import java.io.*; import java.net.*; public class Main { public static void main(String[] args) throws Exception { String apiUrl = "https://api.scrapingdog.com/google_lens/?api_key=APIKEY&url=" + URLEncoder.encode("https://lens.google.com/uploadbyurl?url=https://i.imgur.com/HBrB8p0.png", "UTF-8"); URL url = new URL(apiUrl); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setRequestMethod("GET"); BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream())); String line; while ((line = reader.readLine()) != null) System.out.println(line); conn.disconnect(); } }
{
"lens_results": [
{
"title": "Arnold Schwarzenegger and Danny DeVito : r/CelebrityLookalikes",
"link": "https://www.reddit.com/r/CelebrityLookalikes/comments/1uwlrps/arnold_schwarzenegger_and_danny_devito/",
"source": "www.reddit.com",
"original_thumbnail": "https://preview.redd.it/arnold-schwarzenegger-and-danny-devito-v0-mnja7ruli9dh1.jpg?width=500&format=pjpg&auto=webp&s=242012aee74c869984c35d6f72bafbfebdb82d62",
"thumbnail": "https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcQd3AyHbyvFtdWZ50GZr6_g7e9IU6FHblXoMuE1p7U_kcnkHrej",
"position": 1
},
{
"title": "The Incredibles fan cast in live action on a Disney live action reboot : r/Fancast",
"link": "https://www.reddit.com/r/Fancast/comments/1ff7x1d/the_incredibles_fan_cast_in_live_action_on_a/",
"source": "Reddit",
"original_thumbnail": "https://i.redd.it/the-incredibles-fan-cast-in-live-action-on-a-disney-live-v0-ldge3h3wveod1.jpg?width=1000&format=pjpg&auto=webp&s=6bfe382d8025aa63079e22895dc39c879fb4277d",
"thumbnail": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQT7XpqfVVeEAc8EM6sA8qkZXyZM5UuNsNpXwQdb-GqlqSY3Ozv",
"in_stock": false,
"position": 2
},
{
"title": "Angels Fall First (u/Angelfallfirst) - Reddit",
"link": "https://www.reddit.com/user/Angelfallfirst/",
"source": "Reddit",
"original_thumbnail": "https://preview.redd.it/reddit-island-day-6-v0-anhj2s2wjqfh1.jpeg?width=1024&format=pjpg&auto=webp&s=4e772cd107009ea77dd4c1edb32d8dec3e4db0cf",
"thumbnail": "https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcQK6CW7Ovz8r55UkFe6AYnhCIlc3dvsTG-WUslriXSvO98r1PZc",
"in_stock": false,
"position": 3
},
{
"title": "The Same Picture of Danny DeVito Every Day #748 - blessingofdanny post - Imgur",
"link": "https://imgur.com/gallery/same-picture-of-danny-devito-every-day-748-nmWjaW7",
"source": "Imgur",
"original_thumbnail": "https://i.imgur.com/7diWro4g.jpg",
"thumbnail": "https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcS6zRBOH4EQl--l2HVh54JJ_CUgrlrqQPo_C8uKeX7mxu4q0GP1",
"in_stock": false,
"position": 4
},
{
"title": "Actor Danny DeVito attends the "It's Always Sunny in Philadelphia"... News Photo - Getty Images",
"link": "https://www.gettyimages.com/detail/news-photo/actor-danny-devito-attends-the-its-always-sunny-in-news-photo/103087683",
"source": "Getty Images",
"original_thumbnail": "https://media.gettyimages.com/id/103087683/photo/2010-comic-con-international-day-4.jpg?s=612x612&w=gi&k=20&c=Fbup_h8zscZVHO8igf3wIqvdj657sp-P5iwRE0QsssU=",
"thumbnail": "https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcS-A1TTOziBdoPyJvj3kkAReb_khtxb5RMDKlVnkwpnigfOvWSD",
"in_stock": false,
"position": 5
},
{
"title": "Danny DeVito carriving at the 'It's Always Sunny In Philadelphia' at PaleyFest09 event on April 10 ,2009 at the Arclight Cinemas, Hollywood, California. 2009 38203891 Stock Photo at Vecteezy",
"link": "https://www.vecteezy.com/photo/38203891-danny-devito-carriving-at-the-it-s-always-sunny-in-philadelphia-at-paleyfest09-event-on-april-10-2009-at-the-arclight-cinemas-hollywood-california-2009",
"source": "Vecteezy",
"original_thumbnail": "https://static.vecteezy.com/system/resources/thumbnails/023/626/321/small_2x/danny-devito-carriving-at-the-its-always-sunny-in-philadelphia-at-paleyfest09-event-on-april-10-2009-at-the-arclight-cinemas-hollywood-california2009-free-photo.jpg",
"thumbnail": "https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcQUI1_NxGMwyLxc5RxAf2PmSpv4G_0pMGAxhJyVs12Ws6a19HC4",
"in_stock": false,
"position": 6
},
{
"title": "Is Danny DeVito really the sixth sexiest bald man in the world?!?! β 104.5 WOKV",
"link": "https://www.wokv.com/entertainment/is-danny-devito-really-sixth-sexiest-bald-man-world/BQMGKGTFN5HOHOLTTIZO46N63I/",
"source": "104.5 WOKV",
"original_thumbnail": "https://www.wokv.com/resizer/rYP4rdBlMk_6TIfnL9FehhUy9y8=/arc-anglerfish-arc2-prod-cmg/public/HPJXWL7HCMNXBCC42OPTDFHQO4.jpg",
"thumbnail": "https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcRsDeaSCzQowvVFuXoD856xeQu92uoS-eGIHThhlDx7tUAJqZXn",
"in_stock": false,
"position": 7
},
{
"title": "Antes de ser actor Danny De Vito fue estilista | Ciudad Magazine",
"link": "https://www.ciudad.com.ar/virales/antes-ser-actor-danny-vito-fue-estilista_100641/",
"source": "Ciudad Magazine",
"original_thumbnail": "https://www.ciudad.com.ar/resizer/v2/antes-de-ser-actor-danny-de-vito-fue-estilista-NY3KMZ3RMZCXTDWD3I7MBLX6YU.jpg?auth=bf752f7d00f4a018360781bd967d9d9d72b5daf3b73c91bfa1574e3ed12e778c&width=1440",
"thumbnail": "https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcQw8MiOb9y9IVLRMow6Dnff9EdP_cSVE71_ebEMQrP_Q03BZBUa",
"in_stock": false,
"position": 8
},
{
"title": "Rob talks about when he realized Danny Devito was the right fit for the show.",
"link": "https://www.instagram.com/reel/DUMQONjEjgM/",
"source": "Instagram",
"original_thumbnail": "https://lookaside.instagram.com/seo/google_widget/crawler/?media_id=3822501529094600716",
"thumbnail": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRgVuvcr1MFen6NQ7fxYS5SxduCkjjTTrflnuKMivtnobq_EuI9",
"in_stock": false,
"position": 9
},
{
"title": "Snappy Stars -- Say Cheese!",
"link": "https://www.tmz.com/photos/2012/05/16/celebrity-taking-pictures-snappy-camera-photos/",
"source": "TMZ",
"original_thumbnail": "https://imagez.tmz.com/image/e3/o/2012/05/16/e3f0e30f070b591daf76292cbc92802e_lg.jpg",
"thumbnail": "https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcSajRmlMKctLTTGJ9AHOCN2mNHHA7hkBFBds7dYNa-QHJMA5FGy",
"in_stock": false,
"position": 10
},
{
"title": "Danny DeVito β Stock Editorial Photo Β© s_bukley #15181375",
"link": "https://depositphotos.com/editorial/danny-devito-15181375.html",
"source": "DepositPhotos",
"original_thumbnail": "https://st.depositphotos.com/1814084/1615/i/450/depositphotos_16159139-stock-photo-danny-devito.jpg",
"thumbnail": "https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcQTzkuTa4rcxaAuU06trTnq9nUlS0qd4hxb8O8P4MYNXWSHtSU8",
"in_stock": false,
"position": 11
}
]
}