Fast JSON API for Google Flights - one-way and round-trip flight search with stops, airlines, price, time and duration filters, prices, schedules, layovers, aircraft and emissions, price insights with price history, and airport and city search.
Includes 100 free calls per month
After the free quota, standard per-request pricing applies via x402 (USDC on Base).
Returns the price insights of a route on a date: the lowest price, whether it is low, typical or high, the typical price range and the price history of the cheapest flight over the past two months.
Request schema
Where from: an airport code (e.g. "JFK") or a city id (e.g. "/m/02_286" for New York), or up to 7 of them separated by commas. Use the /search/locations endpoint to list valid values.
Where to: an airport code (e.g. "LAX") or a city id, or up to 7 of them separated by commas. Use the /search/locations endpoint to list valid values.
Departure date, YYYY-MM-DD.
Optional return date, YYYY-MM-DD, for a round trip.
Optional number of adults, 1 to 9 (defaults to 1).
Optional travel class (defaults to "economy"). Use the /general/travel-classes endpoint to list valid values.
Optional limit on the number of stops (defaults to "any"). Use the /general/stops endpoint to list valid values.
Optional currency of the prices (defaults to "USD"). Use the /general/currencies endpoint to list valid values.
Optional country the search is made from (defaults to "US"). Use the /general/countries endpoint to list valid values.
Response schema
Searches one-way and round-trip flights between two airports or cities on a date. Returns the best flights and the other flights, each with its price, departure and arrival, total duration, stops, layovers, every flight with airline, flight number, aircraft, legroom and emissions, plus the price insights of the route (lowest price, price level, typical price range and price history), and the airlines, alliances and connecting airports that can be filtered by, with the price range of the route. The price of an outbound flight of a round trip is that of the whole round trip.
Request schema
Where from: an airport code (e.g. "JFK") or a city id (e.g. "/m/02_286" for New York), or up to 7 of them separated by commas (e.g. "JFK,EWR"). Use the /search/locations endpoint to list valid values.
Where to: an airport code (e.g. "LAX") or a city id (e.g. "/m/030qb3t" for Los Angeles), or up to 7 of them separated by commas. Use the /search/locations endpoint to list valid values.
Departure date, YYYY-MM-DD.
Optional return date, YYYY-MM-DD, for a round trip. Leave it out for a one-way trip.
Optional number of adults, 1 to 9 (defaults to 1).
Optional number of children aged 2 to 11 (defaults to 0).
Optional number of infants under 2 in their own seat (defaults to 0).
Optional number of infants under 2 on a lap, at most one per adult (defaults to 0).
Optional travel class (defaults to "economy"). Use the /general/travel-classes endpoint to list valid values.
Optional limit on the number of stops (defaults to "any"). Use the /general/stops endpoint to list valid values.
Optional comma-separated airline codes (e.g. "DL,AA") or alliances ("ONEWORLD", "SKYTEAM", "STAR_ALLIANCE") to fly with. The /flights/search endpoint lists the airlines of a route.
Optional highest price, in the currency asked for.
Optional longest total duration of a flight, in minutes.
Optional departure hours of the outbound flight as "from,to" (e.g. "6,12" leaves between 6:00 and 12:59), optionally followed by arrival hours (e.g. "6,12,18,23"); hours are 0 to 23.
Optional departure hours of the return flight, in the same format as "outbound_times".
Optional sort order (defaults to "best"). Use the /general/sort-orders endpoint to list valid values.
Optional currency of the prices (defaults to "USD"). Use the /general/currencies endpoint to list valid values.
Optional language of the names (defaults to "en"). Use the /general/languages endpoint to list valid values.
Optional country the search is made from, which decides the offers and sellers (defaults to "US"). Use the /general/countries endpoint to list valid values.
Response schema
Lists the countries accepted by the "country" parameter, each with its code and name.
Request schema
Optional language of the names (defaults to "en").
Response schema
{
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"name": {
"type": "string"
}
}
}
}Lists the currencies accepted by the "currency" parameter, each with its code and name.
Request schema
Optional language of the names (defaults to "en").
Response schema
{
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"name": {
"type": "string"
}
}
}
}Lists the languages accepted by the "language" parameter, each with its code, English name and native name.
Request schema
{
"type": "object",
"properties": {}
}Response schema
{
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"name": {
"type": "string"
},
"native_name": {
"type": "string"
}
}
}
}Lists the values accepted by the "sort" parameter of the flight searches.
Request schema
{
"type": "object",
"properties": {}
}Response schema
{
"type": "array",
"items": {
"type": "object",
"properties": {
"value": {
"type": "string"
},
"label": {
"type": "string"
}
}
}
}Lists the values accepted by the "stops" parameter.
Request schema
{
"type": "object",
"properties": {}
}Response schema
{
"type": "array",
"items": {
"type": "object",
"properties": {
"value": {
"type": "string"
},
"label": {
"type": "string"
}
}
}
}Lists the values accepted by the "travel_class" parameter.
Request schema
{
"type": "object",
"properties": {}
}Response schema
{
"type": "array",
"items": {
"type": "object",
"properties": {
"value": {
"type": "string"
},
"label": {
"type": "string"
}
}
}
}Searches airports, cities and regions by name or code, as the "Where from?" and "Where to?" fields of Google Flights suggest them. Each result has its type and the id the other endpoints take: an airport its IATA code, a city and a region their id. A city comes with its airports and their distance.
Request schema
Name or code of an airport, city, country or region (e.g. "new york", "LHR" or "italy").
Optional language of the names (defaults to "en"). Use the /general/languages endpoint to list valid values.
Response schema
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string"
},
"name": {
"type": "string"
},
"city": {
"type": "string"
},
"description": {
"type": "string"
},
"city_id": {
"type": "string"
},
"airports": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string"
},
"name": {
"type": "string"
},
"city": {
"type": "string"
},
"description": {
"type": "null"
},
"city_id": {
"type": "string"
},
"distance": {
"type": "string"
}
}
}
}
}
}
}Easiest way: the APIHub CLI. Credits cover x402, no wallet needed.
# install and set up once
npx @apihubio/cli register
npx @apihubio/cli topup 10
# call this service
npx @apihubio/cli call -X GET "https://proxy.apihub.io/googleflights/v1/flights/price-insights" \
-d '{"departure_id":"JFK","arrival_id":"LAX","outbound_date":"2027-03-10","return_date":"2027-03-17","adults":"1","travel_class":"economy","stops":"any","currency":"USD","country":"US"}'Or call the proxy directly (curl / any HTTP client):
curl https://proxy.apihub.io/googleflights/v1/flights/price-insights \
-H "Authorization: Bearer ahk_your_key"
# If credits available: charged automatically, returns 200
# Otherwise: returns 402 (pay via @x402/fetch or top up credits)Estimate your monthly cost for Google Flights.