Skip to main content
Welcome to Fli, a modern Python library that provides programmatic access to Google Flights data through direct API interaction. Search flights, find the best deals, and integrate flight search into your applications and AI assistants.

What makes Fli special?

Unlike other flight search libraries that rely on web scraping, Fli directly interacts with Google Flights’ API through reverse engineering. This approach provides:

Fast

Direct API access means faster, more reliable results without browser overhead

Zero scraping

No HTML parsing, no browser automation, just pure API interaction

Reliable

Less prone to breaking from UI changes since we use the API directly

Modular

Extensible architecture for easy customization and integration

Three ways to use Fli

CLI

Command-line interface for quick flight searches

Python API

Programmatic access for building applications

MCP Server

AI assistant integration via Model Context Protocol

Core features

Powerful search capabilities

  • One-way and round-trip searches - Search for single or return journeys
  • Flexible date searches - Find the cheapest dates within a range
  • Multi-airline support - Filter by specific airlines or search across all carriers
  • Cabin class selection - Economy, Premium Economy, Business, or First class
  • Stop preferences - Non-stop, one stop, or any number of stops
  • Custom sorting - Sort by price, duration, departure time, or arrival time
  • Time restrictions - Filter by departure and arrival time windows

Built-in protection

Fli includes automatic rate limiting (10 requests/second), retry logic with exponential backoff, and comprehensive error handling to ensure reliable operation.
  • Rate limiting - Automatic throttling to prevent API blocks
  • Automatic retries - Exponential backoff for transient failures
  • Error handling - Comprehensive validation and error messages
  • Input validation - Type-safe Pydantic models throughout

Use cases

Price tracking

Monitor flight prices over time and get alerts for deals

Travel planning

Find the cheapest dates for your next vacation

AI assistants

Let Claude or other AI assistants search flights naturally

Travel apps

Build custom travel applications with flight search

Quick example

# Search for flights from New York to Los Angeles
fli flights JFK LAX 2025-10-25

# Find cheapest dates in January
fli dates JFK LAX --from 2025-01-01 --to 2025-01-31

Next steps

Installation

Install Fli using pip, pipx, or uv

Quick start

Get started with your first flight search

MCP Server

Set up the MCP server for Claude Desktop

API Reference

Explore the complete API documentation

Build docs developers (and LLMs) love