Google Shopping Results API: Extract Product Listings and Prices from Search
Google Shopping results appear in search for most product-related queries. They show product images, prices, merchant names, ratings, and availability — structured commercial data that is extremely valuable for e-commerce businesses, price comparison tools, and market research.
Extracting this data manually is impractical. Google does not offer a public Shopping results API. But a SERP API like SerpBase gives you access to the full search results page, including shopping results, as clean JSON.
This article covers how to extract Google Shopping data programmatically, what fields are available, and what you can build with it.
What Google Shopping Results Contain
When you search for something like "wireless noise cancelling headphones" on Google, you often see a carousel of product cards near the top. Each card contains:
- Product title — the name of the product
- Price — current listed price
- Merchant/source — which store is selling it (Amazon, Best Buy, Walmart, etc.)
- Rating — star rating and review count
- Image — product thumbnail
- Link — URL to the product page or Google Shopping listing
- Shipping info — free shipping indicators
- Special tags — sale price, price drops, etc.
This is the same data that Google surfaces in its Shopping tab, but embedded directly in the main search results.
Querying Shopping Results with SerpBase
SerpBase returns shopping results as part of the standard search response. No special endpoint or parameter is needed — if Google shows shopping results for a query, they will appear in the API response.
import requests
API_KEY = "your_api_key"
resp = requests.get("https://api.serpbase.dev/search", params={
"q": "wireless noise cancelling headphones",
"gl": "us",
"hl": "en",
}, headers={
"x-api-key": API_KEY,
})
data = resp.json()
shopping = data.get("shopping_results", [])
for product in shopping:
print(f"{product['title']} - {product.get('price', 'N/A')} from {product.get('source', 'Unknown')}")
Example Response Structure
{
"shopping_results": [
{
"position": 1,
"title": "Sony WH-1000XM5 Wireless Noise Cancelling Headphones",
"price": "$278.00",
"extracted_price": 278.00,
"source": "Amazon.com",
"rating": 4.7,
"reviews": 12453,
"link": "https://www.amazon.com/dp/B09XS7JWHH",
"thumbnail": "https://..."
},
{
"position": 2,
"title": "Bose QuietComfort Ultra Headphones",
"price": "$349.00",
"extracted_price": 349.00,
"source": "Best Buy",
"rating": 4.6,
"reviews": 8921,
"link": "https://www.bestbuy.com/...",
"thumbnail": "https://..."
}
]
}
The extracted_price field gives you the numeric value, so you do not need to parse currency strings.
Use Case 1: Price Monitoring
Track prices for specific products across merchants over time.
import sqlite3
from datetime import datetime
def init_price_db(path="prices.db"):
conn = sqlite3.connect(path)
conn.execute("""
CREATE TABLE IF NOT EXISTS prices (
id INTEGER PRIMARY KEY AUTOINCREMENT,
query TEXT NOT NULL,
product_title TEXT,
source TEXT,
price REAL,
checked_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
)
""")
conn.commit()
return conn
def track_prices(conn, query, shopping_results):
for p in shopping_results:
conn.execute(
"INSERT INTO prices (query, product_title, source, price) VALUES (?, ?, ?, ?)",
(query, p.get("title"), p.get("source"), p.get("extracted_price"))
)
conn.commit()
def get_price_history(conn, product_title, days=30):
rows = conn.execute("""
SELECT source, price, checked_at FROM prices
WHERE product_title LIKE ? AND checked_at > datetime('now', ? || ' days')
ORDER BY checked_at
""", (f"%{product_title}%", f"-{days}")).fetchall()
return rows
Run this on a cron schedule and you have a price history database. Alert when a product drops below a threshold.
Use Case 2: Competitive Price Intelligence
If you sell products online, you need to know how your prices compare to competitors on Google Shopping.
def compare_prices(shopping_results, my_domain):
my_products = []
competitor_products = []
for p in shopping_results:
source = p.get("source", "").lower()
if my_domain.lower() in source:
my_products.append(p)
else:
competitor_products.append(p)
if not my_products:
return {"status": "not_listed", "competitors": competitor_products}
my_price = my_products[0].get("extracted_price", 0)
cheaper = [c for c in competitor_products if c.get("extracted_price", 999999) < my_price]
return {
"my_price": my_price,
"my_position": my_products[0].get("position"),
"cheaper_competitors": len(cheaper),
"cheapest_price": min((c.get("extracted_price", 0) for c in competitor_products), default=None),
}
Use Case 3: Market Research and Product Discovery
Find out which products and brands dominate Google Shopping for a keyword category.
from collections import Counter
def analyze_market(queries: list, api_key: str) -> dict:
all_sources = []
price_points = []
for query in queries:
resp = requests.get("https://api.serpbase.dev/search", params={
"q": query, "gl": "us", "hl": "en",
}, headers={"x-api-key": api_key})
shopping = resp.json().get("shopping_results", [])
for p in shopping:
all_sources.append(p.get("source", "Unknown"))
if p.get("extracted_price"):
price_points.append(p["extracted_price"])
return {
"top_merchants": Counter(all_sources).most_common(10),
"price_range": (min(price_points), max(price_points)) if price_points else None,
"avg_price": sum(price_points) / len(price_points) if price_points else None,
}
Geographic Price Comparison
Prices vary by country. Use the gl parameter to compare Shopping results across regions.
def compare_prices_by_country(query, countries, api_key):
results = {}
for country in countries:
resp = requests.get("https://api.serpbase.dev/search", params={
"q": query, "gl": country, "hl": "en",
}, headers={"x-api-key": api_key})
shopping = resp.json().get("shopping_results", [])
prices = [p["extracted_price"] for p in shopping if p.get("extracted_price")]
results[country] = {
"avg_price": sum(prices) / len(prices) if prices else None,
"num_listings": len(shopping),
}
return results
# Compare headphone prices across US, UK, DE
prices = compare_prices_by_country(
"sony wh-1000xm5",
["us", "uk", "de"],
API_KEY
)
Cost Efficiency
Google Shopping monitoring is query-intensive. If you track 200 products daily across 3 countries, that is 600 queries/day or 18,000/month.
| Provider | Monthly Cost |
|---|---|
| SerpBase | $5.40 |
| Serper.dev | $18.00 |
| SerpAPI | $450.00 |
| Bright Data | $27.00 |
At SerpBase pricing ($0.30/1k queries), even aggressive monitoring stays affordable.
Summary
Google Shopping results are a goldmine for e-commerce intelligence. A SERP API makes this data accessible programmatically — no scraping infrastructure, no browser automation, no proxy management.
With SerpBase, you get Shopping results as part of every search query at $0.30 per 1,000 requests. Build price monitors, competitive intelligence dashboards, or market research tools without breaking your budget.
Start extracting Google Shopping data — 100 free credits, no credit card required.