APIs / Travel / Google Flights

1 credit per call9 endpoints2 datapointsChecked working 6 Dec 2026

Google Flights API

Google Flights API for one-way and round-trip fares, price calendars, deals and booking details as JSON: price, stops, airline, CO2. 9 endpoints.

Google Flights
GET/v1/google-flights/airlines
{
  "airlines": [
    {
      "code": "AA",
      "name": "American Airlines"
    },
    {
      "code": "AC",
      "name": "Air Canada"
    },
    {
      "code": "AF",
      "name": "Air France"
    }
  ]
}
200 OKJSONX-Credits-Used: 1
Recorded 12 Nov 2026 and shortened.

Sample data

What one call returns

A recorded run of airlines: the fields and shapes you will get, shortened to 3 items.

#codestringnamestring
1AAAmerican Airlines
2ACAir Canada
3AFAir France

Recorded 12 Nov 2026 · 3 items shown · 2 datapoints per itemGET /v1/google-flights/airlines

2 datapoints

Identity

  • namestring

Other

  • codestring

Playground

Run this API

cURLshell
curl "https://api.perceptlayer.com/v1/google-flights/airlines" \
  -H "X-API-Key: $API_KEY"

Google Flights · 9 endpoints

Endpoints

Every endpoint takes the same key. Open one for its parameters, the fields it returns and an example request.

EndpointRequired parametersReturnsCost
GET/v1/google-flights/airlines
none
codename
1 credit
GET/v1/google-flights/airports
none
codenamecitycountry
1 credit
GET/v1/google-flights/autocomplete
q+2 optional
typenameshort_namedescriptionidscore+2 more
1 credit
GET/v1/google-flights/booking-details
booking_tokenorigindestinationdeparture_dateairlineflight_number+8 optional
flight_detailsprice_insightsfare_optionsbaggage_infobaggage_feesbooking_metadata
1 credit
GET/v1/google-flights/calendar
origindestinationoutbound_date_startoutbound_date_end+7 optional
search_metadatasearch_parameterslowest_pricecalendar
1 credit
GET/v1/google-flights/date-range
origindestinationfrom_dateto_date+14 optional
pricecurrencyairline_namelegstrip_typeitinerary_complete+7 more
1 credit
GET/v1/google-flights/deals
departure_id+5 optional
search_metadatasearch_parametersdeals
1 credit
GET/v1/google-flights/one-way
origindestinationdeparture_date+21 optional
pricecurrencytotal_duration_minutesstopsairline_nameemissions+2 more
1 credit
GET/v1/google-flights/round-trip
origindestinationdeparture_datereturn_date+22 optional
pricecurrencyairline_namelegstrip_typeitinerary_complete+5 more
1 credit

Overview

About the Google Flights API

What you can get

The Google Flights API returns flight search results as JSON through 9 endpoints. Most take airports as 3-letter codes in origin and destination.

  • One way: one-way takes a departure_date, with cabin_class (economy, premium_economy, business or first), passenger counts, max_stops (any, nonstop, one_or_fewer or two_or_fewer), sort_by (top_flights, cheapest, departure_time, arrival_time, duration or emissions), airlines[], max_price and max_duration_minutes.
  • Round trip: round-trip adds a return_date.
  • Price calendars: date-range takes a from_date and to_date, with trip_duration; calendar takes an outbound_date_start and outbound_date_end, with return_date, trip_length, travel_class, adults and currency.
  • Deals: deals takes a departure_id, with arrival_area, travel_class and currency.
  • Booking details: booking-details takes a booking_token with the flight's origin, destination, date, airline and flight_number.
  • Reference: airports, airlines and autocomplete (for q).

How a call works

The recorded one-way search from JFK to LAX returns flights, each with price, currency, total_duration_minutes, stops, airline_name, emissions and a booking_token, plus legs with flight numbers and times. booking-details takes a booking_token, the field each recorded flight carries. Every successful call costs 1 credit; failed calls cost nothing.

TravelJSONRESTMCP

More travel APIs

Use cases

Track fares for a route and alert on drops

Use the Google Flights API to track fares for a route and alert on drops

Find the cheapest dates with `date-range` or `calendar`

Use the Google Flights API to find the cheapest dates with `date-range` or `calendar`

Scan fare deals from a `departure_id` to an `arrival_area`

Use the Google Flights API to scan fare deals from a `departure_id` to an `arrival_area`

Compare emissions between flight options

Use the Google Flights API to compare emissions between flight options

FAQ

Questions

How much does the Google Flights API cost?

Each successful call costs one credit, for any search. New accounts get free credits to start, and credit packs bring the price down as you scale.

Can I sort flights by price or emissions?

Yes. `sort_by` takes cheapest or emissions, as well as top_flights, departure_time, arrival_time and duration.

What format are responses in?

Every endpoint returns JSON, with no HTML parsing on your side.

Is this the official Google Flights API?

No. Perceptlayer is an independent service and is not affiliated with Google Flights. It returns Google Flights data as JSON with a Perceptlayer key, so there is no Google Flights developer account, app review or partner approval to get first. It only reads data: if Google Flights has an official API and you need to act on your own Google Flights account, such as posting, managing orders or reading private data, use that one.

Should I build a Google Flights scraper instead?

You can, but a Google Flights scraper is code you maintain: page changes break it, requests get blocked, and Google Flights's terms govern how you collect data. The Google Flights API gives you 9 endpoints of named JSON fields for 1 credit per successful call, and failed calls cost nothing. A scraper makes sense only for data these endpoints don't return, so check the response in the playground on this page first.

Try the Google Flights API with 100 free credits

No credit card. Failed calls are never billed.