Google Product API
The Google Product API retrieves detailed Google Shopping product data including pricing, seller offers, specifications, and customer reviews. Each successful request costs 5 API credits.
Endpoint:
https://api.scrapingdog.com/google_productAPI Parameters
🔑
Authentication
api_keyRequiredYour personal API key. Available on your dashboard
Type: String
🔗
Request Parameters
product_idRequiredThe id of the Google Shopping Product you want to get results for. It can be found from the URL:https://www.google.com/shopping/product/product_id
Type: StringcountryOptionalISO code of the country from which you are seeking Google search results. Default:us
Type: StringpageOptionalPage number for pagination (0for first page,1for second, etc.). Used with online sellers and reviews only. Default:0
Type: StringfiltersOptionalParameter for filtering and sorting reviews and offers results
Type: StringuuleOptionalEncodes a place with latitude and longitude into a value used in cookies, URLs, or HTTP headers
Type: StringoffersOptionalSet to1to scrape offers results. Default:0
Type: StringspecsOptionalSet to1to scrape product specifications. Default:0
Type: StringreviewsOptionalSet to1to scrape product reviews. Default:0
Type: String
API Examples
Code to Integrate
curl "https://api.scrapingdog.com/google_product?api_key=APIKEY&product_id=2515929089120399478&country=us"
import requests url = "https://api.scrapingdog.com/google_product" params = { "api_key": "APIKEY", "product_id": "2515929089120399478", "country": "us" } 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_product', { params: { api_key: 'APIKEY', product_id: '2515929089120399478', country: 'us' } }).then(response => console.log(response.data)) .catch(error => console.error(error.message));
<?php $url = 'https://api.scrapingdog.com/google_product/?' . http_build_query([ 'api_key' => 'APIKEY', 'product_id' => '2515929089120399478', 'country' => 'us', ]); $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_product/") url.query = URI.encode_www_form( 'api_key' => 'APIKEY', 'product_id' => '2515929089120399478', 'country' => 'us' ) 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_product/?api_key=APIKEY&product_id=2515929089120399478&country=us"; 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(); } }
API Response
{
"product_results": {
"title": "Google Pixel 6 Pro 5G Unlocked (128GB) - Cloudy White",
"prices": ["$899.00", "$888.00", "$609.99"],
"rating": "3.7"
},
"online_sellers": [
{
"position": 1,
"name": "store.google.com",
"base_price": "$899.00",
"total_price": "$968.67"
},
{
"position": 2,
"name": "www.visible.com",
"base_price": "$888.00",
"total_price": "$956.82"
},
{
"position": 3,
"name": "www.ebay.com",
"base_price": "$609.99",
"total_price": "$657.26"
}
]
}