Skip to main content

SeatType

Available cabin classes for flights.
ECONOMY
int
default:"1"
Economy class seating
PREMIUM_ECONOMY
int
default:"2"
Premium economy class with extra legroom and amenities
BUSINESS
int
default:"3"
Business class seating
FIRST
int
default:"4"
First class seating

Usage

from fli.models import SeatType

# Use in flight search
seat_type = SeatType.BUSINESS
seat_type = SeatType.ECONOMY

MaxStops

Maximum number of stops allowed in flight search.
ANY
int
default:"0"
Any number of stops allowed
NON_STOP
int
default:"1"
Non-stop flights only (direct flights)
ONE_STOP_OR_FEWER
int
default:"2"
Maximum of one stop allowed
TWO_OR_FEWER_STOPS
int
default:"3"
Maximum of two stops allowed

Usage

from fli.models import MaxStops

# Filter for non-stop flights only
stops = MaxStops.NON_STOP

# Allow up to one stop
stops = MaxStops.ONE_STOP_OR_FEWER

SortBy

Available sorting options for flight results.
NONE
int
default:"0"
No specific sorting (default Google Flights ordering)
TOP_FLIGHTS
int
default:"1"
Sort by Google Flights’ recommended top flights
CHEAPEST
int
default:"2"
Sort by price (lowest to highest)
DEPARTURE_TIME
int
default:"3"
Sort by departure time (earliest to latest)
ARRIVAL_TIME
int
default:"4"
Sort by arrival time (earliest to latest)
DURATION
int
default:"5"
Sort by total flight duration (shortest to longest)

Usage

from fli.models import SortBy

# Sort by cheapest flights
sort_by = SortBy.CHEAPEST

# Sort by shortest duration
sort_by = SortBy.DURATION

TripType

Type of flight journey.
ROUND_TRIP
int
default:"1"
Round trip flight (outbound and return)
ONE_WAY
int
default:"2"
One-way flight
Multi-city trips (_MULTI_CITY = 3) are currently not supported and kept for reference only.

Usage

from fli.models import TripType

# Search for round trip flights
trip_type = TripType.ROUND_TRIP

# Search for one-way flights
trip_type = TripType.ONE_WAY

Currency

Supported currencies for pricing.
USD
str
default:"USD"
United States Dollar
Currently only USD is supported. Additional currencies are planned for future releases.

Usage

from fli.models.google_flights.base import Currency

# Set currency for price limit
currency = Currency.USD

Build docs developers (and LLMs) love