flights
A Python wrapper for Google Flights API
What it is and what it does
Flights is a Python library that queries Google Flights data by reverse-engineering its internal API rather than scraping HTML. It exposes flight search functionality through both a programmatic Python interface and command-line tools, plus an MCP (Model Context Protocol) server for integration with AI assistants like Claude Desktop.
The library handles one-way and round-trip searches, multi-city itineraries, and flexible date ranges. It supports filtering by cabin class (economy through first), airline preferences, alliance restrictions, layover duration, departure time windows, and result sorting. Built-in rate limiting and automatic retries (via tenacity and ratelimit) protect against transient failures. The CLI provides human-readable output; the MCP server exposes two tools (search_flights and search_dates) for programmatic use.
Use it for:
- Build a travel booking bot or assistant that queries flight prices on behalf of users without HTML parsing
- Find the cheapest travel dates across a flexible date range for vacation planning
- Automate multi-city itinerary searches for complex trips with multiple legs
- Integrate flight search into a Claude Desktop workflow via the MCP server interface
- Filter flights by airline alliance, cabin class, or layover constraints for specific travel preferences
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Programmatic access to Google Flights search results through reverse-engineered API calls, with CLI and MCP server interfaces for flight searches, date range queries, and multi-city itineraries.
Yes, if you need programmatic flight search without web scraping. The library is actively maintained, has low install friction, permissive licensing, and no known vulnerabilities. Main caveat: reverse-engineered APIs can break without notice if Google changes its endpoints. Best suited for personal projects, travel automation, or AI assistant integration rather than mission-critical production systems.
Install
flights on PyPI
pip
pip install flightsuv
uv add flightspoetry
poetry add flightsInstalling flights
Before you install
Low friction: pure Python wheel with no compiled dependencies. Active maintenance (last commit 2026-07-20, 3098 GitHub stars). Requires Python 3.10+. Nine runtime dependencies including httpx, pydantic, and tenacity suggest solid error handling and retry logic.
License in practice
MIT license (permissive) means you can use, modify, and distribute this package freely in commercial or private projects with minimal restrictions.
Quickstart
pip install flights
from flights import FlightSearch
search = FlightSearch()
results = search.search_flights(
origin='JFK',
destination='LHR',
departure_date='2026-10-25'
)
Requires Python 3.10 or later. Reverse-engineered API access may break if Google Flights changes its internal endpoints.
Verify before relying
- Whether the reverse-engineered API access is stable long-term or subject to frequent breaking changes
- Rate limiting behavior and whether free tier has usage quotas or throttling
- Whether multi-city searches work reliably across all route combinations
- Accuracy and freshness of pricing data compared to live Google Flights
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 9 — babel, curl-cffi, httpx, plotext, pydantic, python-dotenv, ratelimit, tenacity, typer |
| Maintenance | actively maintained — 85 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 226,806/month — #9,195 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: flights-0.9.0-py3-none-any.whl
Keywords: api, flight-search, flights, google-flights, travel
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
fast-flightsScrapes flight data from Google Flights by…
permissive · top 15,000 on PyPI
FlightRadarAPIUnofficial Python SDK for querying…
permissive · top 15,000 on PyPI
airportsdataProvides a static database of airport location,…
permissive · top 5,000 on PyPI
fr24fr24 retrieves real-time and historical flight…
permissive · top 15,000 on PyPI
wikipedia-mcpExposes Wikipedia search, article retrieval,…
permissive · top 15,000 on PyPI
fprime-toolsProvides command-line tools and utilities for…
permissive · top 15,000 on PyPI
notebooklm-mcp-cliProvides CLI and MCP server access to Google…
permissive · top 15,000 on PyPI
icalendar-searcherSearches, filters, and sorts iCalendar…
agpl · top 15,000 on PyPI
adbc-driver-flightsqlProvides a DBAPI 2.0-compatible Python…
permissive · top 15,000 on PyPI
currency-symbolsMaps ISO 4217 currency codes to their symbols…
permissive · top 5,000 on PyPI