← Home

flightwatch

Python automation to hunt cheap flights to Europe.

This is only really useful for people that live in NYC and have a lot of bilt points / Alaska points. It watches New York to Europe for two things at once: cash round trips under $325 all-in, and Alaska Mileage Plan award seats under 25,000 points (both limits discovered as good deals during EDA). The two legs don't have to match — a cash outbound with an award return counts, and all four combinations get searched.

It runs on a Raspberry Pi on a systemd timer and pushes a message to my phone when something clears the thresholds. No paid APIs, no headless browser, no scraping service.

I edit this to give different variations on the number of PTO days I want to take, overall cost limits, flexibility with more airports.

What it alerts on

Time on the ground is measured from the day you land to the day you fly home, so an overnight transatlantic outbound doesn't get counted as a day of the trip.

The part that was actually hard

Fetching prices is easy. Deduplicating them is not.

A dense fare grid produces the same trip as every sub-window and sliding window of itself. If January 4–12 is available, so is 5–12, and 5–9, and 6–9, and 6–14. Alert on each one and the phone becomes unusable within a day.

So overlapping date ranges on a route get merged into a single run and reported once — longest stay, ties broken by earliest departure. On live data that took 10,000+ candidate trips down to 84. A real gap in availability still ends a run, so genuinely separate trips on the same route survive as separate alerts.

Deciding whether a trip is worth taking

Cheap isn't the same as good. Every candidate gets scored 0–100 on three things: the destination itself, the month you'd be there, and — when the two ends differ — whether the pair forms one coherent trip rather than two unrelated flights that happen to be cheap.

Does it work

Both providers were verified against the live sites rather than mocked.

Result
Google Flights cash fares100/100 queries, 0 errors, ~0.9s each at 2 workers
Alaska award calendar1,477 award-days from 60 HTTP calls, 388 under 25k
Round-trip pairing14-day cap, per-leg threshold, split-city detection all unit-tested
Notification failoverrelay-down → ntfy fallback verified; outbox survives outages

A real hit from the first award scan:

🏔️ Alaska award under 25k
2026-09-12  JFK→DUB (economy)
Cost: 22,500 miles + $26

Running unattended

The search horizon is today + 3 days through today + 180 days, recomputed every run. The outbox survives the Pi losing its network, so an alert generated during an outage still goes out when the connection returns — which matters more than it sounds, because the whole point is that I'm not watching.


More writeups