@tank/flight-search
1.0.1Description
Search flights via fast-flights (no API key, ~3s, Google Flights protobuf). Live status via Flightradar24. Price tracking with watch list. Airport lookup (40+ cities). Optional SerpAPI/Amadeus.
Triggered by
find flightscheap flightsflight pricesfly toflights fromSkyscanner
Download
Review Recommended
tank install @tank/flight-searchFlight Search
Search flights, compare prices, find cheapest dates — no API keys needed.
Core Philosophy
- fast-flights first —
pip install fast-flights playwrightgives you Google Flights data in ~3 seconds via protobuf reverse-engineering. No API key, no browser windows, no scraping overhead. - Chrome DevTools as fallback — If fast-flights isn't installed, scrape Google Flights directly via the browser. Returns the same data, takes ~10s.
- Paid APIs are optional — SerpAPI, Amadeus, Travelpayouts add structured JSON. Nice extras, never required.
- City names to IATA codes —
scripts/airport_lookup.pyresolves 40+ cities offline, zero deps. - Always give comparison links — End every search with Google Flights + Skyscanner + Kayak URLs.
Quick-Start: Common Tasks
"Find flights from X to Y" (primary — fast-flights)
- Resolve city names ->
scripts/airport_lookup.py "city name" - Search:
scripts/search_google_flights.py --origin AMM --destination SYD --date 2026-07-15 - Present results as comparison table + booking links
-> See
references/open-source-tools.mdfor fast-flights details
"Find flights from X to Y" (fallback — Chrome DevTools)
- Build Google Flights URL and navigate via Chrome DevTools
- Handle consent, wait for results, parse accessibility tree
-> See
references/agent-tools-workflow.mdfor step-by-step
"When is the cheapest time to fly?"
- Run fast-flights with different dates and compare prices
- Or web search:
"cheapest month to fly {origin} to {dest}" - With TRAVELPAYOUTS_TOKEN:
scripts/price_calendar.py
Workflow Priority
| Tier | Approach | Speed | Requires |
|---|---|---|---|
| 1 | search_google_flights.py (fast-flights) | ~3s | pip install fast-flights playwright |
| 2 | Chrome DevTools → Google Flights | ~10s | Chrome DevTools MCP connected |
| 3 | Exa/Google web search | ~3s | Web search tool (always available) |
| 4 | search_flights.py (SerpAPI/Amadeus) | ~2s | SERPAPI_KEY or AMADEUS_* |
Scripts
| Script | Purpose | Requires |
|---|---|---|
scripts/search_google_flights.py | Google Flights via fast-flights | pip install fast-flights playwright |
scripts/flight_tracker.py | Track prices over time (add/check/list/remove) | fast-flights for check; add/list/remove need nothing |
scripts/flight_status.py | Live flight status (delays, gates) | RAPIDAPI_KEY optional (free 600/mo) |
scripts/airport_lookup.py | City name to IATA code | Nothing (40+ cities builtin) |
scripts/search_flights.py | SerpAPI/Amadeus search | SERPAPI_KEY or AMADEUS_* |
scripts/price_calendar.py | Cheapest price per day | TRAVELPAYOUTS_TOKEN |
Tracking Workflows
"Track this flight's price"
flight_tracker.py add --origin JFK --destination LHR --date 2026-09-15- Stores in
/tmp/flight-tracker/watches.jsonwith price history - When user asks "check my flights":
flight_tracker.py check→ re-searches all routes, compares to last price flight_tracker.py list→ show all watched routes + last pricesflight_tracker.py remove --id 0→ stop tracking
"Is flight BA178 on time?"
- With RAPIDAPI_KEY:
flight_status.py BA178→ delay, gate, terminal - Without key: use web search for
"BA178 flight status today"
Decision Trees
Query Type Routing
| User Request | Best Tool |
|---|---|
| Specific route + date | search_google_flights.py |
| "What's the code for Tokyo?" | airport_lookup.py |
| "Track JFK to LHR" | flight_tracker.py add then check |
| "Check my tracked flights" | flight_tracker.py check |
| "Is BA178 delayed?" | flight_status.py BA178 or web search |
| "Cheapest day in September" | fast-flights with multiple dates |
| Need structured JSON | search_flights.py with SERPAPI_KEY |
Booking Link Construction
| Engine | URL Pattern |
|---|---|
| Google Flights | https://www.google.com/travel/flights?q=flights+from+{ORIGIN}+to+{DEST}+on+{DATE}&curr=USD&hl=en |
| Skyscanner | https://www.skyscanner.com/transport/flights/{orig}/{dest}/{YYMMDD}/{YYMMDD}/?adultsv2=1&cabinclass=economy |
| Kayak | https://www.kayak.com/flights/{ORIG}-{DEST}/{YYYY-MM-DD}/{YYYY-MM-DD}?sort=bestflight_a |
Reference Index
| File | Contents |
|---|---|
references/open-source-tools.md | fast-flights usage, LetsFG, irrisolto/skyscanner (alternatives) |
references/agent-tools-workflow.md | Chrome DevTools scraping, web search fallback, URL construction |
references/api-comparison.md | All flight APIs compared: pricing, limits, coverage gaps |
references/serpapi-integration.md | SerpAPI Google Flights: endpoints, parameters, response parsing |
references/amadeus-integration.md | Amadeus: auth, airport lookup, flight search, airline gaps |
references/search-strategies.md | Query interpretation, price tips, output formatting |