Gamers love deals, and video game prices fluctuate constantly across Steam, Epic Games Store, and other platforms. SteamDB tracks historical pricing data that's invaluable for building deal-finding tools. In this tutorial, we'll build a video game price tracker using Python.
Why Track Game Prices?
- Find the best time to buy — games go on sale in predictable patterns
- Set price alerts — get notified when a game hits your target price
- Analyze pricing trends — understand publisher pricing strategies
- Compare across stores — Steam vs Epic vs GOG
Setting Up
pip install requests beautifulsoup4 pandas
Using the Steam Store API
Steam provides a free API for current pricing:
# Implementation is proprietary (that IS the moat).
# Skip the build — use our ready-made Apify actor:
# see the CTA below for the link (fpr=yw6md3).
Scraping SteamDB for Price History
SteamDB tracks historical prices that Steam's API doesn't expose:
# Implementation is proprietary (that IS the moat).
# Skip the build — use our ready-made Apify actor:
# see the CTA below for the link (fpr=yw6md3).
Building a Game Price Tracker
import pandas as pd
from datetime import datetime
class GamePriceTracker:
def __init__(self, api_key=None):
self.api_key = api_key
self.watchlist = {}
self.price_history = []
def add_game(self, app_id, name, target_price=None):
self.watchlist[app_id] = {
"name": name,
"target_price": target_price
}
def check_prices(self):
alerts = []
for app_id, info in self.watchlist.items():
price = get_steam_price(app_id)
if price:
price["name"] = info["name"]
price["checked_at"] = datetime.now().isoformat()
self.price_history.append(price)
if info["target_price"] and price["final_price"] <= info["target_price"]:
alerts.append({
"name": info["name"],
"price": price["final_price"],
"target": info["target_price"]
})
print(f"{info['name']}: ${price['final_price']}")
time.sleep(2)
return alerts
def get_price_history(self, app_id=None):
df = pd.DataFrame(self.price_history)
if app_id:
df = df[df["app_id"] == app_id]
return df
def export(self, filename="game_prices.csv"):
df = pd.DataFrame(self.price_history)
df.to_csv(filename, index=False)
tracker = GamePriceTracker()
tracker.add_game(1091500, "Cyberpunk 2077", target_price=29.99)
tracker.add_game(1245620, "Elden Ring", target_price=39.99)
tracker.add_game(1174180, "Red Dead Redemption 2", target_price=19.99)
alerts = tracker.check_prices()
for alert in alerts:
print(f"DEAL ALERT: {alert['name']} is ${alert['price']} (target: ${alert['target']})")
Comparing Prices Across Stores
# Implementation is proprietary (that IS the moat).
# Skip the build — use our ready-made Apify actor:
# see the CTA below for the link (fpr=yw6md3).
Automated Price Monitoring
import schedule
def daily_price_check():
tracker = GamePriceTracker()
tracker.add_game(1091500, "Cyberpunk 2077", 29.99)
tracker.add_game(1245620, "Elden Ring", 39.99)
alerts = tracker.check_prices()
tracker.export()
if alerts:
print(f"Found {len(alerts)} deals!")
for a in alerts:
print(f" {a['name']}: ${a['price']}")
schedule.every().day.at("10:00").do(daily_price_check)
Handling Anti-Bot Measures
SteamDB uses Cloudflare protection and rate limiting. Here's how to handle it:
- ScraperAPI with JavaScript rendering — essential for SteamDB's dynamic content
- ThorData residential proxies — datacenter IPs are commonly blocked
- Request delays — minimum 3 seconds between SteamDB requests
- Use Steam's API first — it's free, fast, and doesn't require proxies
For monitoring scraper performance across multiple game stores, ScrapeOps dashboards show you which sources are reliable.
Conclusion
Building a game price tracker combines free APIs (Steam Store) with web scraping (SteamDB, IsThereAnyDeal) to give you comprehensive pricing intelligence. The Steam API covers current prices perfectly, while scraping adds historical data and cross-store comparisons. Start with the API and add scraping as needed.
Happy scraping!
Top comments (0)