# fli: Search Google Flights from Python, CLI, and MCP

This repository profile is provided by osrepos.com, an open source repository discovery platform.

Source: osrepos.com
Repository profile: https://osrepos.com/repo/punitarani-fli
Generated for open source discovery and AI-assisted research.

Fli is a Python library, CLI, and MCP server for searching Google Flights through its public search page. It provides flight and date searches with filters, plus a TypeScript port for JavaScript users.

GitHub: https://github.com/punitarani/fli
OSRepos URL: https://osrepos.com/repo/punitarani-fli

## Summary

Fli is a Python library, CLI, and MCP server for searching Google Flights through its public search page. It provides flight and date searches with filters, plus a TypeScript port for JavaScript users.

## Topics

- python
- library
- cli
- mcp-server
- google-flights
- flight-search
- flight-booking

## Repository Information

Last analyzed by OSRepos: Sat Oct 24 2026 15:30:21 GMT+0100 (Western European Summer Time)
Detail views: 9
GitHub clicks: 0

## Safety Notice

OSRepos shares public repositories for knowledge and discovery only. Review source code, dependencies, licenses, and security implications before running or installing anything.

## Content

## Overview

Fli is a Python library, CLI, and MCP server for programmatic access to Google Flights. Rather than scraping rendered HTML or automating a browser, it sends a request to Google Flights' public search page and extracts results from the page's inline data. A TypeScript port, `fli-js`, provides a parallel API.

It is aimed at developers and AI assistant users who want flight search in scripts, terminal workflows, or MCP-compatible clients. It supports searches for specific travel dates and flexible date ranges, with filters for cabin, stops, airlines, alliances, and passengers.

## Key Features

- Search one-way and round-trip flights, and find prices across a flexible date range.
- Filter results by cabin class, stops, departure window, airline, alliance, and layover bounds.
- Set passenger counts, currency, language, and country for searches.
- Use the `fli` CLI, Python API, or MCP server over STDIO or streamable HTTP.
- Use `fli-js`, the TypeScript port, for a corresponding JavaScript or TypeScript API.
- Apply result sorting, retries, rate limiting, input validation, and error handling.

## Use Cases

- A developer can add Google Flights results to a Python script or application without writing page parsing code.
- A traveler can compare routes and dates from the terminal, including airline, stop, and cabin preferences.
- An MCP client user can request flight searches conversationally through an assistant such as Claude Desktop.
- A team using TypeScript can build flight-search workflows with the `fli-js` package and the same search-page transport.

## Our Take

Fli is an actively maintained, MIT-licensed option for integrating Google Flights searches, with a clear trade-off: its page-based transport has meaningful limits compared with Google's gated results APIs.

**Good fit if:**
- You want Google Flights searches in Python, a CLI, an MCP client, or TypeScript.
- Your workflow can work within the available page results and supported filters.
- You value a project with recent commits and releases, and contributions from multiple people rather than dependence on one contributor.

**Look elsewhere if:**
- You need multi-city results from a single search or booking-option results from Google.
- Your application depends on emissions, bag, or basic-economy-exclusion filters, which the current transport cannot support.
- Your search requires reliably complete results for children or infants, or a full calendar grid for date ranges.

## Project Health

| Signal | Value |
|---|---|
| Status | **Active**: regular commits and releases |
| Last commit | 2026-09-20 (1 month ago) |
| Commits, last 90 days | 35 |
| Releases, last 12 months | 13 (latest fli-js-v0.0.4, 2026-05-24) |
| Contributors | 29 (top contributor: 74% of commits) |
| Issues closed, last 90 days | 22 (typically closed in 70 days) |
| Pull requests merged, last 90 days | 35 (typically merged in 0 days) |
| Project age | 22 months |

Checked on 2026-10-24 with the GitHub API.

## Project Facts

- Language: Python
- License: MIT
- Stars: 3.3k
- Forks: 405
- Topics: api, flights-api, google-flights, google-flights-api, mcp, mcp-server
- Website: https://deepwiki.com/punitarani/fli
- Archived: no

## What You Need

Detected in the repository:

- Python >=3.10 (from pyproject.toml)
- A Dockerfile, so it can run in a container; a Compose file sets up the related services
- A test suite and automated checks on GitHub Actions

## Getting Started

Install the Python package and try the CLI:

```bash
pipx install flights
fli --help
```

For MCP use, install the same package and run `fli-mcp`. See the [README](https://github.com/punitarani/fli#readme) for setup, options, and API examples.

## License in Plain Words

**MIT** (permissive).

- Commercial use: yes
- Modify and redistribute: yes
- You must keep: the copyright and license notice
- Share your changes: no

A summary, not legal advice: the LICENSE file is what applies.

## Considerations

- The project is active, with regular commits and releases, and has contributions from 29 people; contributor activity is not concentrated on one person. Recent issue closures and merged pull requests indicate ongoing maintenance, though the reported median issue close time is about ten weeks.
- The transport reads results from Google's public search page. Multi-city searches are unsupported through the library search API, booking-option lookup is unavailable, and three filters are dropped with a warning.
- A page search returns fewer itineraries than the former RPC-based approach. Results can be especially sparse for children and infants, and date-range searches fetch each date individually, with a maximum range of 93 dates.
- Google may return a page without result data or present a consent interstitial in some regions. The README documents retries and the `FLI_SOCS_COOKIE` setting; corporate TLS-intercepting proxies may require a configured CA bundle.
- The Python package requires Python 3.10 or later. The repository also documents Docker-based development and CI, but end users can start with the package installation above.