If you sell online, your "pricing page" isn't your pricing page — it's the Google SERP. Competitors' product listings, ad slots, and even the knowledge panel all show up when someone searches for your product category. Tracking how that SERP shifts is price intelligence, and it's embarrassingly cheap to build with a SERP API.
This post builds a small price-intelligence monitor: snapshot the SERP for a product keyword, extract the competing listings, and diff it over time.
What price intelligence actually tracks
For an ecommerce brand, three things matter in the SERP:
- Organic product listings — who ranks for "wireless earbuds" and where
- Shopping ads / product results — which products Google surfaces as paid
- Price changes in the listings themselves — snippets often contain prices ("$49.99")
All three come back from a single search request when Google renders them.
The setup
The API I'm using is SerpBase (https://api.serpbase.dev). Its /google/search endpoint returns organic results plus rich modules in one JSON response. Auth is a plain X-API-Key header, POST JSON.
import requests, sqlite3, datetime
API_KEY = "your_api_key"
BASE = "https://api.serpbase.dev"
YOUR_DOMAIN = "yourstore.com"
def snapshot_serp(keyword, gl="us", hl="en"):
resp = requests.post(
f"{BASE}/google/search",
headers={"Content-Type": "application/json", "X-API-Key": API_KEY},
json={"q": keyword, "hl": hl, "gl": gl},
timeout=30,
)
return resp.json()
data = snapshot_serp("wireless earbuds")
for r in data.get("organic", [])[:5]:
print(r["rank"], r["title"], "|", r.get("snippet", "")[:60])
Extracting the price signal
Snippets in ecommerce SERPs frequently include prices. A regex pulls them out for a rough price-parity check:
import re
def extract_price(snippet):
if not snippet:
return None
m = re.search(r"[\$€£]\s?\d+(?:[.,]\d{2})?", snippet)
return m.group(0) if m else None
rows = []
for r in data.get("organic", []):
rows.append({
"rank": r["rank"],
"title": r["title"],
"link": r["link"],
"price": extract_price(r.get("snippet")),
"domain": r.get("display_url", ""),
})
Now you have a per-keyword list of competitors with any prices Google chose to show. That's your baseline snapshot.
Persisting snapshots for diffs
Price intelligence is a time-series problem: the value is in the diff. Store each snapshot:
con = sqlite3.connect("pi.db")
con.execute("""CREATE TABLE IF NOT EXISTS snapshots (
keyword TEXT, day TEXT, rank INTEGER,
title TEXT, link TEXT, price TEXT, domain TEXT,
PRIMARY KEY (keyword, day, rank, link)
)""")
for r in rows:
con.execute(
"INSERT OR REPLACE INTO snapshots VALUES (?, ?, ?, ?, ?, ?, ?)",
("wireless earbuds", datetime.date.today().isoformat(),
r["rank"], r["title"], r["link"], r["price"], r["domain"]),
)
con.commit()
Alerting on the interesting changes
The signals worth alerting on:
- You dropped out of the top N for your own product keyword
- A competitor's snippet gained a price (they're running a promo)
- New domains appeared in the top 5
today = con.execute(
"SELECT link, rank, price FROM snapshots WHERE day = ?",
(datetime.date.today().isoformat(),),
).fetchall()
yesterday = dict(con.execute(
"SELECT link, rank FROM snapshots WHERE day = ?",
(datetime.date.today() - datetime.timedelta(days=1),),
).fetchall())
for link, rank, price in today:
if link and YOUR_DOMAIN in link and rank > 5:
print(f"ALERT: your listing fell to #{rank}")
prev = yesterday.get(link)
if prev is not None and rank < prev:
print(f"UP: {link} #{prev} -> #{rank}")
if price and yesterday.get(link) is None and rank <= 5:
print(f"NEW with price: {link} {price}")
Hook those prints to Slack and you have a promo-detection bot.
Cost of running this
A product catalog of 100 keywords, checked daily:
- 100 searches/day × 30 = 3,000 searches/month
- SerpBase
/google/searchcosts 1 credit each; standard pack ~$0.50/1k → around $1.50/month
The free 100 searches on signup cover your first build week. The cost is low enough that "check daily" isn't a budget decision.
Going further
-
Add
glmarkets: the same keyword inde,jp,ingives you cross-market price positioning. -
Track shopping modules: when Google renders product/carousel modules, inspect
shopping/related fields for sponsored product data. -
Combine with Maps: for local retail,
/google/maps/searchsnapshots which stores surface for a category+city pair.
Wrapping up
Price intelligence isn't an enterprise tool problem — it's a "run one search per product keyword, diff daily" problem. The response schema for search (including all optional modules) is documented at serpbase.dev/docs.
Run a snapshot for your own best-selling keyword today. You'll be surprised what the snippet prices reveal about your competitors.
Top comments (0)