Skip to content

About

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.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 

Repository files navigation

Google Shopping Scraper

Google Shopping Scraper

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.

How to scrape Google Shopping?

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

Code examples

Here are some code examples based on your favorite programming languages.

cURL Integration

curl --get https://serpapi.com/search \
 -d engine="google_shopping" \
 -d q="iPhone" \
 -d api_key="secret_api_key"

Python Integration

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"])

JavaScript Integration

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"]);
});

Other Programming Languages

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.

Google Shopping Scraper Parameters

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.

Available data on Google Shopping (JSON Response)

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 pricing
  • categorized_shopping_results: Products grouped by category
  • filters: Refinement options with shoprs tokens
  • carousel_filters: Quick filter suggestions
  • serpapi_pagination: Navigation links for result pages

Use cases

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.

Blog tutorial

Interesting use cases:

Video tutorial

Contacts

Feel free to reach out via contact@serpapi.com.

Check other Google Scrapers from SerpApi.

About

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.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors