--- id: flights version: "0.9.0" license: MIT license_treatment: permissive maintenance: active --- # flights — A Python wrapper for Google Flights API License: permissive · Maintenance: active · Downloads: 226.8K/mo ## 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 above — 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 pip install flights uv add flights 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_current - Install friction: low - Maintenance: active - Downloads: 226.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags google flights api wrapper, flight search library python, airfare price comparison, travel booking automation, flight data scraping alternative, mcp server flight search, multi-city flight queries, travel-api, mcp-server, reverse-engineered [View on SkillFed](https://skillfed.io/packages/flights) · [View on PyPI](https://pypi.org/project/flights/)