Skip to main content

flight-search banner

✈️ flight-search

PyPI Python License

CLI tool to search Google Flights. Get prices, times, and airlines from the command line.

$ flight-search DEN LAX --date 2026-03-01

✈️  DEN → LAX
   One way · 2026-03-01
   Prices are currently: typical

──────────────────────────────────────────────────
   Frontier ⭐ BEST
   🕐 10:43 PM → 12:30 AM +1
   ⏱️  2 hr 47 min
   ✅ Nonstop
   💰 $84

──────────────────────────────────────────────────
   United ⭐ BEST
   🕐 5:33 PM → 7:13 PM
   ⏱️  2 hr 40 min
   ✅ Nonstop
   💰 $139

Built on top of fast-flights - no API key required.

Installation

# one-liner
curl -fsSL https://raw.githubusercontent.com/Olafs-World/flight-search/main/install.sh | bash

# using uv (recommended)
uv tool install flight-search

# or pip
pip install flight-search

# or run directly without installing
uvx flight-search DEN LAX --date 2026-03-01

Updating

# check current version
flight-search --version

# update with uv
uv tool upgrade flight-search

# or with pip
pip install --upgrade flight-search

# or with pipx
pipx upgrade flight-search

Usage

# One-way flight
flight-search DEN LAX --date 2026-03-01

# Round trip
flight-search JFK LHR --date 2026-06-15 --return 2026-06-22

# Multiple passengers, business class
flight-search SFO NRT --date 2026-04-01 --class business --adults 2

# JSON output for scripts
flight-search ORD CDG --date 2026-05-01 --output json

Options

positional arguments:
  origin                Origin airport code (e.g., DEN, LAX, JFK)
  destination           Destination airport code

options:
  --date, -d            Departure date (YYYY-MM-DD) [required]
  --return, -r          Return date for round trips (YYYY-MM-DD)
  --adults, -a          Number of adults (default: 1)
  --children, -c        Number of children (default: 0)
  --class, -C           Seat class: economy, premium-economy, business, first
  --limit, -l           Max results (default: 10)
  --output, -o          Output format: text or json (default: text)

JSON Output

flight-search DEN LAX --date 2026-03-01 --output json
{
  "origin": "DEN",
  "destination": "LAX",
  "date": "2026-03-01",
  "return_date": null,
  "current_price": "typical",
  "flights": [
    {
      "airline": "Frontier",
      "departure_time": "10:43 PM",
      "arrival_time": "12:30 AM",
      "duration": "2 hr 47 min",
      "stops": 0,
      "price": 84,
      "is_best": true
    }
  ]
}

Troubleshooting

"401 no token provided" error

This can happen when the underlying library's fallback request method fails. Workarounds:

  1. Try again - Sometimes transient
  2. Use from a different network - Some networks/regions have issues
  3. Install Playwright for local browser mode:
    pip install playwright
    playwright install chromium
    

The library scrapes Google Flights directly. It doesn't require an API key, but Google's anti-bot measures can sometimes block requests.

Python API

from flight_search import search_flights

result = search_flights(
    origin="DEN",
    destination="LAX", 
    date="2026-03-01",
    adults=2,
    seat_class="economy",
)

for flight in result.flights:
    print(f"{flight.airline}: ${flight.price}")

Links

Self-Update

# Auto-detects how you installed it (uv/pipx/pip) and upgrades
flight-search --upgrade

Release files for flight-search 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flight-search 0.1.7
File Size Uploaded
flight_search-0.1.7.tar.gz 880.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for flight-search 0.1.7
File Interpreter ABI Platform
flight_search-0.1.7-py3-none-any.whl Python 3 none any Details

Total release size: 889.0 kB

Release files / flight_search-0.1.7.tar.gz

Download URL flight_search-0.1.7.tar.gz
Size 880.5 kB
Tags Source
SHA-256 checksum
How to use checksums
665f80b756d5bdf191eac4317ecf75852a6754f259098d4911c2dd1b074eaa73
BLAKE2b-256 checksum
How to use checksums
26de68593e279f496d2b6f9a850161a0bd22b8592515422dc4d6feff6fd650ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / flight_search-0.1.7-py3-none-any.whl

Download URL flight_search-0.1.7-py3-none-any.whl
Size 8.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
58dfdd6045f2cf715b20bc73f1825e9d55ac0a9712ec04f3c3dd1dcc7904a24a
BLAKE2b-256 checksum
How to use checksums
9f4b87c216b302c07d6fd7bfc5cb52d1f63caab6d9dc60f2458da0fcad6b3bd1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.1.7 This release

2 release files

0.1.6

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page