← all repositories
punitarani/fli

Reverse-engineering Google Flights for scripts and LLMs

Fli reverse-engineers Google Flights' internal API to give scripts, terminals, and LLM agents a stable, scraper-free way to search fares.

3k stars Python Coding Assistants
fli
Not currently ranked — collecting fresh signals.
star history

What it does

Fli is a Python library and command-line tool that searches Google Flights by hitting its internal API directly. It exposes one-way, round-trip, and multi-city queries with the usual filters—cabin class, alliances, layover windows, and currency—then returns structured results. It also ships as an MCP server, so LLM assistants can call it natively.

The interesting bit

Instead of scraping HTML or driving a headless browser, the project reverse-engineered Google Flights’ own API contracts. That should mean fewer breakages when someone at Google moves a div. The MCP layer is the obvious modern twist: Claude Desktop (or any MCP client) can ask for fares the same way it would read a file.

Key highlights

  • Reverse-engineered API access to Google Flights; no browser automation or HTML parsing involved
  • Supports one-way, round-trip, multi-city, and flexible-date searches
  • Fine-grained filters including airline inclusion/exclusion, alliance restrictions, layover duration, departure windows, and locale overrides
  • Built-in rate limiting, automatic retries, and input validation
  • MCP server mode over STDIO or HTTP, exposing search_flights and search_dates tools

Caveats

  • The --format json option for both flight and date searches is marked experimental, with the schema still settling

Verdict Worth a look if you want to automate travel search or give an LLM agent real-time fare data. Skip it if you need a vendor-backed, officially supported API with stability guarantees.

Frequently asked

What is punitarani/fli?
Fli reverse-engineers Google Flights' internal API to give scripts, terminals, and LLM agents a stable, scraper-free way to search fares.
Is fli open source?
Yes — punitarani/fli is open source, released under the MIT license.
What language is fli written in?
punitarani/fli is primarily written in Python.
How popular is fli?
punitarani/fli has 3k stars on GitHub.
Where can I find fli?
punitarani/fli is on GitHub at https://github.com/punitarani/fli.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.