Google Shopping API
The Google Shopping Results API scrapes the and position , title , link , product_link , source ,price , rating , badge , store_rating , store_review ,store_badge , thumbnail , delivery , comparison_link , extensions fields of a shopping result.
JSON structure overview
{
"organic": [
{
"position": 1,
"title": "Blue Bell Dutch Chocolate Ice Cream - 1 PT",
"link": "https://www.google.com/url?url=https://www.heb.com/product-detail/2739064%3FshoppingStore%3D202&rct=j&q=&esrc=s&sa=U&ved=0ahUKEwiN5bKniYv_AhXXD1kFHRN8BEkQ_uQECLsG&usg=AOvVaw3p6InLPt7fVbJBxNuTo8BU",
"product_link": "https://www.google.com/shopping/product/13958632962165362599?q=chocolate+ice+cream&uule=w+CAIQICIaQXVzdGluLFRleGFzLFVuaXRlZCBTdGF0ZXM%3D&hl=en&gl=US&num=25&ie=UTF-8&filter=0&prds=eto:3346427125630552455_0,local:1,pid:3562999364707421153,prmr:2,rsk:PC_13650424048191343193&sa=X&ved=0ahUKEwiN5bKniYv_AhXXD1kFHRN8BEkQ8gIItwYoAA",
"source": "H-E-B",
"price": "$4.13",
"rating": "4.7 out of 5 stars. 4,393 product reviews.",
"badge": "CURBSIDE",
"store_rating": "4.5 out of 5 stars store rating",
"store_review": "(306 store reviews ) ",
"store_badge": null,
"thumbnail": false,
"delivery": "10.1 mi \u00b7 In stock",
"comparison_link": "https://www.google.com/shopping/product/13958632962165362599/offers?q=chocolate+ice+cream&uule=w+CAIQICIaQXVzdGluLFRleGFzLFVuaXRlZCBTdGF0ZXM%3D&hl=en&gl=US&num=25&ie=UTF-8&filter=0&prds=eto:3346427125630552455_0,local:1,pid:3562999364707421153,prmr:2,rsk:PC_13650424048191343193&sa=X&ved=0ahUKEwiN5bKniYv_AhXXD1kFHRN8BEkQ3q4ECMAG",
"extensions": []
}
]
}
Results for: chocolate ice cream
https://api.serphouse.com/serp/live?q=chocolate+ice+cream&domain=google.com&lang=en&device=desktop&serp_type=shop&loc=Austin,Texas,United States&loc_id=1026201&verbatim=0&gfilter=0&page=1&num_result=100

Curl
Ruby
Python
Node.js
PHP
Java
GO
Curl
curl -X POST \
https://api.serphouse.com/serp/live \
-H 'accept: application/json' \
-H 'authorization: Bearer API_TOKEN' \
-H 'content-type: application/json' \
-d '{
"data": {
"domain":"google.com",
"lang":"en",
"q": "chocolate ice cream",
"loc":"Texas,United States",
"device": "desktop",
"serp_type": "shop"
}
}'
Ruby
require 'uri'
require 'net/http'
url = URI("https://api.serphouse.com/serp/live")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["accept"] = 'application/json'
request["content-type"] = 'application/json'
request["authorization"] = 'Bearer API_TOKEN'
request.body = '{"data": {
"domain": "google.com",
"lang": "en",
"q": "chocolate ice cream",
"loc": "Texas,United States",
"device": "desktop",
"serp_type": "shop"
}}'
response = http.request(request)
puts response.read_body
Python
import requests, json
url = "https://api.serphouse.com/serp/live"
payload = json.dumps({
"data": {
"domain": "google.com",
"lang": "en",
"q": "chocolate ice cream",
"loc": "Texas,United States",
"device": "desktop",
"serp_type": "shop"
}
})
headers = {
'accept': "application/json",
'content-type': "application/json",
'authorization': "Bearer API_TOKEN"
}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
Node.js
var axios = require('axios');
var data = JSON.stringify({
data: {
domain: 'google.com',
lang: 'en',
q: 'chocolate ice cream',
loc: 'Texas,United States',
device: 'desktop',
serp_type: 'web'
}
});
var config = {
"method": "POST",
"url": "https://api.serphouse.com/serp/live",
"headers": {
"content-type": "application/json",
"authorization": "Bearer API_TOKEN"
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error){
console.log(error);
});
PHP
$client = new GuzzleHttp\Client();
$headers= [
'Authorization' => 'Bearer API_TOKEN',
'Content-Type' => 'Application/json',
];
$body = '{
"data" : {
"domain": "google.com",
"lang": "en",
"q": "chocolate ice cream",
"loc": "Texas,United States",
"device": "desktop",
"serp_type": "shop"
}}';
$request = new GuzzleHttp\Psr7\Request('POST','https://api.serphouse.com/serp/live', $headers, $body);
$res = $client->sendAsync($request)->wait();
Java
OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{'data': { " +
"'domain': 'google.com',"+
"'lang': 'en',"+
"'q': 'chocolate ice cream',"+
"'loc': 'Texas,United States',"+
"'device': 'desktop',"+
"'serp_type': 'shop'}}"
);
Request request = new Request.Builder()
.url("https://api.serphouse.com/serp/live")
.method("POST", body)
.addHeader("content-type", "application/json")
.addHeader("authorization", "Bearer API_TOKEN")
.build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());
GO
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.serphouse.com/serp/live"
payload := strings.NewReader(`{"data": {
"domain":"google.com",
"lang": "en",
"q": "chocolate ice cream",
"loc": "Texas,United States",
"device": "desktop",
"serp_type": "shop"}}
`)
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("accept", "application/json")
req.Header.Add("content-type", "application/json")
req.Header.Add("authorization", "Bearer API_TOKEN")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
{
...
"organic": [
{
"position": 1,
"title": "Blue Bell Dutch Chocolate Ice Cream - 1 PT",
"link": "https://www.google.com/url?url=https://www.heb.com/product-detail/2739064%3FshoppingStore%3D202&rct=j&q=&esrc=s&sa=U&ved=0ahUKEwiN5bKniYv_AhXXD1kFHRN8BEkQ_uQECLsG&usg=AOvVaw3p6InLPt7fVbJBxNuTo8BU",
"product_link": "https://www.google.com/shopping/product/13958632962165362599?q=chocolate+ice+cream&uule=w+CAIQICIaQXVzdGluLFRleGFzLFVuaXRlZCBTdGF0ZXM%3D&hl=en&gl=US&num=25&ie=UTF-8&filter=0&prds=eto:3346427125630552455_0,local:1,pid:3562999364707421153,prmr:2,rsk:PC_13650424048191343193&sa=X&ved=0ahUKEwiN5bKniYv_AhXXD1kFHRN8BEkQ8gIItwYoAA",
"source": "H-E-B",
"price": "$4.13",
"rating": "4.7 out of 5 stars. 4,393 product reviews.",
"badge": "CURBSIDE",
"store_rating": "4.5 out of 5 stars store rating",
"store_review": "(306 store reviews ) ",
"store_badge": null,
"thumbnail": false,
"delivery": "10.1 mi \u00b7 In stock",
"comparison_link": "https://www.google.com/shopping/product/13958632962165362599/offers?q=chocolate+ice+cream&uule=w+CAIQICIaQXVzdGluLFRleGFzLFVuaXRlZCBTdGF0ZXM%3D&hl=en&gl=US&num=25&ie=UTF-8&filter=0&prds=eto:3346427125630552455_0,local:1,pid:3562999364707421153,prmr:2,rsk:PC_13650424048191343193&sa=X&ved=0ahUKEwiN5bKniYv_AhXXD1kFHRN8BEkQ3q4ECMAG",
"extensions": []
},
{
"position": 2,
"title": "Great Value Ice Cream, Chocolate - 48 fl oz",
"link": "https://www.google.com/url?url=https://www.walmart.com/ip/Great-Value-Chocolate-Ice-Cream-48-fl-oz/12329734%3Fwl13%3D1185%26selectedSellerId%3D0&rct=j&q=&esrc=s&sa=U&ved=0ahUKEwiN5bKniYv_AhXXD1kFHRN8BEkQ_uQECM4G&usg=AOvVaw1PA83VItr-uKYdmZvl-mFi",
"product_link": "https://www.google.com/shopping/product/6929452485811696152?q=chocolate+ice+cream&uule=w+CAIQICIaQXVzdGluLFRleGFzLFVuaXRlZCBTdGF0ZXM%3D&hl=en&gl=US&num=25&ie=UTF-8&filter=0&prds=eto:213841110917714352_0,local:1,pid:7433846593505616655,prmr:2,rsk:PC_13018495068887091966&sa=X&ved=0ahUKEwiN5bKniYv_AhXXD1kFHRN8BEkQ8gIIyAYoAA",
"source": "Walmart",
"price": "$2.67",
"rating": "3.8 out of 5 stars. 179 product reviews.",
"badge": "LOW PRICE",
"store_rating": "4.4 out of 5 stars store rating",
"store_review": "(1K ) ",
"store_badge": "Trusted store",
"thumbnail": false,
"delivery": "11.4 mi \u00b7 In stock \u00b7 Curbside",
"comparison_link": null,
"extensions": ["Kosher"]
}
...
}
Results for: milk
https://api.serphouse.com/serp/live?q=milk&domain=google.com&lang=en&device=desktop&serp_type=shop&loc=Austin,Texas,United States&loc_id=1026201&verbatim=0&gfilter=0&page=1&num_result=100

Curl
Ruby
Python
Node.js
PHP
Java
GO
Curl
curl -X POST \
https://api.serphouse.com/serp/live \
-H 'accept: application/json' \
-H 'authorization: Bearer API_TOKEN' \
-H 'content-type: application/json' \
-d '{
"data": {
"domain":"google.com",
"lang":"en",
"q": "milk",
"loc":"Texas,United States",
"device": "desktop",
"serp_type": "shop"
}
}'
Ruby
require 'uri'
require 'net/http'
url = URI("https://api.serphouse.com/serp/live")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["accept"] = 'application/json'
request["content-type"] = 'application/json'
request["authorization"] = 'Bearer API_TOKEN'
request.body = '{"data": {
"domain": "google.com",
"lang": "en",
"q": "milk",
"loc": "Texas,United States",
"device": "desktop",
"serp_type": "shop"
}}'
response = http.request(request)
puts response.read_body
Python
import requests, json
url = "https://api.serphouse.com/serp/live"
payload = json.dumps({
"data": {
"domain": "google.com",
"lang": "en",
"q": "milk",
"loc": "Texas,United States",
"device": "desktop",
"serp_type": "shop"
}
})
headers = {
'accept': "application/json",
'content-type': "application/json",
'authorization': "Bearer API_TOKEN"
}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
Node.js
var axios = require('axios');
var data = JSON.stringify({
data: {
domain: 'google.com',
lang: 'en',
q: 'milk',
loc: 'Texas,United States',
device: 'desktop',
serp_type: 'web'
}
});
var config = {
"method": "POST",
"url": "https://api.serphouse.com/serp/live",
"headers": {
"content-type": "application/json",
"authorization": "Bearer API_TOKEN"
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error){
console.log(error);
});
PHP
$client = new GuzzleHttp\Client();
$headers= [
'Authorization' => 'Bearer API_TOKEN',
'Content-Type' => 'Application/json',
];
$body = '{
"data" : {
"domain": "google.com",
"lang": "en",
"q": "milk",
"loc": "Texas,United States",
"device": "desktop",
"serp_type": "shop"
}}';
$request = new GuzzleHttp\Psr7\Request('POST','https://api.serphouse.com/serp/live', $headers, $body);
$res = $client->sendAsync($request)->wait();
Java
OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{'data': { " +
"'domain': 'google.com',"+
"'lang': 'en',"+
"'q': 'milk',"+
"'loc': 'Texas,United States',"+
"'device': 'desktop',"+
"'serp_type': 'shop'}}"
);
Request request = new Request.Builder()
.url("https://api.serphouse.com/serp/live")
.method("POST", body)
.addHeader("content-type", "application/json")
.addHeader("authorization", "Bearer API_TOKEN")
.build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());
GO
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.serphouse.com/serp/live"
payload := strings.NewReader(`{"data": {
"domain":"google.com",
"lang": "en",
"q": "milk",
"loc": "Texas,United States",
"device": "desktop",
"serp_type": "shop"}}
`)
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("accept", "application/json")
req.Header.Add("content-type", "application/json")
req.Header.Add("authorization", "Bearer API_TOKEN")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
{
...
"organic": [
{
"position": 1,
"title": "Great Value Milk, Vitamin D, Whole - 1 gal (3.78 l)",
"link": "https://www.google.com/url?url=https://www.walmart.com/ip/Great-Value-Whole-Vitamin-D-Milk-Gallon-128-fl-oz/10450114%3Fwl13%3D1185%26selectedSellerId%3D0&rct=j&q=&esrc=s&sa=U&ved=0ahUKEwjQiJTujIv_AhXYk2oFHSqNASwQ_uQECIQG&usg=AOvVaw0m1mumUk3O_hZtJdVSUAJ1",
"product_link": "https://www.google.com/shopping/product/17338050040973145255?q=milk&uule=w+CAIQICIaQXVzdGluLFRleGFzLFVuaXRlZCBTdGF0ZXM%3D&hl=en&gl=US&num=25&ie=UTF-8&filter=0&prds=eto:4870515989877479740_0,local:1,pid:12341851109919099803,prmr:2,rsk:PC_422257538129698037&sa=X&ved=0ahUKEwjQiJTujIv_AhXYk2oFHSqNASwQ8gII_gUoAA",
"source": "Walmart",
"price": "$3.22",
"rating": "2.8 out of 5 stars. 2,145 product reviews.",
"badge": "LOW PRICE",
"store_rating": "4.4 out of 5 stars store rating",
"store_review": "(1K ) ",
"store_badge": "Trusted store",
"thumbnail": false,
"delivery": "11.4 mi \u00b7 In stock \u00b7 Curbside",
"comparison_link": "https://www.google.com/shopping/product/17338050040973145255/offers?q=milk&uule=w+CAIQICIaQXVzdGluLFRleGFzLFVuaXRlZCBTdGF0ZXM%3D&hl=en&gl=US&num=25&ie=UTF-8&filter=0&prds=eto:4870515989877479740_0,local:1,pid:12341851109919099803,prmr:2,rsk:PC_422257538129698037&sa=X&ved=0ahUKEwjQiJTujIv_AhXYk2oFHSqNASwQ3q4ECI0G",
"extensions": ["Gallon", "Gluten-free"]
}
]
...
}