Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Amazon Product Price Tracker (Python + Streamlit + Olostep API)

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.

Amazon Product Price Tracker Streamlit Dashboard

Why This Project

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.

Features

  • 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

Prerequisites

  • Python 3.10+
  • pip
  • Valid OLOSTEP_API_KEY
  • Internet access for API requests

Quick Start

1) Install dependencies

pip install requests python-dotenv streamlit

2) Configure environment

Create .env:

OLOSTEP_API_KEY=your_api_key_here

Create an API key from the Olostep API Keys dashboard, then place it in .env.

3) Add product URLs

Add one URL per line in:

data/product_urls.txt

Run the App

Streamlit dashboard

streamlit run app.py

CLI one-time tracking

python run_tracker.py

Optional 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 2

CLI scheduled tracking

python run_scheduler.py --interval-minutes 30

Optional 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 2

Output Files

All 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

Project Structure

.
├── 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

Notes

  • 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 price is shifted to previous_price.

Olostep Parser Reference

About

Track Amazon product prices over time using the Olostep API, the most reliable and cost effective Web search, scraping, and crawling API — with a Streamlit dashboard, CSV/JSON history, and support for both one-time and scheduled CLI runs.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages