Track Amazon product prices with a lightweight Python workflow that scrapes product data via the Olostep API, stores history in CSV + JSON, and provides both a Streamlit dashboard and CLI runners for manual and scheduled checks.
This project helps you:
- Monitor Amazon product price changes over time.
- Compare current vs previous prices (
higher,lower,same,new,unknown). - Run one-off checks from terminal or recurring checks on a schedule.
- View a compact web dashboard for URL management, tracking controls, and filtered product data.
- Streamlit dashboard (
app.py)- Add, edit, and remove tracked URLs.
- Run tracking manually.
- Start or stop the scheduler and view scheduler status.
- Filter tracked products by title/URL and price direction.
- CLI one-shot runner (
run_tracker.py) - CLI scheduler runner (
run_scheduler.py) - Auto-aligned CSV schema
- JSON history with average price and sample count
- Python 3.10+
pip- Valid
OLOSTEP_API_KEY - Internet access for API requests
pip install requests python-dotenv streamlitCreate .env:
OLOSTEP_API_KEY=your_api_key_hereCreate an API key from the Olostep API Keys dashboard, then place it in .env.
Add one URL per line in:
data/product_urls.txt
streamlit run app.pypython run_tracker.pyOptional flags:
python run_tracker.py \
--csv output/price_tracker_history.csv \
--history-json output/product_price_history.json \
--urls-file data/product_urls.txt \
--sleep 2python run_scheduler.py --interval-minutes 30Optional flags:
python run_scheduler.py \
--interval-minutes 15 \
--csv output/price_tracker_history.csv \
--history-json output/product_price_history.json \
--urls-file data/product_urls.txt \
--sleep 2All outputs are written to output/ by default.
| File | Purpose |
|---|---|
output/price_tracker_history.csv |
Latest product snapshot including current/previous price and change direction |
output/product_price_history.json |
Per-product historical timeline with computed average price |
.
├── app.py # Streamlit dashboard entrypoint
├── run_tracker.py # CLI one-time tracking runner
├── run_scheduler.py # CLI scheduled tracking runner
├── assets/
│ ├── ui.png # Dashboard screenshot
│ └── thumbnail.png # Parser preview image
├── data/
│ └── product_urls.txt # Input URLs (one per line)
├── output/
│ ├── price_tracker_history.csv # Latest snapshot rows
│ └── product_price_history.json # Per-product historical timeline
└── src/
└── tracker/
├── constants.py # Defaults and shared constants
├── csv_store.py # CSV read/write and schema alignment
├── json_history.py # JSON history persistence
├── normalizer.py # Price and payload normalization
├── olostep_client.py # Olostep request client
├── scheduler.py # Scheduling loop logic
├── service.py # Core tracking orchestration
├── url_loader.py # URL loading and validation
└── utils.py # Shared helper utilities
- If CSV schema changes, it is auto-aligned by the app.
- New products are appended.
- Existing products are updated on successful scrapes.
- On successful updates, old
priceis shifted toprevious_price.