ScavioScavio
ProductPricingDocs
Sign InGet Started
  1. Home
  2. Tutorials
  3. How to Track Google Shopping Prices Daily
Tutorial

How to Track Google Shopping Prices Daily

Automate daily Google Shopping price monitoring. Track price changes, detect drops, and store history for products you care about.

Get Free API KeyAPI Docs

Daily price tracking for Google Shopping products is essential for competitive intelligence, arbitrage opportunities, and purchase timing. Manual price checking is tedious and misses overnight changes. An automated pipeline that queries Google Shopping via API, stores price history, and detects significant changes catches every price movement. This tutorial shows how to build a daily Google Shopping price tracker using the Scavio API. You will set up product monitoring, store daily snapshots, calculate price trends, and generate alerts for significant price changes.

Prerequisites

  • Python 3.8+ installed
  • requests library installed
  • A Scavio API key from scavio.dev
  • A list of products to track

Walkthrough

Step 1: Define products to track

Set up the product list and price history storage.

Python
import os, requests, json
from datetime import date

API_KEY = os.environ["SCAVIO_API_KEY"]
HISTORY_FILE = "shopping_price_history.json"

PRODUCTS = [
    "MacBook Air M4",
    "Sony WH-1000XM5",
    "iPad Pro 13 inch",
    "Samsung Galaxy S25",
]

Step 2: Fetch daily prices

Query Google Shopping for each product and extract current pricing.

Python
def fetch_price(product):
    resp = requests.post("https://api.scavio.dev/api/v1/search",
        headers={"x-api-key": API_KEY},
        json={"platform": "google", "query": product, "type": "shopping"})
    results = resp.json().get("shopping_results", [])[:10]
    prices = []
    for r in results:
        price_str = r.get("price", "").replace("$","").replace(",","")
        try:
            prices.append({"title": r["title"][:60], "price": float(price_str),
                           "seller": r.get("source",""), "link": r.get("link","")})
        except (ValueError, KeyError):
            continue
    return sorted(prices, key=lambda x: x["price"]) if prices else []

Step 3: Store daily snapshots

Save price data with dates for historical comparison.

Python
def load_history():
    try:
        with open(HISTORY_FILE) as f:
            return json.load(f)
    except FileNotFoundError:
        return {}

def save_daily(product, prices):
    history = load_history()
    if product not in history:
        history[product] = []
    if prices:
        history[product].append({
            "date": date.today().isoformat(),
            "lowest": prices[0]["price"],
            "seller": prices[0]["seller"],
            "avg": round(sum(p["price"] for p in prices) / len(prices), 2),
        })
    with open(HISTORY_FILE, "w") as f:
        json.dump(history, f, indent=2)

Step 4: Detect price changes and alert

Compare today's prices with yesterday's and flag significant drops.

Python
def daily_tracker(products, alert_threshold=5.0):
    history = load_history()
    alerts = []
    for product in products:
        prices = fetch_price(product)
        if not prices: continue
        lowest = prices[0]["price"]
        prev_entries = history.get(product, [])
        prev_price = prev_entries[-1]["lowest"] if prev_entries else lowest
        change_pct = ((lowest - prev_price) / prev_price * 100) if prev_price else 0
        save_daily(product, prices)
        status = "DROP" if change_pct <= -alert_threshold else "RISE" if change_pct >= alert_threshold else "STABLE"
        print(f"{status}: {product} ${lowest:.2f} ({change_pct:+.1f}%)")
        if status == "DROP":
            alerts.append({"product": product, "price": lowest, "change": round(change_pct,1)})
    return alerts

alerts = daily_tracker(PRODUCTS)

Step 5: Generate price trend summary

Summarize price trends over the tracked period.

Python
def price_trends():
    history = load_history()
    for product, entries in history.items():
        if len(entries) < 2: continue
        first = entries[0]["lowest"]
        last = entries[-1]["lowest"]
        change = ((last - first) / first) * 100
        lowest_ever = min(e["lowest"] for e in entries)
        print(f"{product}:")
        print(f"  Current: ${last:.2f} | Low: ${lowest_ever:.2f} | Trend: {change:+.1f}%")

price_trends()

Python Example

Python
import os, requests
API_KEY = os.environ["SCAVIO_API_KEY"]
def price(product):
    resp = requests.post("https://api.scavio.dev/api/v1/search",
        headers={"x-api-key": API_KEY},
        json={"platform": "google", "query": product, "type": "shopping"})
    items = resp.json().get("shopping_results", [])[:5]
    for i in items:
        print(f"{i.get('title','')[:40]} - {i.get('price','N/A')} ({i.get('source','')})")

price("MacBook Air M4")

JavaScript Example

JavaScript
const H = {"x-api-key": process.env.SCAVIO_API_KEY, "Content-Type": "application/json"};
async function price(product) {
  const r = await fetch("https://api.scavio.dev/api/v1/search", {
    method: "POST", headers: H,
    body: JSON.stringify({platform: "google", query: product, type: "shopping"})
  });
  const items = (await r.json()).shopping_results || [];
  items.slice(0,5).forEach(i =>
    console.log(i.title?.slice(0,40), i.price, i.source)
  );
}
price("MacBook Air M4");

Expected Output

JSON
A daily price tracking pipeline that monitors Google Shopping products, stores price history, detects significant drops, and generates trend summaries.

Related Tutorials

  • How to Build a Google Shopping Price Alert
  • How to Build an Ecommerce Price Tracker with Scavio

Frequently Asked Questions

Most developers complete this tutorial in 15 to 30 minutes. You will need a Scavio API key (free tier works) and a working Python or JavaScript environment.

Python 3.8+ installed. requests library installed. A Scavio API key from scavio.dev. A list of products to track. A Scavio API key gives you 50 free credits on signup.

Yes. The free tier includes 50 credits on signup, which is more than enough to complete this tutorial and prototype a working solution.

Scavio has a native LangChain package (langchain-scavio), an MCP server, and a plain REST API that works with any HTTP client. This tutorial uses the raw REST API, but you can adapt to your framework of choice.

Related Resources

Best Of

Best E-Commerce Price Tracking API in 2026

Read more
Best Of

Best API for Cross-Platform Price Monitoring in 2026

Read more
Use Case

Automated Competitor Price Tracking

Read more
Use Case

Google Shopping Price Monitoring

Read more
Glossary

Google Shopping Structured Search

Read more
Solution

Monitor Google Reviews via SERP API Instead of Scraping

Read more

Start Building

Automate daily Google Shopping price monitoring. Track price changes, detect drops, and store history for products you care about.

Get Free API KeyRead the Docs
ScavioScavio

Real-time search API for AI agents. Search every platform, not just Google.

Product

  • Features
  • Pricing
  • Dashboard
  • Affiliates

Developers

  • Documentation
  • API Reference
  • Quickstart
  • MCP Integration
  • Python SDK

Alternatives

  • Tavily Alternative
  • SerpAPI Alternative
  • Firecrawl Alternative
  • Exa Alternative

Tools

  • JSON Formatter
  • cURL to Code
  • Token Counter
  • All Tools

© 2026 Scavio. All rights reserved.

Featured on TAAFT
Terms of ServicePrivacy Policy