A local flight price tracking application with a web UI. Tracks prices daily and alerts you when prices drop below your target.
- Search flights using Amadeus API
- Track multiple routes with daily price checks
- Set target prices for alerts
- View price history and trends
- Simple web UI for easy management
- Go to developers.amadeus.com
- Create a free account
- Create a new app in the dashboard
- Copy your API Key and API Secret
cd flight-tracker
cp .env.example .envEdit .env and add your Amadeus credentials:
AMADEUS_API_KEY=your_api_key
AMADEUS_API_SECRET=your_api_secret
./run.shOpen http://localhost:8000 in your browser.
- Search Flights: Enter origin/destination (IATA codes like SFO, JFK), dates, and click "Search Only"
- Track Route: Fill in the form and click "Track Route" to start monitoring
- Set Target Price: Enter a target price to get notified when prices drop below it
- Manual Check: Click "Check" on any route to refresh prices immediately
- View History: Click "Details" to see price history and trends
The app automatically checks prices daily at 9:00 AM (configurable in the UI or via environment variables).
| Endpoint | Method | Description |
|---|---|---|
/api/routes |
GET | List all tracked routes |
/api/routes |
POST | Add a new tracked route |
/api/routes/{id} |
GET | Get route details with history |
/api/routes/{id} |
PUT | Update a route |
/api/routes/{id} |
DELETE | Delete a route |
/api/routes/{id}/check |
POST | Trigger price check |
/api/search |
POST | One-time flight search |
/api/scheduler |
GET | Get scheduler status |
Full API docs at http://localhost:8000/docs
Environment variables (in .env):
| Variable | Default | Description |
|---|---|---|
AMADEUS_API_KEY |
- | Amadeus API key (required) |
AMADEUS_API_SECRET |
- | Amadeus API secret (required) |
ENABLE_SCHEDULER |
true |
Enable automatic daily checks |
SCHEDULE_HOUR |
9 |
Hour to run daily check (0-23) |
SCHEDULE_MINUTE |
0 |
Minute to run daily check (0-59) |
DATABASE_PATH |
./data/flights.db |
SQLite database path |
Create a launchd plist to run the tracker automatically:
# Create the plist
cat > ~/Library/LaunchAgents/com.flight-tracker.plist << 'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.flight-tracker</string>
<key>ProgramArguments</key>
<array>
<string>/Users/arijroy/personal/flight-tracker/run.sh</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>WorkingDirectory</key>
<string>/Users/arijroy/personal/flight-tracker</string>
</dict>
</plist>
EOF
# Load it
launchctl load ~/Library/LaunchAgents/com.flight-tracker.plistIndian Airports:
- DEL - Delhi (Indira Gandhi International)
- BOM - Mumbai (Chhatrapati Shivaji Maharaj)
- BLR - Bengaluru (Kempegowda International)
- MAA - Chennai (Chennai International)
- CCU - Kolkata (Netaji Subhas Chandra Bose)
- HYD - Hyderabad (Rajiv Gandhi International)
- GOI - Goa (Manohar International)
- COK - Kochi (Cochin International)
- AMD - Ahmedabad (Sardar Vallabhbhai Patel)
- PNQ - Pune (Pune International)
International:
- DXB - Dubai
- SIN - Singapore
- BKK - Bangkok
- LHR - London Heathrow
- JFK - New York JFK
Find more at iata.org
- Backend: Python, FastAPI, SQLite
- Frontend: Vanilla HTML/CSS/JS
- Flight Data: Amadeus Flight Offers API
- Scheduler: APScheduler
MIT