How to extract product data from Google Shopping: step-by-step
Monitor competitor pricing, track product availability, and analyze trends by extracting data from Google Shopping. This step-by-step guide covers API setup, Python implementation, and compliance best practices.
Skip the scraping stack. Our Google Shopping Scraper API returns live prices, every seller offer, EAN→Google SKU matches, product variants and reviews from 40+ countries in one JSON call — no proxies, parsers or browser farms to maintain.
Want to gather product data from Google Shopping? Here's how to do it quickly and reliably while staying compliant with legal guidelines. This guide covers everything from setup to the exact API calls that return clean, structured data.
Key Takeaways:
- Why extract data? Monitor competitor pricing, track product availability, and analyze trends.
- The reliable way: the ShoppingScraper Google Shopping API returns structured JSON for search, EAN→SKU matching, offers, variants, and reviews — Google's anti-bot handling, proxy rotation and parsing are done for you.
- Why not DIY? Building it yourself means managing residential proxies, rewriting parsers every time Google changes its layout, and absorbing IP blocks — brittle and expensive at scale.
- Compliance tips: respect rate limits, collect only public data, and use an authorized API.
- Step-by-step process: set up Python, call the API for search → match → offers, and organize the data in JSON or CSV.
By the end, you'll know how to extract and manage Google Shopping data efficiently while staying within legal boundaries.
Preparation for Google Shopping Data Extraction
A solid setup before you start reduces mistakes and improves data quality.
Tools and Technologies Needed
The fastest, most reliable route is the ShoppingScraper Google Shopping API. It handles the hard parts — live querying of Google Shopping, proxy rotation, anti-bot handling, and parsing — and returns structured JSON. You send a product query (an EAN/GTIN, a SKU, or a keyword) with a target country, and you get back clean data. No browser farm or proxy pool to run.
All you need to follow this guide:
- Python 3.8+ and the
requestslibrary (pip install requests). - A ShoppingScraper API key — sign up for 100 free API credits, no credit card required. Your key and full endpoint reference live in the API guide.
Why building it yourself rarely pays off
You can scrape Google Shopping directly with an HTML parser, but Google actively blocks automated traffic. Doing it yourself means standing up a residential-proxy pool, rotating IPs, solving anti-bot challenges, and rewriting your parser every time the page layout shifts. That stack breaks often and costs more to maintain than it returns. An authorized API absorbs all of that for you — which is why the rest of this guide uses one.
Ethical and Legal Guidelines
Whichever method you choose, your practices need to comply with ethical and legal standards.
In the U.S., scraping public data is allowed, but you must follow specific rules to stay on the right side of the law:
- Respect rate limits: avoid overwhelming the platform with too many requests.
- Steer clear of sensitive data: only collect publicly available information.
- Use authorized methods: an API like ShoppingScraper collects only public listing data through a sanctioned interface, rather than hammering Google directly.
These steps keep you compliant and ensure responsible data collection. Keep an eye on platform policies and update your practices as needed.
Steps to Extract Google Shopping Data
Extracting data from Google Shopping with the API follows a simple flow: search for a product (or start from an EAN), match the EAN to Google's product ID, then pull offers, variants, and reviews. All calls go to the base URL https://api.shoppingscraper.com and require your api_key.
Setting Up Your Environment
First, make sure you have Python 3.8 or higher. Create a virtual environment to keep dependencies organized:
python -m venv shopping_scraper
source shopping_scraper/bin/activate # For Unix/MacOS
shopping_scraper\Scripts\activate # For Windows
pip install requestsStep 1 — Search Google Shopping by keyword
Use the search endpoint to find products by keyword in any supported country. The country code (nl, de, fr, uk, us, …) goes in the path.
import requests
API_KEY = "your_api_key"
BASE_URL = "https://api.shoppingscraper.com"
def search_google_shopping(keyword, country="nl", page=1):
endpoint = f"{BASE_URL}/search/googleshopping/{country}"
params = {"keyword": keyword, "page": page, "api_key": API_KEY}
return requests.get(endpoint, params=params).json()
results = search_google_shopping("airpods pro 2", country="nl")Each result includes the product title, Google Shopping SKU (catalog ID), price per seller, currency, offer count, and a classification (organic product vs. ad). Cost: 1 credit per request.
Step 2 — Match an EAN/GTIN to the correct Google SKU
A raw barcode search on Google Shopping often returns the wrong product or nothing at all — Google's barcode index is incomplete and noisy. The /match endpoint resolves the real product behind an EAN and returns the correct Google Shopping catalog ID (SKU), which is the reliable key for offers, variants, and reviews.
def match_ean_to_sku(ean, site="shopping.google.nl", deepsearch=False):
endpoint = f"{BASE_URL}/match"
params = {
"site": site,
"ean": ean,
"api_key": API_KEY,
}
if deepsearch:
params["deepsearch"] = "true" # AI fuzzy match for hard cases (4 credits)
return requests.get(endpoint, params=params).json()
match = match_ean_to_sku("8720246689310") # Apple AirPods Pro (2nd gen) USB-C
sku = match.get("sku")Returns the matched SKU, product title, and direct Google Shopping URL. Cost: 1 credit, or 4 credits with deepsearch=true.
Step 3 — Get every seller's offer by EAN
The /offers endpoint returns all merchant offers for a product, not just the top result — giving you the full competitive price landscape in one call.
def get_offers(ean, site="shopping.google.nl"):
endpoint = f"{BASE_URL}/offers"
params = {"site": site, "ean": ean, "api_key": API_KEY}
return requests.get(endpoint, params=params).json()
offers = get_offers("8720246689310")Each response includes the product title, brand, availability, and an array of offers with seller name, price, shipping cost, total price, and condition. Optional parameters: availability (filter by stock), gl (country), hl (language). Cost: 1 credit per request.
Step 4 — Pull product info, variants, and reviews
Once you have an EAN or SKU, you can enrich each product:
# Full specs and description by EAN
def get_product_info(ean, site="shopping.google.nl"):
endpoint = f"{BASE_URL}/info"
params = {"site": site, "ean": ean, "api_key": API_KEY}
return requests.get(endpoint, params=params).json()
# Every color / size / storage variant by SKU
def get_variants(sku, site="shopping.google.nl"):
endpoint = f"{BASE_URL}/variants"
params = {"site": site, "sku": sku, "api_key": API_KEY}
return requests.get(endpoint, params=params).json() # 6 credits
# Aggregate rating + individual reviews by SKU
def get_reviews(sku, site="shopping.google.nl"):
endpoint = f"{BASE_URL}/reviews"
params = {"site": site, "sku": sku, "api_key": API_KEY}
return requests.get(endpoint, params=params).json()/info returns title, brand, thumbnail, description, and a specifications object. /variants returns each dimension (color, size, storage) with labelled options and their own catalog IDs (6 credits). /reviews returns the average rating, total review count, star distribution, and paginated user reviews.
Step 5 — Organize and export the data
Filter by attributes like price or availability, then export to JSON or CSV for analysis:
import csv
def offers_to_csv(offers, path="offers.csv"):
rows = offers.get("offers", [])
with open(path, "w", newline="") as f:
writer = csv.DictWriter(f, fieldnames=["seller", "price", "shipping", "total", "condition"])
writer.writeheader()
for o in rows:
writer.writerow({k: o.get(k) for k in writer.fieldnames})Advanced Methods for Data Extraction
Combine the calls into one product pipeline
For catalog work, chain the endpoints: match the EAN to a SKU, then fan out to offers, variants, and reviews.
def get_full_product(ean, site="shopping.google.nl"):
match = match_ean_to_sku(ean, site)
sku = match.get("sku")
return {
"match": match,
"offers": get_offers(ean, site),
"info": get_product_info(ean, site),
"variants": get_variants(sku, site) if sku else None,
"reviews": get_reviews(sku, site) if sku else None,
}ShoppingScraper's Advanced plan adds automated scheduling and advanced filtering, which is ideal for recurring price tracking or analyzing multiple marketplaces with the same EAN.
Handle transient errors with a retry wrapper
To manage network blips or rate limits, retry with progressive back-off:
import time
def retry_request(func, max_attempts=3):
for attempt in range(max_attempts):
try:
response = func()
if response.status_code == 200:
return response.json()
except Exception as e:
if attempt == max_attempts - 1:
raise e
time.sleep(2 ** attempt)
return NoneThis retries up to three times, with longer delays each attempt, to handle interruptions gracefully.
Scale across your whole catalog
The same EAN/GTIN queries Google Shopping plus 65+ other marketplaces (Amazon, bol.com, and more) through one unified API. Use the Scheduler to crawl your catalog on a recurring frequency — tier monitoring by product importance (hourly for top revenue items, daily for mid-tier, weekly for the long tail) to keep credit usage efficient.
Conclusion and Key Points
Overview of the Extraction Process
Extracting data from Google Shopping reliably comes down to using an authorized API and following ethical guidelines. ShoppingScraper returns live product data — search results, EAN→SKU matches, offers, variants, and reviews — as clean JSON, while handling proxy rotation, anti-bot challenges, and parsing for you. That removes the brittle, expensive parts of a DIY scraping stack.
Choosing structured formats like JSON or CSV keeps the data organized and easy to analyze. While these methods work well today, staying effective means keeping up with changes in both technology and regulations.
Future Updates and Compliance
The methods and rules for extracting Google Shopping data keep changing. Businesses should focus on:
| Aspect | Current Requirements | Future Considerations |
|---|---|---|
| Data Access | Use authorized APIs | Integrate with official APIs |
| Rate Limiting | Employ progressive delays | Implement queue management |
| Legal Compliance | Follow platform rules | Adhere to stricter regulations |
| Reliability | Use a managed API | Leverage scheduling + caching |
To keep operations running smoothly:
- Stay informed: regularly check Google Shopping's documentation for updates.
- Validate your data: ensure it is accurate and complete before using it.
- Adopt new technologies: AI and machine learning are becoming essential for improving extraction efficiency — including AI fuzzy matching (
deepsearch) for hard-to-match products.
As ShoppingScraper continues to improve, combining it with forward-thinking practices keeps your data extraction efficient, compliant, and future-ready.
FAQs
Is it legal to scrape Google Shopping?
Scraping publicly available data, like Google Shopping listings, is generally allowed as long as it complies with laws like the Computer Fraud and Abuse Act (CFAA) in the U.S. and doesn't breach terms of service. To stay within legal boundaries:
- Follow the platform's terms of service.
- Handle data responsibly, ensuring privacy compliance.
- Use proper rate limiting to avoid overloading servers.
- Stick to authorized methods for data collection.
ShoppingScraper collects only public Google Shopping listing data through an authorized API and handles rate limiting and request hygiene for you — so you receive structured data rather than scraping Google directly, which minimizes legal and technical risk.
To stay compliant, regularly check platform policies, use approved tools, and adopt responsible practices. As always, consult legal counsel for your specific situation, since laws and platform policies continue to evolve.
Related Blog Posts
CTO & Co-founder
Full-stack engineer specializing in web scraping, API design, and AI applications for e-commerce. Built ShoppingScraper's infrastructure processing 1M+ daily product lookups.