🚀 New: ChatGPT Scraper API — Run prompts & get structured JSON responses

Add Your Heading Text Here

How to Scrape Google Shopping with Python

scraping google shopping

Table of Contents

Google Shopping aggregates product listings, prices, ratings, and seller data from thousands of retailers, making it one of the most valuable sources for price monitoring, market research, and competitive intelligence.

In this tutorial, you’ll learn how to scrape Google Shopping results using Python and Scrapingdog’s Google Shopping API. By the end, you’ll have a working script that extracts product titles, prices, ratings, reviews, and source URLs, and exports everything to a CSV file.

If you’re looking to scrape general Google search results instead, see our guide on scraping Google search results with Python.

Why Is Google Shopping Difficult to Scrape?

Google Shopping page may look too easy to scrape, but making a normal GET request using libraries like requests will not give you the data you might be looking for. Here’s why:

Results are loaded dynamically. When you send a plain requests.get() to the Google Shopping URL, you don’t get product data back; instead, you get an empty HTML skeleton. The actual product listings are loaded via asynchronous AJAX calls that fire after the page renders in the browser. A simple HTTP request never sees them.

Google actively blocks bots. Google uses IP rate limiting, browser fingerprinting, and CAPTCHA to detect and block automated requests. Most scrapers get blocked before they can extract a second page of results.

JavaScript rendering is expensive. Using a headless browser like Playwright or Puppeteer works, but it’s slow, resource-heavy, and costly to run at any meaningful scale. Rendering a full browser instance for every request is not practical for monitoring thousands or millions of keywords.

This is exactly why we’ll use Scrapingdog’s Google Shopping API for this tutorial. It handles proxy rotation, JavaScript rendering, and bot detection behind the scenes, so you get clean, structured JSON from a single GET request without dealing with any of the above.

Understanding Google Shopping and Product Page

scrape google shopping

Before writing any code, it helps to know exactly what Google Shopping exposes. Here are the data points we’ll be extracting in this tutorial:

  • Product title — the full name of the listing
  • Price — current listed price
  • Rating — average star rating
  • Reviews — total number of reviews
  • Source — the retailer or seller name
  • Product URL — direct link to the product page
  • Thumbnail — product image URL

Google Shopping also exposes additional fields like delivery options, old/sale price, and product ID, which you can get by scraping Google Immersive data.

Scraping Google Shopping Results Using Scrapingdog’s Google Shopping API

Step 1: Install the Required Library

We only need two libraries for this tutorial:

  • Requests for making the HTTP connection with the API.
  • Pandas for storing the data in a CSV file.
				
					pip install requests pandas
				
			

Step 2: Get Your Scrapingdog API Key

Head to scrapingdog.com, create a free account, and grab your API key from the dashboard. You get 1,000 free credits on signup, enough to follow this tutorial and test your queries.

Step 3: Make Your First API Call

You can get the sample Python code from the dashboard itself.

google shopping dashboard

Just copy this code and paste it into your Python file.

				
					import requests

api_key = "your-api-key"
url = "https://api.scrapingdog.com/google_shopping"

params = {
    "api_key": api_key,
    "query": "samsung galaxy",
    "country": "us",
    "language": "en",
    "page": 0,
    "domain": "google.com"
}

response = requests.get(url, params=params)

if response.status_code == 200:
    data = response.json()
    print(data)
else:
    print(f"Request failed with status code: {response.status_code}")
				
			

The API accepts the following parameters:

  • api_key — This is your personal API key.
  • query– The search term you want to scrape
  • country-Country code for geo-targeted results (e.g. usukin)
  • language-Language of results (e.g. endefr)
  • page-Page number for pagination (default: 0)
  • domain-Google domain to target (e.g. google.comgoogle.co.uk)

Full list of supported parameters in Scrapingdog’s documentation.

Step 4: Parse the Response

A successful response returns a JSON object with two main sections filters and shopping_results. Here’s what a single product result looks like:

				
					{
      "title": "Samsung Galaxy S25 FE",
      "product_id": "18200475507255585174",
      "product_url": "https://www.google.com/search?ibp=oshop&q=samsung+galaxy&hl=en&gl=us&udm=28&prds=catalogid%3A18200475507255585174%2CheadlineOfferDocid%3A16237505128352299805%2CimageDocid%3A395672489604708062%2Crds%3APC_11752250590237752181%7CPROD_PC_11752250590237752181%2Cgpcid%3A11752250590237752181%2Cpvt%3Ahg",
      "scrapingdog_immersive_product_link": "https://api.scrapingdog.com/google_immersive_product?api_key=670d12181fecbac22c66d410&page_token=eyJlaSI6IjRZdmphY0NDTE5tRm1MUVBrb0Rwd1FjIiwicHJvZHVjdGlkIjoiMTgyMDA0NzU1MDcyNTU1ODUxNzQiLCJjYXRhbG9naWQiOiIxODIwMDQ3NTUwNzI1NTU4NTE3NCIsImhlYWRsaW5lT2ZmZXJEb2NpZCI6IjE2MjM3NTA1MTI4MzUyMjk5ODA1IiwiaW1hZ2VEb2NpZCI6IjM5NTY3MjQ4OTYwNDcwODA2MiIsInJkcyI6IlBDXzExNzUyMjUwNTkwMjM3NzUyMTgxfFBST0RfUENfMTE3NTIyNTA1OTAyMzc3NTIxODEiLCJxdWVyeSI6InNhbXN1bmcgZ2FsYXh5IiwiZ3BjaWQiOiIxMTc1MjI1MDU5MDIzNzc1MjE4MSIsInB2dCI6ImhnIiwiZ2wiOiJ1cyIsImhsIjoiZW4ifQ",
      "page_token": "eyJlaSI6IjRZdmphY0NDTE5tRm1MUVBrb0Rwd1FjIiwicHJvZHVjdGlkIjoiMTgyMDA0NzU1MDcyNTU1ODUxNzQiLCJjYXRhbG9naWQiOiIxODIwMDQ3NTUwNzI1NTU4NTE3NCIsImhlYWRsaW5lT2ZmZXJEb2NpZCI6IjE2MjM3NTA1MTI4MzUyMjk5ODA1IiwiaW1hZ2VEb2NpZCI6IjM5NTY3MjQ4OTYwNDcwODA2MiIsInJkcyI6IlBDXzExNzUyMjUwNTkwMjM3NzUyMTgxfFBST0RfUENfMTE3NTIyNTA1OTAyMzc3NTIxODEiLCJxdWVyeSI6InNhbXN1bmcgZ2FsYXh5IiwiZ3BjaWQiOiIxMTc1MjI1MDU5MDIzNzc1MjE4MSIsInB2dCI6ImhnIiwiZ2wiOiJ1cyIsImhsIjoiZW4ifQ",
      "immersive_url": "https://www.google.com/async/oapv?ei=4YvjacCCLNmFmLQPkoDpwQc&q=samsung+galaxy&gl=us&hl=en&yv=3&cs=1&async=catalogid%3A18200475507255585174%2Cgpcid%3A11752250590237752181%2CheadlineOfferDocid%3A16237505128352299805%2Crds%3APC_11752250590237752181%7CPROD_PC_11752250590237752181%2CimageDocid%3A395672489604708062%2Cquery%3Asamsung%2520galaxy%2Cpvt%3Ahg%2C_fmt%3Ajspb",
      "source": "Samsung",
      "price": "$499.99",
      "extracted_price": 499.99,
      "old_price": "$650",
      "old_price_extracted": 650,
      "rating": 4.6,
      "reviews": "116K",
      "tag": "23% OFF",
      "thumbnail": "data:image/webp;base64,UklG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Z958Ig87GRR92Nokl2Fs/CviIUA1I4Br16l0H2dATHQAmigR3ujZjgrrTHll05jC0U6qweV7Ckwzk4mftDYYiW6o2XqYBhfbuRz2OYfE6iizeY5DlRnzmFzWxwavTeyeq/ykTWnZYB69bPje2hliz2X7t6O8RSJKZMxQbfgIXXsTdIUqt9reBwFGD5B88qq934AXSEUn7co+kKynOdD1mjXYeiMBBVOVBULXF+got9RSaGgoBn7TqDvoWnLDQ//Ta47IEaEERXI2pYGcROta4hHWlDBetJfFUIyFoyPL9WIUhV5PmJwhFZH4TARyLBrEgP+OtNyR/n0QrfxVY+intKhh/31xeCuTR8+8UJ9fnOIySCeBFcRxdvccRvTXEDsUQWMZKx4a1QJ16yqLeBkada1N29ym6W4b4z6E+Xfqc6SK+Xpoymu7k0lIfGtxHk/gfREg9q54j0OQGpSKtoTufmytqDu2jgx/sSdnttDojI9jvhuSDho3ueT7/HgRoYtWQqpsEtAD6qYD4+AGg9kf/LxGZ36L6aW5kk7Zt6G2eRZe9li9mwTDmiManRelQLhGYVRcgYsY7cFrnn8PmL9eGvc4Qf937j9CzZitvP/+b8kZUcZ2cAAAAAA\\x3d",
      "position": 1
    }
				
			

Here’s what each field gives you:

  • title — Full product name
  • price — Displayed price string
  • extracted_price — Numeric price, use this for calculations
  • old_price / old_price_extracted — Original price before discount
  • tag — Discount label, for example 23% OFF or SAVE 30%
  • rating — Average star rating
  • reviews — Total review count
  • source — Retailer or seller name
  • delivery — Shipping information
  • extensions — Additional info, for example Free 15-day returns
  • product_url — Full Google Shopping product URL
  • scrapingdog_immersive_product_link — Use this to fetch detailed product data like sellers, reviews, and images via Scrapingdog’s Google Immersive Product API.

Now, let’s extract the specific fields we need and calculate the discount amount using old_price_extracted and extracted_price:

				
					import requests

api_key = "your-api-key"
url = "https://api.scrapingdog.com/google_shopping"

params = {
    "api_key": api_key,
    "query": "samsung galaxy",
    "country": "us",
    "language": "en",
    "page": 0,
    "domain": "google.com"
}

response = requests.get(url, params=params)

if response.status_code == 200:
    data = response.json()
    products = []

    for product in data['shopping_results']:
        extracted_price = product.get('extracted_price')
        old_price = product.get('old_price_extracted')
        
        discount_amount = round(old_price - extracted_price, 2) if old_price and extracted_price else None

        products.append({
            'title': product.get('title'),
            'source': product.get('source'),
            'price': product.get('price'),
            'extracted_price': extracted_price,
            'old_price': product.get('old_price'),
            'discount_amount': discount_amount,
            'tag': product.get('tag'),
            'rating': product.get('rating'),
            'reviews': product.get('reviews'),
            'delivery': product.get('delivery'),
            'product_url': product.get('product_url')
        })

    print(products)
else:
    print(f"Request failed with status code: {response.status_code}")
				
			

We use .get() on every field, so the script doesn’t break if a particular product is missing data. For example, not every listing has an old_price or delivery field.

Here’s a small video go-through on how you can use Scrapingdog’s Google Shopping API ⬇️

Exporting the list of products to CSV

Finally, we will export the list of products to a CSV file. We will get the product title, pricing, rating, and source from the extracted data. Here is the complete code to get the output in a CSV file.

				
					import requests
import pandas as pd

api_key = "your-api-key"
url = "https://api.scrapingdog.com/google_shopping"

params = {
    "api_key": api_key,
    "query": "samsung galaxy",
    "country": "us",
    "language": "en",
    "page": 0,
    "domain": "google.com"
}

response = requests.get(url, params=params)

if response.status_code == 200:
    data = response.json()
    products = []

    for product in data['shopping_results']:
        extracted_price = product.get('extracted_price')
        old_price = product.get('old_price_extracted')
        discount_amount = round(old_price - extracted_price, 2) if old_price and extracted_price else None

        products.append({
            'title': product.get('title'),
            'source': product.get('source'),
            'price': product.get('price'),
            'extracted_price': extracted_price,
            'old_price': product.get('old_price'),
            'discount_amount': discount_amount,
            'tag': product.get('tag'),
            'rating': product.get('rating'),
            'reviews': product.get('reviews'),
            'delivery': product.get('delivery'),
            'product_url': product.get('product_url')
        })

    df = pd.DataFrame(products)
    df.to_csv('google_shopping_results.csv', index=False)
    print(f"Saved {len(df)} products to google_shopping_results.csv")
else:
    print(f"Request failed with status code: {response.status_code}")
				
			

When you run this code, you will get a google_shopping_results.csv file inside your folder.

Google also provides richer data for individual products, such as product descriptions, seller details, price ranges, delivery dates, taxes, and more. To access that level of detail, you need to make a separate request using the Google Immersive Product API.

Key Takeaways:

  • The guide explains how to programmatically scrape Google Shopping results to extract product listings and pricing information.

  • It shows how to send search queries and retrieve structured data that includes product titles, prices, merchant names, and images.

  • You learn how to parse product fields such as price range, availability, currency, and store links from the response.

  • The tutorial demonstrates organizing the scraped shopping data into usable formats for analysis or reporting.

  • Scraping Google Shopping helps with price comparison, competitor analysis, product research, and e-commerce intelligence.

Conclusion

In this tutorial, you’ve learned how to scrape Google Shopping results using Python and Scrapingdog’s Google Shopping API. From making your first API call to extracting discount data, using filters, and exporting results to CSV across multiple keywords.

If you want to go beyond search results and pull individual product details, seller comparisons, user reviews, product images, and Q&A data, check out our guide on scraping Google Shopping product pages with the Immersive Product API. It picks up exactly where this tutorial leaves off.

Ready to scale up? Sign up for a free Scrapingdog account and get 1,000 credits to start scraping Google Shopping today.

Frequently Asked Questions

Is scraping Google Shopping legal?

Scraping publicly available data from Google Shopping is generally considered legal.

Why does my scraper return empty results?

Google loads product listings via async JavaScript calls, so a plain requests.get() on a Google Shopping URL returns an empty page. Scrapingdog’s API handles this automatically and returns clean JSON every time.

How do I scrape Google Shopping for a specific country? 

Pass the country and domain parameters in your request — for example "country": "uk" and "domain": "google.co.uk" for UK results.

How do I handle pagination?

Increment the page parameter in your request — page=0 for the first page, page=1 for the second, and so on until the results array is empty.

Additional Resources

My name is Manthan Koolwal and I am the founder of scrapingdog.com. I love creating scraper and seamless data pipelines.
Manthan Koolwal
Manthan Koolwal

Web Scraping with Scrapingdog

Scrape the web without the hassle of getting blocked

Recent Blogs

Best Alternatives to Serper API

Best Alternatives to Serper API

Looking for the best alternatives to Serper API? Compare top SERP APIs by pricing, features, response time, AI Overview support, and free credits to find the right fit.
scraping google shopping

How to Scrape Google Shopping with Python

Learn how to scrape Google Shopping results using Python and Scrapingdog's API. Extract product titles, prices, ratings, discounts, and seller data and export everything to CSV in minutes.