Prompt
How do I set up automated web scraping for competitor price monitoring?
Latest observation
Oct 26, 2026
OpenAI APIWeb search: off
Here’s a practical way to set up automated competitor price monitoring with web scraping.
1) Define what you need to track
Before building anything, decide:
- Which competitors and which product pages
- What fields you need:
- product name
- current price
- sale price / discount
- availability
- SKU / product ID
- shipping cost
- timestamp
- How often you need updates:
- hourly, daily, weekly
- How accurate it must be:
- exact match by SKU
- fuzzy match by product title
2) Check legal and technical constraints
- Review the site’s Terms of Service
- Check robots.txt
- Avoid collecting restricted data or anything requiring login unless you have permission
- Be careful with rate limits to avoid disrupting the site
If you want low-risk monitoring, consider:
- official APIs
- affiliate feeds
- merchant data feeds
- third-party price intelligence providers
3) Choose a scraping approach
Simple static pages
Use:
- Requests + BeautifulSoup in Python
JavaScript-heavy sites
Use:
- Playwright or Selenium
- Or Scrapy with browser automation if needed
Large-scale crawling
Use:
- Scrapy
- a queue system
- rotating proxies if permitted and necessary
- monitoring and retry logic
4) Build the scraper
Typical pipeline:
- Load the target URL
- Parse the page
- Extract price and product data
- Normalize values
- Save to a database or spreadsheet
- Schedule repeated runs
- Compare against previous runs and alert on changes
Example: simple Python scraper
import requests
from bs4 import BeautifulSoup
from datetime import datetime
url = "https://example.com/product-page"
headers = {
"User-Agent": "Mozilla/5.0"
}
resp = requests.get(url, headers=headers, timeout=20)
resp.raise_for_status()
soup = BeautifulSoup(resp.text, "html.parser")
title = soup.select_one("h1.product-title").get_text(strip=True)
price = soup.select_one(".price").get_text(strip=True)
data = {
"url": url,
"title": title,
"price": price,
"scraped_at": datetime.utcnow().isoformat()
}
print(data)
5) Store the data
Use one of these:
- CSV for quick prototypes
- SQLite/PostgreSQL for reliable history
- Google Sheets for simple reporting
- BigQuery/Snowflake for analytics at scale
A database is best if you want:
- historical pricing
- trend analysis
- alerts
- dashboards
6) Schedule automation
Options:
- cron on a server
- GitHub Actions for small jobs
- AWS Lambda + EventBridge
- Google Cloud Scheduler + Cloud Run
- Airflow for more complex workflows
For example, a cron job:
0 6 * * * /usr/bin/python3 /path/to/scraper.py
7) Add change detection and alerts
Compare current scrape results to the last saved record:
- alert if price drops below a threshold
- alert if competitor is out of stock
- alert if pricing changes by more than X%
Alert channels:
- Slack
- Microsoft Teams
- SMS
8) Make it robust
Add:
- retries with backoff
- timeouts
- logging
- CAPTCHA detection
- selector validation
- fallback selectors
- deduplication
- error alerts if a page layout changes
9) Normalize competitor pricing
Prices often differ by:
- currency
- taxes
- shipping
- pack size
- bundle size
Normalize to:
- same currency
- unit price
- total landed cost
10) Monitor at scale
If tracking many pages:
- group URLs by site
- reuse sessions
- limit request rate
- cache unchanged pages if possible
- run jobs in parallel carefully
- centralize results in a database
11) Recommended stack
A good starter setup:
- Python
- Scrapy for crawling
- Playwright for JS-heavy pages
- PostgreSQL for storage
- cron/Airflow for scheduling
- Slack/email for alerts
- Docker for deployment
12) A simple architecture
- Scheduler triggers scraper
- Scraper fetches competitor pages
- Parser extracts price data
- Database stores snapshots
- Diff job compares with previous snapshot
- Alert job notifies on changes
- Dashboard shows history
If you want, I can also give you:
- a ready-to-run Python scraper template,
- a Scrapy project structure, or
- a full end-to-end architecture for monitoring 100+ competitor product pages.