Google Shopping API
Google Shopping is one of the great sources of data for data miners for research and price tracking. Scrape the latest real-time Google Shopping Results with the help of this API.
Here is the list of default parameters you can use with this API :
Parameters | Description |
---|---|
api_key
required | This is your API key. |
q
required | Type: String
Google Search Query |
num | Type: Number(Integer)
Number of results per page |
gl | |
hl | Type: String
Default Value: "en_us"
The language of the requested results. |
page | Type: Number(Integer)
[0,10,20....]
Default: 0
(Enter 10 for 2nd-page results, 20 for 3rd, etc .)
The page number to get targeted search results. |
lr | Type: String
Limit the search to one or multiple languages.
It is used as lang_{language code} . For example - "lang_us". |
uule | Type: String
Used to encode a place an exact location(with latitude and longitude) into a value used in a cookie, an URL, or an HTTP header. |
duration | Type: String
Use this as "d/w/m/mn/y"
where n is from 0-10 .d - the previous 24 hours, w - the previous seven days, m - the previous month, mn - the previous n number of months, y - past year
The duration parameter requests search results from a specified time period (quick date range). |
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. |
tbs | Type: String
to be searched - An advanced parameter to filter search results. |
safe | Type: String
[active/off]
Default: off
To filter the adult content set safe to active or to disable it set it off . |
html | Type: Boolean
Default: false
To render response as raw HTML. |
cURL
Node JS
Python
Java
Ruby
PHP
cURL "https://api.serpdog.io/shopping?api_key=APIKEY&q=shoes&gl=us"
const axios = require('axios');
axios.get('https://api.serpdog.io/shopping?api_key=APIKEY&q=shoes&gl=us')
.then(response => {
console.log(response.data);
})
.catch(error => {
console.log(error);
});
import requests
payload = {'api_key': 'APIKEY', 'q':'shoes' , 'gl':'us'}
resp = requests.get('https://api.serpdog.io/shopping', params=payload)
print (resp.text)
try {
String url = "https://api.serpdog.io/shopping?api_key=APIKEY&q=shoes&gl=us";
URL urlForGetRequest = new URL(url);
String readLine = null;
HttpURLConnection conection = (HttpURLConnection) urlForGetRequest.openConnection();
conection.setRequestMethod("GET");
int responseCode = conection.getResponseCode();
if (responseCode == HttpURLConnection.HTTP_OK) {
BufferedReader in = new BufferedReader(new InputStreamReader(conection.getInputStream()));
StringBuffer response = new StringBuffer();
while ((readLine = in.readLine()) != null) {
response.append(readLine);
}
in.close();
System.out.println(response.toString());
} else {
throw new Exception("Error in API Call");
}
} catch (Exception ex) {
ex.printStackTrace();
}
require 'net/http'
require 'json'
params = {
:api_key => "APIKEY",
:q=> "shoes",
:gl => "us"
}
uri = URI('https://api.serpdog.io/shopping')
uri.query = URI.encode_www_form(params)
website_content = Net::HTTP.get(uri)
print(website_content)
<?php
$url = "https://api.serpdog.io/shopping?api_key=APIKEY&q=shoes&gl=us";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_HEADER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
$response = curl_exec($ch);
curl_close($ch);
print_r($response);
{
"meta": {
"api_key": "APIKEY",
"q": "shoes",
"gl": "us"
},
"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"
},
....
],
}
Last modified 9mo ago