Overview
Ecommerce sellers lose Buy Box placement and sales velocity when competitors drop prices and they do not react for days. This workflow checks competitor prices every morning across Amazon, Walmart, and Google Shopping. Alerts fire when prices change by more than 5%. Monitoring 100 products across 2 platforms costs $1/day.
Trigger
Daily cron at 7 AM UTC.
Schedule
Daily at 7 AM UTC
Workflow Steps
Load Competitor Product Watchlist
Read the watchlist of competitor products from database or JSON. Each entry has the product search query and platforms to monitor.
Check Current Prices Across Platforms
For each product, search Amazon, Walmart, or Google Shopping. Extract current price, title, and listing URL.
Compare Against Baseline Prices
Load yesterday's prices from storage. Calculate absolute and percentage change for each product.
Alert on Significant Changes
Send Slack or email alerts for products where price changed more than the threshold (default 5%).
Update Baseline for Tomorrow
Write today's prices to storage as the new baseline for tomorrow's comparison.
Python Implementation
import requests, os, json
from pathlib import Path
API_KEY = os.environ["SCAVIO_API_KEY"]
THRESHOLD = 0.05
def check_price(query: str, platform: str) -> dict:
resp = requests.post(
"https://api.scavio.dev/api/v1/search",
headers={"x-api-key": API_KEY, "Content-Type": "application/json"},
json={"query": query, "platform": platform},
timeout=15,
)
data = resp.json()
top = (data.get("organic_results") or [{}])[0]
return {"title": top.get("title", ""), "price": top.get("price"), "url": top.get("link", "")}
watchlist = [
{"query": "sony wh-1000xm6", "platforms": ["amazon", "walmart"]},
{"query": "apple airpods pro 3", "platforms": ["amazon", "google-shopping"]},
]
baseline = json.loads(Path("baseline.json").read_text()) if Path("baseline.json").exists() else {}
alerts = []
for item in watchlist:
for p in item["platforms"]:
result = check_price(item["query"], p)
key = f"{item['query']}_{p}"
if result["price"] and baseline.get(key):
change = abs(result["price"] - baseline[key]) / baseline[key]
if change >= THRESHOLD:
alerts.append(f"{item['query']} ({p}): {baseline[key]} -> {result['price']} ({change*100:.1f}%)")
if result["price"]:
baseline[key] = result["price"]
Path("baseline.json").write_text(json.dumps(baseline, indent=2))
for a in alerts:
print(f"ALERT: {a}")JavaScript Implementation
const fs = require('fs');
const H = {'x-api-key': process.env.SCAVIO_API_KEY, 'Content-Type': 'application/json'};
async function checkPrice(query, platform) {
const r = await fetch('https://api.scavio.dev/api/v1/search', {method:'POST', headers:H, body:JSON.stringify({query, platform})});
const d = await r.json();
const top = (d.organic_results||[])[0]||{};
return {title:top.title, price:top.price, url:top.link};
}
const watchlist = [{query:'sony wh-1000xm6', platforms:['amazon','walmart']}];
const baseline = fs.existsSync('baseline.json') ? JSON.parse(fs.readFileSync('baseline.json','utf8')) : {};
for (const item of watchlist) {
for (const p of item.platforms) {
const r = await checkPrice(item.query, p);
const key = item.query+'_'+p;
if (r.price && baseline[key] && Math.abs(r.price-baseline[key])/baseline[key] > 0.05) console.log('ALERT: '+item.query+' ('+p+'): '+baseline[key]+'->'+r.price);
if (r.price) baseline[key] = r.price;
}
}
fs.writeFileSync('baseline.json', JSON.stringify(baseline,null,2));Platforms Used
Amazon
Product search with prices, ratings, and reviews
Walmart
Product search with pricing and fulfillment data
Google Shopping
Shopping results with multi-retailer pricing