Product pricing changes across Amazon, Walmart, and Google Shopping daily. This tutorial builds a price monitor that checks all three platforms with one API key.
Prerequisites
- Scavio API key
- Python 3.8+
- SQLite for price history
Walkthrough
Step 1: Define products to monitor
List products with identifiers per platform.
products = [
{'name': 'AirPods Pro', 'amazon_query': 'Apple AirPods Pro', 'walmart_query': 'AirPods Pro', 'asin': 'B0D1XD1ZV3'},
{'name': 'Kindle Paperwhite', 'amazon_query': 'Kindle Paperwhite', 'walmart_query': 'Kindle Paperwhite'},
]Step 2: Check Amazon pricing
Get current Amazon price and availability.
import requests, os
H = {'x-api-key': os.environ['SCAVIO_API_KEY']}
def amazon_price(query):
r = requests.post('https://api.scavio.dev/api/v1/search', headers=H,
json={'platform': 'amazon', 'query': query}).json()
results = r.get('results', [])
return {'price': results[0].get('price') if results else None,
'rating': results[0].get('rating') if results else None}Step 3: Check Walmart pricing
Get current Walmart price.
def walmart_price(query):
r = requests.post('https://api.scavio.dev/api/v1/search', headers=H,
json={'platform': 'walmart', 'query': query}).json()
results = r.get('results', [])
return {'price': results[0].get('price') if results else None}Step 4: Store and alert on price changes
SQLite tracks prices; alerts on significant changes.
import sqlite3
conn = sqlite3.connect('prices.db')
conn.execute('CREATE TABLE IF NOT EXISTS prices (date TEXT, product TEXT, platform TEXT, price REAL)')
def check_price_change(product, platform, new_price):
last = conn.execute('SELECT price FROM prices WHERE product=? AND platform=? ORDER BY date DESC LIMIT 1',
(product, platform)).fetchone()
if last and abs(new_price - last[0]) / last[0] > 0.05:
send_alert(f'{product} on {platform}: {last[0]} -> {new_price}')Python Example
# 5 products × 3 platforms = 15 queries/day = $0.075/day
# Monthly: $2.25 for daily price monitoring across 3 marketplacesJavaScript Example
const amazon = await fetch('https://api.scavio.dev/api/v1/search', {
method: 'POST', headers: {'x-api-key': process.env.SCAVIO_API_KEY, 'Content-Type': 'application/json'},
body: JSON.stringify({platform: 'amazon', query: productName})
});Expected Output
Daily price tracking across Amazon + Walmart + Google Shopping. SQLite history, 5% change alerts, one API key for all platforms.