Your personal API key. Available on your dashboard
Type: String
query
required
This is a Google Search Query. Example1 - query=pizza
results
Number of results you want to scrape. Its value could be anything between 1 and 100.
Default Value - 10
Type - String
country
page
This is the page number of Google searches. Its value can be 0 for the first page, 1 for the second page, and so on.
Default Value - 0
Type - String
domain
To obtain local results from a specific country, for example, for India, it will be "google.co.in," and for the UK, it will be "google.co.uk".
Type: String
Default: "google.com"
language
Language of the results. Possible Values - en, es, fr, de, etc.
Default Value - en
Type - String
lr
Type: String Limit the search to one or multiple languages.
It is used as lang_{language code}.
For example - "lang_us"
result_time
The "tbs" parameter is often accompanied by additional parameters that define specific search options.
These options can include parameters such as time range, language, country, file type, and more. Possible Value - qdr:d
Type - String
tbs
to be searched - An advanced parameter to filter search results.
Type: String
safe
To filter the adult content set safe to active or to disable it set off.
Type: String [active/off]
Default: off
nfpr
Type: Boolean
Default: 0
It excludes the result from an auto-corrected query that is spelled wrong. It can be set to 1 to exclude these results or 0 to include them.
chips
Type: String
Used to filter image results. They are provided under the section suggested_searches when ijn=0
import requestsapi_key ="5eaa61a6e562fc52fe763tr516e4653"url ="https://api.scrapingdog.com/google_images"params ={"api_key": api_key,"query":"football","results":10,"country":"us"}response = requests.get(url, params=params)if response.status_code ==200: data = response.json()print(data)else:print(f"Request failed with status code: {response.status_code}")
constaxios=require('axios');constapi_key='5eaa61a6e562fc52fe763tr516e4653';consturl='https://api.scrapingdog.com/google_images';constparams= { api_key: api_key, query:'football', results:10, country:'us'};axios.get(url, { params: params }).then(function (response) {if (response.status ===200) {constdata=response.data;console.log(data) } else {console.log('Request failed with status code: '+response.status); } }).catch(function (error) {console.error('Error making the request: '+error.message); });
<?php// Set the API key and request parameters$api_key ='5eaa61a6e562fc52fe763tr516e4653';$query ='football';$results =10;$country ='us';// Set the API endpoint$url ='https://api.scrapingdog.com/google_images/?api_key='. $api_key .'&query='. $query .'&results='. $results .'&country='. $country;// Initialize cURL session$ch =curl_init($url);// Set cURL optionscurl_setopt($ch, CURLOPT_RETURNTRANSFER,true);// Execute the cURL request$response =curl_exec($ch);// Check if the request was successfulif ($response ===false) {echo'cURL error: '.curl_error($ch);} else {// Process the response data as neededecho $response;}// Close the cURL sessioncurl_close($ch);
require'net/http'require'uri'# Set the API key and request parametersapi_key ='5eaa61a6e562fc52fe763tr516e4653'query ='football'results =10country ='us'# Construct the API endpoint URLurl =URI.parse("https://api.scrapingdog.com/google_images/?api_key=#{api_key}&query=#{query}&results=#{results}&country=#{country}")# Create an HTTP GET requestrequest =Net::HTTP::Get.new(url)# Create an HTTP clienthttp =Net::HTTP.new(url.host, url.port)http.use_ssl =true# Enable SSL (https)# Send the request and get the responseresponse = http.request(request)# Check if the request was successfulif response.is_a?(Net::HTTPSuccess)puts response.body # Process the response data as neededelseputs"HTTP request failed with code: #{response.code}, message: #{response.message}"end
importjava.io.BufferedReader;importjava.io.InputStreamReader;importjava.net.HttpURLConnection;importjava.net.URL;importjava.io.IOException;publicclassMain {publicstaticvoidmain(String[] args) {try {// Set the API key and request parametersString apiKey ="5eaa61a6e562fc52fe763tr516e4653";String query ="football";int results =10;String country ="us";// Construct the API endpoint URLString apiUrl ="https://api.scrapingdog.com/google_news/?api_key="+ apiKey+"&query="+ query+"&results="+ results+"&country="+ country// Create a URL object from the API URL stringURL url =newURL(apiUrl);// Open a connection to the URLHttpURLConnection connection = (HttpURLConnection) url.openConnection();// Set the request method to GETconnection.setRequestMethod("GET");// Get the response codeint responseCode =connection.getResponseCode();if (responseCode ==200) {// Read the response from the connectionBufferedReader reader =newBufferedReader(new InputStreamReader(connection.getInputStream()));String inputLine;StringBuilder response =newStringBuilder();while ((inputLine =reader.readLine()) !=null) {response.append(inputLine); }reader.close();// Process the response data as neededSystem.out.println(response.toString()); } else {System.out.println("HTTP request failed with response code: "+ responseCode); }// Close the connectionconnection.disconnect(); } catch (IOException e) {e.printStackTrace(); } }}
Response
{"image_results": [ {"image":"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcS_Tu78LWxIu_M_sN_kMfj2guqIbu2VcSLyI84CQGbuFRIyTCVR&s","title":"Football - Wikipedia","source":"en.wikipedia.org","link":"https://en.wikipedia.org/wiki/Football","original":"https://upload.wikimedia.org/wikipedia/commons/b/b9/Football_iu_1996.jpg","rank":1 }, {"image":"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTxvsz_pjLnFyCnYyCxxY5rSHQCHjNJyYGFZqhQUtTm0XOzOWw&s","title":"Soft toy, American football/brown - IKEA","source":"www.ikea.com · In stock","link":"https://www.ikea.com/us/en/p/oenskad-soft-toy-american-football-brown-90506769/","original":"https://www.ikea.com/us/en/images/products/oenskad-soft-toy-american-football-brown__0982285_pe815602_s5.jpg","rank":2 }, {"image":"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTNJYuYBLrUxLrXkbnP18Y6DEgKf_H4HYGCzecsGRAoFtkiGEM&s","title":"NFL postpones three games due to Covid ...","source":"www.cnbc.com","link":"https://www.cnbc.com/2021/12/17/nfl-will-postpone-some-games-over-covid-surge-source-says.html","original":"https://image.cnbcfm.com/api/v1/image/106991253-1639786378304-GettyImages-1185558312r.jpg?v=1639786403","rank":3 }, {"image":"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTg4WJ88A83JqXwGXsWtiB5qSoHrU_RukbrfXdkWggEKMsJ5Ro1&s","title":"USFL schedule Week 2: What football ...","source":"www.sportingnews.com","link":"https://www.sportingnews.com/us/nfl/news/usfl-schedule-week-2-football-tv-channels-times-scores/oadvrtsc5vn9l4knu8hvnpo0","original":"https://library.sportingnews.com/2022-04/usfl-football-042122-getty-ftr.jpg","rank":4 }, {"image":"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTsOPQ2-nzsTrdRK1HHXIqB-x96yuiPg7pwfJsm8mToVlw5-UaM&s","title":"Why is football called 'football'?","source":"www.newsnationnow.com","link":"https://www.newsnationnow.com/us-news/hold-why-is-football-called-football/","original":"https://www.newsnationnow.com/wp-content/uploads/sites/108/2022/02/FootballGettyImages-78457130.jpg?w=1280","rank":5 }, {"image":"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcS0WimlY0Nykjy8k5An6k4wViDvyVZzo_0K1MSZNZcwDFGsugNW&s","title":"The Duke NFL Football | Wilson Sporting ...","source":"www.wilson.com · In stock","link":"https://www.wilson.com/en-gb/product/the-duke-nfl-football-wf10011","original":"https://www.wilson.com/en-gb/media/catalog/product/b/c/bc340309-c2a3-441d-ac36-a26187fd94f0_yceho2py9sgzklxk.png","rank":6 }, {"image":"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ6ZuMtA_I4WZZKXPhiqMpIHsdKJX-SVkcN2yo1KAQ9SQuxdCI&s","title":"National Football League","source":"www.nfl.com","link":"https://www.nfl.com/","original":"https://static.www.nfl.com/image/private/t_editorial_landscape_mobile/f_auto/league/iaesayubxpbxmbxfwm3b.jpg","rank":7 }, {"image":"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTBsiF6SkhqAc0yJt-uNXVPpo8bvS-cgcnv6NbXGGJf6DuvH0A&s","title":"Who Invented (American) Football - HISTORY","source":"www.history.com","link":"https://www.history.com/news/who-invented-football","original":"https://www.history.com/.image/ar_4:3%2Cc_fill%2Ccs_srgb%2Cfl_progressive%2Cq_auto:good%2Cw_1200/MTgyODAxOTQ1NzM4NjE4Mjc1/whoinventedfootball.jpg","rank":8 }, {"image":"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcR8xdCSnDPsO1wgzP55WJW3EgsTaA03snLx87YZH7vH1tftK973&s","title":"NCAA Football - College Football News ...","source":"www.cbssports.com","link":"https://www.cbssports.com/college-football/","original":"https://sportshub.cbsistatic.com/i/r/2022/06/23/1d4d3695-76d3-4ec4-900a-c95a21ee6736/thumbnail/450x253/f9e52fd2041021143dec867fce61ff8b/quinn-ewers-ut-spring-getty.jpg","rank":9 }, {"image":"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRYoOyUNPtfEHupSubUij7_88Tj-FD0slK2WJGANAP0igxgaGc&s","title":"Football | Videos | Watch ESPN","source":"www.espn.com","link":"https://www.espn.com/watch/catalog/60459870-f8fc-3b3a-a6b9-d8af4bf19223/football","original":"https://artwork.espncdn.com/categories/60459870-f8fc-3b3a-a6b9-d8af4bf19223/1x1Feature/1440_201903062025.jpg","rank":10 }, ] }