A self-hosted Amazon price tracker that monitors product prices over time and sends email alerts when your target price is hit. Built with Python, FastAPI, SQLite, and React.
[https://youtu.be/1Mk60u60mic?si=-QW72TLr7iP8EaX6]
- Track multiple Amazon products simultaneously
- Logs price history on every check and surfaces the lowest recorded price
- Email alerts via Gmail when a product hits your target price — with spam prevention so you only get one alert per day per product
- Automated background price checks via cron, runs every 6 hours
- Manual price check trigger from the dashboard
- Add, update target price, and delete tracked products from a clean React frontend
| Layer | Technology |
|---|---|
| Backend | FastAPI, Python |
| Database | SQLite |
| Scraping | Requests, BeautifulSoup4 |
| smtplib, Gmail App Password | |
| Frontend | React, Vite |
| Automation | Cron |
Scrappy/
├── scrapper.py # Fetches product title and price from Amazon
├── database.py # SQLite setup and all DB queries
├── emailer.py # Sends price alert emails via Gmail
├── tracker.py # Core logic — loops all products, checks prices, triggers alerts
├── app.py # FastAPI backend serving all endpoints
├── .env # Credentials (not committed)
├── tracker.log # Cron output log
└── frontend/ # React + Vite frontend
git clone https://github.com/yourusername/scrappy.git
cd scrappy
python3 -m venv venv
source venv/bin/activate
pip install requests beautifulsoup4 python-dotenv fastapi uvicornCreate a .env file in the root:
SENDER_EMAIL=yourgmail@gmail.com
APP_PASSWORD=xxxx xxxx xxxx xxxx
RECEIVER_EMAIL=yourgmail@gmail.com
To generate a Gmail App Password: Google Account > Security > 2-Step Verification > App Passwords.
uvicorn app:app --reloadcd frontend
npm install
npm run devcrontab -eAdd this line:
0 */6 * * * cd /path/to/Scrappy && /path/to/Scrappy/venv/bin/python tracker.py >> /path/to/Scrappy/tracker.log 2>&1
- User adds an Amazon product URL and sets a target price via the frontend
- The backend scrapes the current price and saves it to the database
- Every 6 hours, cron runs
tracker.pywhich checks all tracked products - Each price check is logged to
price_history— the lowest ever recorded is always available - If the current price is at or below the target, an email alert is sent
- A
last_alertedtimestamp prevents duplicate alerts on the same day
| Method | Endpoint | Description |
|---|---|---|
| GET | /products | Get all tracked products |
| POST | /products/add | Add a new product |
| DELETE | /products/{id} | Delete a product |
| POST | /products/{id}/update | Update target price |
| POST | /run-check | Manually trigger a price check |
- This project is intended for personal use
- Amazon's scraping tolerance varies — occasional blocks may occur
- Cron only runs while your machine is on