Google flights API
Search flights with prices and times. Call the Google flights API and get JSON back in one request. 1 credit per call. Failed calls cost nothing.
Request
origin, destination and departDate are required.
Response
If successful, the response body contains the standard envelope.data.results[] contains the flight options, each with its price, airlines, stops, times and legs.
The following example is a real response, truncated: each list shows one item and long strings are cut.
Optional parameters
Billing
Each successful request consumes 1 credit, regardless of the number of items returned. Requests that fail, or that return no items, are not billed.Pagination
This method is not paginated. A single request returns the complete result.Related methods
- Google Hotels: Accepts a leg’s
destinationNameasquery. Searches Google Hotels with prices, ratings and Google’s own filters.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
IATA airport code, e.g. JFK. Any case is accepted.
^[A-Za-z]{3}$IATA airport code, e.g. JFK. Any case is accepted.
^[A-Za-z]{3}$^\d{4}-\d{2}-\d{2}$^\d{4}-\d{2}-\d{2}$1 <= x <= 9economy, premiumEconomy, business, first Google Flights' Stops filter.
any, nonstop, oneStopOrFewer, twoStopsOrFewer Google Flights' Airlines filter, as airline codes like KQ or EK.
10^[A-Z0-9]{2}$Google Flights' Bags filter: prices include this many carry-on bags.
0 <= x <= 1Google Flights' Bags filter: prices include this many checked bags.
0 <= x <= 2Google Flights' Price filter, in USD for all adults.
x <= 9007199254740991Google Flights' Times filter for the outbound departure.
Google Flights' Times filter for the outbound arrival.
Google Flights' Duration filter.
1 <= x <= 48