Google Shopping Scraper - A tool to scrape Google Shopping product search results with a simple API. Get product information like title, price, rating, reviews, seller, delivery options, and more.
We provide the results in a structured JSON format, eliminating the need for parsing, coding, proxies, or any other web scraping headaches for developers.
Using a simple GET request, you can retrieve Google Shopping search results:
https://serpapi.com/search.json?engine=google_shopping&q=iPhone&api_key=YOUR_API_KEY
- Register for free at SerpApi to get your API Key
qparameter: defines the search query you want to search on Google Shopping.
Here are some code examples based on your favorite programming languages.
curl --get https://serpapi.com/search \
-d engine="google_shopping" \
-d q="iPhone" \
-d api_key="secret_api_key"Step 1:
Create a new main.py file.
Step 2: Install requests package with:
pip install requests
Step 3: Add this code to your file:
import requests
SERPAPI_API_KEY = "YOUR_SERPAPI_API_KEY"
params = {
"api_key": SERPAPI_API_KEY,
"engine": "google_shopping",
"q": "iPhone"
}
search = requests.get("https://serpapi.com/search", params=params)
response = search.json()
print(response)If you're only interested in the shopping_results, you can print them from the response directly:
print(response["shopping_results"])Step 1: Install the SerpApi JavaScript package:
npm install serpapi
Step 2:
Create a new index.js file.
Step 3: Add this to your file:
const { getJson } = require("serpapi");
getJson({
api_key: API_KEY,
engine: "google_shopping",
q: "iPhone"
}, (json) => {
console.log(json["shopping_results"]);
});While you can use our APIs using a simple GET request with any programming language, you can also see our ready-to-use libraries here: SerpApi Integrations.
Please find the parameters for the Google Shopping API below:
| Name | Description | Requirement |
|---|---|---|
| q | Parameter defines the search query | Required |
| Localization | ||
| location | Parameter defines the search origin location (city-level recommended) | Optional |
| google_domain | Parameter defines the Google domain to use. Defaults to google.com |
Optional |
| gl | Parameter defines the two-letter country code | Optional |
| hl | Parameter defines the two-letter language code | Optional |
| Filters | ||
| min_price | Parameter defines the minimum price boundary | Optional |
| max_price | Parameter defines the maximum price boundary | Optional |
| free_shipping | Parameter to filter for free shipping products | Optional |
| on_sale | Parameter to filter for products on sale | Optional |
| small_business | Parameter to filter for small business products | Optional |
| Sorting | ||
| sort_by | Parameter defines sort option: 1 (low to high), 2 (high to low) |
Optional |
| Pagination | ||
| start | Parameter defines the result offset for pagination | Optional |
| Advanced | ||
| device | Parameter defines the device: desktop (default), tablet, or mobile |
Optional |
Visit our documentation for more information on all available parameters.
Google Shopping can return different information from time to time. Here is what the shopping_results array may contain:
"shopping_results": [
{
"position": "Integer - Position of the result on the page",
"title": "String - Title of the product",
"link": "String - URL to the product page",
"product_link": "String - URL to the Google Shopping product page",
"product_id": "String - Google Shopping product ID",
"source": "String - Seller/retailer name",
"price": "String - Product price text",
"extracted_price": "Float - Numeric price value",
"rating": "Float - Product rating (out of 5)",
"reviews": "Integer - Number of reviews",
"thumbnail": "String - URL to the product thumbnail",
"delivery": "String - Delivery information",
"extensions": "Array - Additional product features (discounts, delivery options)"
}
],The API response also includes:
inline_shopping_results: Top product listings with pricingcategorized_shopping_results: Products grouped by categoryfilters: Refinement options with shoprs tokenscarousel_filters: Quick filter suggestionsserpapi_pagination: Navigation links for result pages
Here are some use cases for the Google Shopping API:
- Build price comparison tools by scraping product prices across different sellers.
- Monitor competitor pricing and track price changes over time.
- Create product research tools to analyze market trends and popular products.
- Build affiliate marketing applications by gathering product data with links.
- Analyze product ratings and reviews for market research.
- Create deal-finding tools by filtering for products on sale.
- How to Scrape Google Shopping Results
- Scrape Google Shopping Tab with Python
- Filtering Google Shopping results
Interesting use cases:
- How to Build an AI-Powered Product Recommendation App Using SerpApi
- Scraping Product Details from Walmart, Home Depot and Google Shopping with SerpApi
- Scrape Product Detail Information from Google Shopping
- Scrape Product Data from Google Shopping (e-commerce)
- Google Shopping scraper - Scrape shopping data to Excel (NoCode)
- Scrape Google Shopping data using Python and simple API
Feel free to reach out via contact@serpapi.com.
Check other Google Scrapers from SerpApi.
