punitarani/fli
Google Flights MCP, CLI and Python Library
What it solves
Fli provides a way to programmatically search for flights and find the cheapest travel dates using Google Flights data. It avoids the fragility of web scraping by interacting directly with Google Flights' internal APIs through reverse engineering, making the search process faster and more reliable.
How it works
Instead of parsing HTML or using browser automation, Fli issues specific GET requests to Google's public search page using protobufs. It then extracts the flight data from the inline AF_initDataCallback blob within the page's response. This approach allows it to support a wide range of filters (cabin class, stops, airlines, and alliances) and handle complex search queries, including round-trips and flexible date ranges.
Who it’s for
Developers who need to integrate flight search functionality into their applications, or power users who prefer a CLI interface for finding flight deals and filtering results.
Highlights
- Direct API Interaction: Uses reverse-engineered APIs rather than web scraping for improved speed and reliability.
- MCP Server: Includes a Model Context Protocol (MCP) server that allows AI agents (like Claude Desktop) to search for flights and find cheapest dates.
- Comprehensive Filtering: Supports detailed filters for cabin class, airline alliances, layover durations, and specific departure windows.
- Flexible Search: Supports one-way, round-trip, and multi-city searches (though multi-city is handled by searching each leg separately).
- Built-in Protections: Includes rate limiting, automatic retries, and error handling to maintain stability.
Related
- Project
- Project
- Project
- Project
- Project