Scrapingdog
HomePricingSupportLogin
  • Documentation
  • Web Scraping API
    • Request Customization
      • Javascript Rendering
        • Wait when rendering Javascript
      • Custom Headers
      • Premium Residential Proxies
      • Geotargeting
      • Sessions
  • POST Request
  • Google Search Scraper API
    • Google Country Parameter: Supported Google Countries
    • Supported Google Countries via cr parameter
    • Google Domains Page
    • Google Language Page
    • Google LR Language Page
  • Google AI Overview API
  • Google Maps API
    • Google Maps Posts API
    • Google Maps Photos API
    • Google Maps Reviews API
    • Google Maps Places API
  • Google Trends API
    • Google Trends Autocomplete API
    • Google Trends Trending Now API
  • Google Images API
  • Google News API
    • Google News API 2.0
  • Google Shopping API
  • Google Product API
  • Google Videos API
  • Google Shorts API
  • Google Autocomplete API
  • Google Scholar API
    • Google Scholar Profiles API
    • Google Scholar Author API
      • Google Scholar Author Citation API
    • Google Scholar Cite API
  • Google Finance API
  • Google Lens API
  • Google Jobs API
  • Google Local API
  • Google Patents API
    • Google Patent Details API
  • Bing Search Scraper API
  • Amazon Scraper API
    • Amazon Product Scraper
    • Amazon Search Scraper
    • Amazon Reviews API
    • Amazon Autocomplete Scraper
  • Instagram Scraper API
  • Linkedin Scraper API
    • Person Profile Scraper
    • Company Profile Scraper
  • Linkedin Jobs Scraper
    • Scrape Linkedin Jobs
    • Scrape LinkedIn Job Overview
  • Yelp Scraper API
  • Twitter Scraping API
    • X Scraping API 2.0
  • Indeed Scraper API
  • Zillow Scraper API
  • Youtube Scraper API
    • Youtube Search API
    • YouTube Transcripts API
    • YouTube Channel API
  • Walmart Scraper API
    • Walmart Product Scraper
    • Walmart Search Scraper
    • Walmart Reviews Scraper
  • Screenshot API
  • Webhook Integration
  • Datacenter Proxies
  • Account API
Powered by GitBook
On this page
  • Parameters
  • API Example
  • Response

Google Shopping API

Using Google Shopping API you can scrape Google Shopp results without worrying about proxy rotation and data parsing. Our API is fast and reliable. Each successful request will cost you 5 API credits.

PreviousGoogle News API 2.0NextGoogle Product API

Last updated 11 days ago

You have to send a GET request to http://api.scrapingdog.com/google_shopping with the below-given parameters.

Google Shopping API pricing is available .

Parameters

Parameter
Description

api_key

required

Your personal API key. Available on your dashboard Type: String

query

required

This can be any Google query or a complete Google URL. Example1 - query=shoes

country

Type - String

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"

shoprs

This parameter specifies the helper ID used to apply search filters. To ensure filters work correctly, it must be used together with the updated q parameter, which includes the name of the selected filter alongside your original query.

Example:

  • Original query: Coffee

  • After applying the "Sugar Free" filter: sugar free Coffee

To apply a filter, use the scrapingdog_link found in the JSON response at filters[index].options[index].scrapingdog_link.

To apply multiple filters, follow each filter’s scrapingdog_link individually. Each subsequent request will retain the previously applied filters along with the newly added one. To remove a filter, use its associated scrapingdog_link.

uule

It is a parameter that specifies the geographic location or locale for which the search results should be tailored. Possible Value could be w+CAIQIFJlbGF5IFN0YXRlcw==

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

It can be set to 1 to exclude these results or 0 to include them. Type: Boolean

Default: 0 It excludes the result from an auto-corrected query that is spelled wrong.

html

To render the response as raw HTML.

Type: Boolean Default: false

API Example

curl "https://api.scrapingdog.com/google_shopping/?api_key=5eaa61a6e562fc52fe763tr516e4653&query=shoes&results=10&country=in"
import requests

api_key = "5eaa61a6e562fc52fe763tr516e4653"
url = "https://api.scrapingdog.com/google_shopping"

params = {
    "api_key": api_key,
    "query": "shoes",
    "results": 10,
    "country": "in"
}

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}")
const axios = require('axios');

const api_key = '5eaa61a6e562fc52fe763tr516e4653';
const url = 'https://api.scrapingdog.com/google_shopping';

const params = {
  api_key: api_key,
  query: 'shoes',
  results: 10,
  country: 'in'
};

axios
  .get(url, { params: params })
  .then(function (response) {
    if (response.status === 200) {
      const data = 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 = 'shoes';
$results = 10;
$country = 'in';

// Set the API endpoint
$url = 'https://api.scrapingdog.com/google_shopping/?api_key=' . $api_key . '&query=' . $query . '&results=' . $results . '&country=' . $country;

// Initialize cURL session
$ch = curl_init($url);

// Set cURL options
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

// Execute the cURL request
$response = curl_exec($ch);

// Check if the request was successful
if ($response === false) {
    echo 'cURL error: ' . curl_error($ch);
} else {
    // Process the response data as needed
    echo $response;
}

// Close the cURL session
curl_close($ch);
require 'net/http'
require 'uri'

# Set the API key and request parameters
api_key = '5eaa61a6e562fc52fe763tr516e4653'
query = 'shoes'
results = 10
country = 'in'

# Construct the API endpoint URL
url = URI.parse("https://api.scrapingdog.com/google_shopping/?api_key=#{api_key}&query=#{query}&results=#{results}&country=#{country}")

# Create an HTTP GET request
request = Net::HTTP::Get.new(url)

# Create an HTTP client
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true # Enable SSL (https)

# Send the request and get the response
response = http.request(request)

# Check if the request was successful
if response.is_a?(Net::HTTPSuccess)
  puts response.body # Process the response data as needed
else
  puts "HTTP request failed with code: #{response.code}, message: #{response.message}"
end
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.IOException;

public class Main {
    public static void main(String[] args) {
        try {
            // Set the API key and request parameters
            String apiKey = "5eaa61a6e562fc52fe763tr516e4653";
            String query = "shoes";
            int results = 10;
            String country = "in";

            // Construct the API endpoint URL
            String apiUrl = "https://api.scrapingdog.com/google_shopping/?api_key=" + apiKey
                    + "&query=" + query
                    + "&results=" + results
                    + "&country=" + country

            // Create a URL object from the API URL string
            URL url = new URL(apiUrl);

            // Open a connection to the URL
            HttpURLConnection connection = (HttpURLConnection) url.openConnection();

            // Set the request method to GET
            connection.setRequestMethod("GET");

            // Get the response code
            int responseCode = connection.getResponseCode();

            if (responseCode == 200) {
                // Read the response from the connection
                BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
                String inputLine;
                StringBuilder response = new StringBuilder();

                while ((inputLine = reader.readLine()) != null) {
                    response.append(inputLine);
                }
                reader.close();

                // Process the response data as needed
                System.out.println(response.toString());
            } else {
                System.out.println("HTTP request failed with response code: " + responseCode);
            }

            // Close the connection
            connection.disconnect();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}

Response

{
  "meta": {
    "api_key": "APIKEY",
    "q": "shoes",
    "gl": "in"
  },
  "filters": [
    {
      "type": "Price",
      "options": [
        {
          "text": "Up to $10",
          "tbs": "mr:1,price:1,ppr_max:10"
        },
        {
          "text": "$10 – $25",
          "tbs": "mr:1,price:1,ppr_min:10,ppr_max:25"
        },
        {
          "text": "$25 – $50",
          "tbs": "mr:1,price:1,ppr_min:25,ppr_max:50"
        },
        {
          "text": "$50 – $100",
          "tbs": "mr:1,price:1,ppr_min:50,ppr_max:100"
        },
        {
          "text": "Over $100",
          "tbs": "mr:1,price:1,ppr_min:100"
        }
      ]
    },
    .....
   ],
   "ads": [
    {
      "position": 1,
      "title": "Jet Black (Medium and Extra Wide 4E Available) (Sizes 7-16) Medium (D) / 10.5CA$181.85",
      "link": "https://google.com/aclk?sa=l&ai=DChcSEwjm7dPx6dP5AhUYwsIEHen5B8YYABABGgJwdg&sig=AOD64_0NXIqqoLaeE0blf92DyNSXHBcK3A&ctype=5&q=&ved=0ahUKEwj4utDx6dP5AhWmIDQIHcjwC7QQww8Irw4&adurl=",
      "source": "Zeba Shoes",
      "price": "CA$181.85",
      "thumbnail": "https://encrypted-tbn1.gstatic.com/shopping?q=tbn:ANd9GcR6bB7yuBN2zjyHSGupV7-aSSHq9mM25NO2UqpxlxY2Og4Wl5JoxkFGPGfnAgMxuVEUniRNFg1w6Ntw0ioJAkgR-EqGwPyb3jOQaxbuOOleyBWbQixVhNSp9w&usqp=CAE"
    },
    {
      "position": 2,
      "title": "Fish Slippers Beach Shoes Pool Non-Slip Sandals Men and Women Casual ShoeCA$28.00",
      "link": "https://google.com/aclk?sa=l&ai=DChcSEwjm7dPx6dP5AhUYwsIEHen5B8YYABADGgJwdg&sig=AOD64_0TRpjhmKzAxJtJ8hKCgv--zqOP-g&ctype=5&q=&ved=0ahUKEwj4utDx6dP5AhWmIDQIHcjwC7QQww8Isg4&adurl=",
      "source": "Amazon CA",
      "price": "CA$28.00",
      "thumbnail": "https://encrypted-tbn3.gstatic.com/shopping?q=tbn:ANd9GcQ2W85a9834g1ggN1S4UkccWY3cXT9H5TGO_vUm_F932Qw-kR1UAic73l0SUG4-SA-u7u6zlZ_7VxjF41mQX-55uAuNSh3wdr0hxPHNJXeW_bqbC6pU-2G4&usqp=CAE"
    },
    ....
    ],
    "shopping_results": [
    {
      "position": 1,
      "title": "Nike LeBron XVII Basketball Shoes (White) Size 11",
      "link": "https://www.goat.com/sneakers/lebron-17-air-command-force-bq3177-100%3Fsrsltid%3DAdGWZVQZVSDhUlCTAvb1HQ4hN3Q6FxUkHZZ1m3UPEgiSIkMo9-V7WMehk1c&rct=j&q=&esrc=s&sa=U&ved=0ahUKEwj4utDx6dP5AhWmIDQIHcjwC7QQguUECMYO&usg=AOvVaw2bJdRrq4-ics8g0aX0LLYu",
      "product_link": "https://google.com/shopping/product/14214112555488983868?q=shoes&oq=shoes&gl=us&sourceid=chrome&ie=UTF-8&prds=eto:17557070689024820201_0,pid:6481879233016932111,rsk:PC_16928367288155928171&sa=X&ved=0ahUKEwj4utDx6dP5AhWmIDQIHcjwC7QQ8wIIxA4",
      "product_id": "6481879233016932111",
      "source": "GOAT",
      "price": "$239.00",
      "rating": "4.6",
      "thumbnail": "data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",
      "delivery": "$13.50 delivery",
      "extensions": "LOW PRICE"
    },
    {
      "position": 2,
      "title": "Converse Chuck Taylor All Star Classic High Top (White Size 13) Unisex Canvas Shoes",
      "link": "https://www.converse.com/shop/p/chuck-taylor-all-star-classic-unisex-high-top-shoe/171750F_130.html%3Fcp%3DPLA_PRF_CNV_NA_US_EN_20200429_CPCS_Surfaces_X_X_X_X_Google_X_X_194432988514_X_X_X&rct=j&q=&esrc=s&sa=U&ved=0ahUKEwj4utDx6dP5AhWmIDQIHcjwC7QQguUECNYO&usg=AOvVaw1IOjq4GdI_OaSRpSxPriQ_",
      "product_link": "https://google.com/shopping/product/16525774757933753875?q=shoes&oq=shoes&gl=us&sourceid=chrome&ie=UTF-8&prds=eto:9965886655953646673_0,pid:10340401949653974827&sa=X&ved=0ahUKEwj4utDx6dP5AhWmIDQIHcjwC7QQ8wII1Q4",
      "product_id": "10340401949653974827",
      "source": "Converse",
      "price": "$65.00",
      "thumbnail": "data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",
      "delivery": "Free delivery by Sep 6 & Free 30-day returns"
    },
    ....
    ],
}

This is the of the country from which you are seeking Google search results. Default Value - us

here
ISO code