gflights
Unofficial async Python client for Google Flights, powered by a Rust backend (via PyO3/maturin).
Search flights, price graphs, date grids, multi-city itineraries, cheapest
dates, and destination exploration — all as native asyncio coroutines, with
no browser or scraping framework required.
Install
pip install gflights
Prebuilt wheels (CPython 3.10+, abi3) are published for Linux (x86_64), Windows (x64), and macOS (arm64). Other platforms build from the source distribution and require a Rust toolchain.
Quick start
import asyncio
from gflights import Client
async def main():
client = Client(currency="USD", country="US")
flights = await client.search(
origin="LHR", # IATA code or city name
destination="JFK",
date="2026-09-15", # str or datetime.date
)
for f in flights[:5]:
print(f.airline, f.price, f.duration_minutes, "min", f.stops, "stop(s)")
asyncio.run(main())
Locale (currency / language / country) is fixed per client at construction.
Currency accepts an ISO-4217 string or a Currency enum member
(Client(currency=Currency.USD)); date arguments accept "YYYY-MM-DD" strings
or datetime.date objects.
Features
search— one-way and round-trip flight search with filters (stops, airlines and alliances, connecting airports, max price, baggage, sort order, lower emissions).price_graph— cheapest fare per departure day across a date range.date_grid— full departure × return price matrix for round trips.cheapest_dates— cheapest departure dates over a range of months (one-way or fixed-length round trips).multi_city_search— open-jaw itineraries across multiple legs.explore— discover cheap destinations from an origin airport.deals— discounted destinations from an origin (price vs typical price).offer— price the cheapest itinerary and resolve real booking URLs.- Passenger counts grouped into a
Passengersobject and shared result filters into aSearchFiltersobject (adults, children, infants; class, stops, sort, airlines, via, max price, baggage, lower emissions). - Typed results (
FlightResult,CheapDate,ExploreResult,DealResult,Offer,BookingOption,EmissionsInfo,LayoverInfo,LegInfo) with.to_dict()and clean__repr__, plus full.pyistubs for IDE/mypy. - Built-in rate limiting and retry with 429 detection.
Proxy & User-Agent
client = Client(
proxy="socks5://127.0.0.1:9050", # http://, https://, or socks5://
user_agent="Mozilla/5.0 ...", # default: rotating real desktop UA
)
Error handling
All API calls raise GFlightsError on network or parse failures:
from gflights import Client, GFlightsError
try:
flights = await client.search(origin="LHR", destination="JFK", date="2026-09-15")
except GFlightsError as e:
print("lookup failed:", e)
Links & license
- Source, full documentation, and the Rust crate: https://github.com/nas-/google-flights-rs
MIT licensed. This is an unofficial client and is not affiliated with Google.
Metadata
Release files for gflights 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gflights-0.3.1.tar.gz | 460.4 kB | With provenance | Details for gflights-0.3.1.tar.gz |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gflights-0.3.1-cp310-abi3-win_amd64.whl | CPython 3.10 | abi3 | Windows x86-64 | Details for gflights-0.3.1-cp310-abi3-win_amd64.whl |
| gflights-0.3.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ x86-64 | Details for gflights-0.3.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
| gflights-0.3.1-cp310-abi3-macosx_11_0_arm64.whl | CPython 3.10 | abi3 | macOS 11.0+ ARM64 | Details for gflights-0.3.1-cp310-abi3-macosx_11_0_arm64.whl |
Total release size: 11.9 MB
Release files / gflights-0.3.1.tar.gz
| Download URL | gflights-0.3.1.tar.gz |
|---|---|
| Size | 460.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
05c965d1640eace4be093551b96a2d93772cd1d2ee6f7ed32b8c80b36e8cf156
|
|
BLAKE2b-256 checksum How to use checksums |
33f6562152f839e73ff3008602308e7710bc4c77def142ae6775b49e9b69ae00
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.
Transparency logRelease files / gflights-0.3.1-cp310-abi3-win_amd64.whl
| Download URL | gflights-0.3.1-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 3.5 MB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
500fac16528b1a4dd02501b4400772abf23f95de7db715dcb94845e9461e3289
|
|
BLAKE2b-256 checksum How to use checksums |
d15103984e2cf74044731d78ee50eede53c4855a712b30f03b77383d6ef15681
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.
Transparency logRelease files / gflights-0.3.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | gflights-0.3.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 4.1 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
467c7100e1de84560fc07758314f5bcca2da4926e895f0bdda3970eb50928fb1
|
|
BLAKE2b-256 checksum How to use checksums |
feb96fa2918f20538aea002f686c7eb0fbd4913b51bd09279f761dface83ed03
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.
Transparency logRelease files / gflights-0.3.1-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | gflights-0.3.1-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 3.7 MB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
4beabbc3dcbe68d02aa67ca05b84f58c5f9bc0ccf09d1ff8a7be3cd011655850
|
|
BLAKE2b-256 checksum How to use checksums |
de2d948a31e9268a50203e235767bd09d5da3ecff6043559906c03f090c78a59
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.
Transparency logSecurity for gflights 0.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 4 files in this release have been uploaded with provenance metadata.
Attestation for gflights-0.3.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.