Fli is a Python package for programmatic Google Flights search via direct API-style access, with a CLI and MCP tools for agents. It supports dated, flexible-date, and explore destination queries.
Overview
Fli exposes Google Flights data through a Python library, a command-line interface, and an MCP server for tools such as Claude Desktop. The project aims at direct interaction with Google Flights rather than HTML scraping or browser automation, with a modular layout for integration and customization.
The MCP server offers searchflights for a specific travel date with filters, searchdates for cheapest dates across a range, and searchexplore for flexible destination discovery from an origin. Parameters cover airports, cabin class, stops, time windows, airlines, alliances, layover bounds, currency, locale, country, sorting, and passenger counts including children and infants.
One-way, round-trip, and multi-airport comma-separated origins and destinations are supported on the main search path. Explore mode returns many destinations with fares when the destination is flexible, including deep links for follow-up itinerary search. Round-trip search can expand several outbound options into return choices via a configurable top-N limit.
Search traffic uses Google’s public Flights page and reads embedded result data rather than gated RPC calls, with documented limits on multi-city booking options, some filters, row counts, and date-range sweeps. Built-in rate limiting, retries, validation, and consent-cookie handling address operational constraints described in the project documentation.
Key features
- MCP searchflights, searchdates, searchexplore
- Rich airline and cabin filters
- Flexible date range pricing
- Explore-anywhere destination search
- CLI alongside Python API
- Rate limiting and retries
- Locale, currency, and country params
- Round-trip outbound expansion
Use cases
- Agent-driven flight research
- Cheapest-date travel planning
- Open-destination fare discovery
- Automated fare comparison scripts
- Travel apps avoiding HTML scraping