skillfed

flights

A Python wrapper for Google Flights API

flights v0.9.0 226.8K downloads/30d#9,195 on PyPI3,098
Permissive license MIT Active released

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 flights

uv

uv add flights

poetry

poetry add flights

Installing 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

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Topic :: Internet :: WWW/HTTP :: Indexing/SearchTopic :: Software Development :: Libraries :: Python Modules

Tags

google flights api wrapperflight search library pythonairfare price comparisontravel booking automationflight data scraping alternativemcp server flight searchmulti-city flight queries
travel-apimcp-serverreverse-engineered

More Python Modules packages