FlightSearchFilters
Complete set of filters for flight search on specific dates.Type of flight journey (round trip or one-way)
Passenger configuration for the search
List of flight segments (typically 1 for one-way, 2 for round trip)
Maximum number of stops allowed in the flight
Cabin class preference
Maximum price constraint for the search
Filter by specific airlines
Maximum flight duration in minutes
Constraints for layovers in multi-leg flights
Sorting option for flight results
Methods
Formats filters into Google Flights API structure
URL encodes the formatted filters for API request
DateSearchFilters
Filters for searching flights across a date range to find cheapest travel dates.Type of flight journey (round trip or one-way)
Passenger configuration for the search
List of flight segments for the search
Maximum number of stops allowed in the flight
Cabin class preference
Maximum price constraint for the search
Filter by specific airlines
Maximum flight duration in minutes
Constraints for layovers in multi-leg flights
Start date for the search range in YYYY-MM-DD format
End date for the search range in YYYY-MM-DD format
Trip duration in days (required for round trips)
Properties
Parses the from_date string into a datetime object
Parses the to_date string into a datetime object
Methods
Formats filters into Google Flights API structure
URL encodes the formatted filters for API request
FlightSegment
A segment represents a single portion of a flight journey between two airports.Nested list structure for departure airports (matches Google Flights API format)
Nested list structure for arrival airports (matches Google Flights API format)
Travel date in YYYY-MM-DD format (must not be in the past)
Time constraints for departure and arrival
Previously selected flight for fetching return flights
Properties
Parses the travel_date string into a datetime object
PassengerInfo
Passenger configuration for flight search.Number of adult passengers (non-negative)
Number of child passengers (non-negative)
Number of infants occupying a seat (non-negative)
Number of infants sitting on an adult’s lap (non-negative)
TimeRestrictions
Time constraints for flight departure and arrival in local time. All times are in hours from midnight (e.g., 20 = 8:00 PM).Earliest departure time in hours (0-23)
Latest departure time in hours (1-24)
Earliest arrival time in hours (0-23)
Latest arrival time in hours (1-24)
PriceLimit
Maximum price constraint for flight search.Maximum price (positive integer)
Currency for the price limit (currently only USD is supported)
LayoverRestrictions
Constraints for layovers in multi-leg flights.Specific airports to allow for layovers
Maximum layover duration in minutes (positive integer)