ScraperCompany · APIs · Pricing · Docs · llms.txt · Get an API key

Google Flights API

Google Flights API

Every itinerary Google Flights shows for a route and date, with legs, layovers, emissions and price insights, then the return leg and the booking options behind the fare you pick.

  • Data from Google Flights

$4.00 per 1,000 calls with a credit pack, down to $1.33 on the Business plan

Free trial: 50 calls, no card. Failed requests are free. Credit packs from $15.

Endpoints and prices checked against the API on .

Try it without signing up

Try it, no sign-up

Which day is cheapest to fly?

Round-trip fares for every departure day around the holidays, from one call to the Google Flights date grid. The day you leave moves the price more than you would think.

Loading a real answer…

The Google Flights API follows the same flow as the Google Flights site. Search a route and date to get every itinerary, grouped into best and other flights. An itinerary with more legs to choose carries a departure_token that returns the matching return or next multi-city leg. A complete itinerary carries a booking_token that returns the sellers, fares, fare rules and bag fees.

The calendar endpoint answers the other common question, which day is cheapest, with the lowest fare for each departure date around the one you ask for. Airport and city codes can be looked up by name first.

What you get

itineraries[]
price, total duration, stops and the best/other group
legs[].segments[]
flight number, airline, aircraft, times and airports
legs[].layovers[]
connection airport and duration
carbon_emissions
emissions in kg and how they compare with typical
price_insights
lowest price, price level, typical range and history
departure_token / booking_token
continue to the next leg or to booking options
booking_options[]
sellers with price, fare rules and bag fees (booking endpoint)

One call, structured JSON

POST /v1/serp/google_flights, 4 credits per successful call.

One POST /v1/serp/google_flights call from start to finish: the inputs you send, a failed attempt retried on our side and charged nothing, and typed JSON back with currency, price, total_stops and price_level, for 4 credits. Values from the API's own example.
curl -X POST "https://api.scrapercompany.com/v1/serp/google_flights" \
  -H "x-api-key: $SCRAPERCOMPANY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "departure": "JFK",
    "arrival": "LAX",
    "departure_date": "2027-01-18",
    "return_date": "2027-01-23",
    "adults": 1,
    "currency": "USD"
  }'
Response (trimmed)
{
  "departure_airport": "YUL",
  "arrival_airport": "CDG",
  "departure_date": "2027-04-03",
  "currency": "USD",
  "adults": 1,
  "itineraries": [
    {
      "legs": [
        {
          "segments": [
            {
              "departure_airport": "YUL",
              "arrival_airport": "CDG",
              "departure_time": "2026-11-04T18:10:00",
              "arrival_time": "2026-11-05T07:20:00",
              "airline": "Air Canada",
              "airline_code": "AC",
              "flight_number": "AC 874",
              "duration_minutes": 430,
              "aircraft": "Airbus A330",
              "cabin_class": "economy",
              "departure_airport_name": "Montréal-Pierre Elliott Trudeau International Airport",
              "arrival_airport_name": "Aéroport de Paris-Charles de Gaulle",
              "ticket_also_sold_by": [
                "LH 6809",
                "SN 9636"
              ],
              "legroom": "31 in",
              "legroom_category": "average",
              "overnight": true,
              "red_eye": false,
              "often_delayed_by_over_30_min": false,
              "carbon_emissions_kg": 325,
              "extensions": [
                "Average legroom (31 in)",
                "Wi-Fi for a fee"
              ],
              "airline_logo": "https://www.gstatic.com/flights/airline_logos/70px/AC.png"
            }
          ],
          "departure_airport": "YUL",
          "arrival_airport": "CDG",
          "duration_minutes": 430,
          "stops": 0,
          "layover_airports": [],
          "is_direct": true,
          "layovers": [],
          "airlines": [
            "Air Canada"
          ],
          "departure_time": "2026-11-04T18:10:00",
          "arrival_time": "2026-11-05T07:20:00"
        }
      ],
      "price": 527,
      "currency": "USD",
      "display_price": "$527",
      "carbon_emissions_kg": 325,
      "carbon_emissions_comparison": "19% lower than typical",
      "trip_type": "round_trip",
      "total_stops": 0,
      "is_direct": true,
      "departure_token": "gf1.eNqFUMkKwjAU_Jd3TiGpVqU3TVuhBO1iIhpyEhe09NJWBfHfTRexxS2BlxneMvNygzPYBMEObJkWSYKqQOpHKo0kQbi8Cr3yn4IsD6w4A12rVMmBOtOGVSW4VQ4mNgcGwQax4Dmg7u5k6hF1x5hqPhr2Qf3w0quU29JdW9-NmCb8WbEReFMnCkFWfWMONtBj5C1db8bdq8dEFMRYzBm3AkHJhAnfC_klj0XkL04iDoW_1kttdBuPHY0OiYbbVKN9iYoM7g_hQ347",
      "google_flights_url": "https://www.google.com/travel/flights/search?tfs=CBwQAho_EgoyMDI2LTExLTA0Ih8KA1lVTBIKMjAyNi0xMS0wNBoDQ0RHKgJBQzIDODc0agc...",
      "group": "best",
      "price_exact": 526.19,
      "carbon_emissions": {
        "this_flight": 325000,
        "typical_for_this_route": 399000,
        "difference_percent": -19
      },
      "total_duration_minutes": 430,
      "carry_on_bags_included": 1,
      "airline_logo": "https://www.gstatic.com/flights/airline_logos/70px/AC.png"
    },
    {
      "legs": [
        {
          "segments": [
            {
              "departure_airport": "YUL",
              "arrival_airport": "YYZ",
              "departure_time": "2026-11-04T10:10:00",
              "arrival_time": "2026-11-04T11:45:00",
              "airline": "Air Canada",
              "airline_code": "AC",
              "flight_number": "AC 407",
              "duration_minutes": 95,
              "aircraft": "Airbus A321",
              "cabin_class": "economy",
              "departure_airport_name": "Montréal-Pierre Elliott Trudeau International Airport",
              "arrival_airport_name": "Toronto Pearson International Airport",
              "ticket_also_sold_by": [],
              "legroom": "31 in",
              "legroom_category": "average",
              "overnight": false,
              "red_eye": false,
              "often_delayed_by_over_30_min": false,
              "carbon_emissions_kg": 71,
              "extensions": [
                "Average legroom (31 in)",
                "Free Wi-Fi"
              ],
              "airline_logo": "https://www.gstatic.com/flights/airline_logos/70px/AC.png"
            },
            {
              "departure_airport": "YYZ",
              "arrival_airport": "CDG",
              "departure_time": "2026-11-04T21:10:00",
              "arrival_time": "2026-11-05T10:20:00",
              "airline": "Air Canada",
              "airline_code": "AC",
              "flight_number": "AC 872",
              "duration_minutes": 430,
              "aircraft": "Boeing 777",
              "cabin_class": "economy",
              "departure_airport_name": "Toronto Pearson International Airport",
              "arrival_airport_name": "Aéroport de Paris-Charles de Gaulle",
              "ticket_also_sold_by": [],
              "legroom": "31 in",
              "legroom_category": "average",
              "overnight": true,
              "red_eye": true,
              "often_delayed_by_over_30_min": true,
              "carbon_emissions_kg": 394,
              "extensions": [
                "Average legroom (31 in)",
                "Wi-Fi for a fee"
              ],
              "airline_logo": "https://www.gstatic.com/flights/airline_logos/70px/AC.png"
            }
          ],
          "departure_airport": "YUL",
          "arrival_airport": "CDG",
          "duration_minutes": 1090,
          "stops": 1,
          "layover_airports": [
            "YYZ"
          ],
          "is_direct": false,
          "layovers": [
            {
              "duration_minutes": 565,
              "airport": "YYZ",
              "airport_name": "Toronto Pearson International Airport",
              "city": "Toronto",
              "departure_airport": "YYZ",
              "change_of_airport": false,
              "overnight": false
            }
          ],
          "airlines": [
            "Air Canada"
          ],
          "departure_time": "2026-11-04T10:10:00",
          "arrival_time": "2026-11-05T10:20:00"
        }
      ],
      "price": 535,
      "currency": "USD",
      "display_price": "$535",
      "carbon_emissions_kg": 464,
      "carbon_emissions_comparison": "16% higher than typical",
      "trip_type": "round_trip",
      "total_stops": 1,
      "is_direct": false,
      "departure_token": "gf1.eNqFUMkKwjAU_Jd3TiGpVqU3TVuhBO1iIhpyEhe09NJWBfHfTRexxS2BlxneMvNygzPYBMEObJkWSYKqQOpHKo0kQbi8Cr3yn4IsD6w4A12rVMmBOtOGVSW4VQ4mNgcGwQax4Dmg7u5k6hF1x5hqPhr2Qf3w0quU29JdW9-NmCb8WbEReFMnCkFWfWMONtBj5C1db8bdq8dEFMRYzBm3AkHJhAnfC_klj0XkL04iDoW_1kttdBuPHY0OiYbbVKN9iYoM7g_hQ347",
      "google_flights_url": "https://www.google.com/travel/flights/search?tfs=CBwQAhpgEgoyMDI2LTExLTA0Ih8KA1lVTBIKMjAyNi0xMS0wNBoDWVlaKgJBQzIDNDA3Ih8...",
      "group": "other",
      "price_exact": 534.12,
      "carbon_emissions": {
        "this_flight": 464000,
        "typical_for_this_route": 399000,
        "difference_percent": 16
      },
      "total_duration_minutes": 1090,
      "carry_on_bags_included": 1,
      "airline_logo": "https://www.gstatic.com/flights/airline_logos/70px/AC.png"
    }
  ],
  "elapsed_s": 0.942,
  "cheapest_price": 527,
  "trip_type": "round_trip",
  "leg_index": 0,
  "legs_total": 2,
  "itinerary_count": 69,
  "best_count": 3,
  "price_insights": {
    "lowest_price": 527,
    "price_level": "typical",
    "typical_price_range": [
      475,
      530
    ],
    "price_history": [
      [
        1790568000,
        528
      ],
      [
        1790654400,
        528
      ]
    ]
  },
  "airlines_available": [
    {
      "code": "ONEWORLD",
      "name": "Oneworld",
      "type": "alliance"
    },
    {
      "code": "SKYTEAM",
      "name": "SkyTeam",
      "type": "alliance"
    }
  ],
  "google_flights_url": "https://www.google.com/travel/flights/search?tfs=CBwQAhoeEgoyMDI2LTExLTA0agcIARIDWVVMcgcIARIDQ0RHGh4SCjIwMjYtMTEtMTFqBwgBEgNDREdyBwgBEgNZVUxAAUgBcAGCAQsI____________AZgBAQ&hl=en&gl=us&curr=USD",
  "source": "rpc",
  "return_date": "2027-04-10"
}

Every field, documented before you buy

What one POST /v1/serp/google_flights call returns: 40 fields with their type and a value from the example above, then every input the call takes.

In the response

FieldTypeExampleWhat it is
departure_airportstring"YUL"Echo of the request's departure.
arrival_airportstring"CDG"Echo of the request's arrival.
departure_datestring (date)"2027-04-03"Date of the leg these options are for.
currencystring"USD"The requested currency.
adultsinteger1Adults the price is for.
itinerariesarray of objectOptions for the leg being chosen: Google's best flights first, then the others.
itineraries[].legsarray of objectThe leg chosen in this call (one entry).
itineraries[].pricenumber | null527Google's displayed whole amount for the whole trip (every leg, all passengers), in currency.
itineraries[].currencystring"USD"The requested currency.
itineraries[].display_pricestring | null"$527"price with its currency symbol, e.g.
itineraries[].carbon_emissions_kginteger | null325CO2e estimate for this itinerary, kilograms (rounded).
itineraries[].carbon_emissions_comparisonstring | null"19% lower than typical"E.g.
Show all 40 fields
itineraries[].trip_typestring"round_trip"one_way, round_trip or multi_city.
itineraries[].total_stopsinteger0Stops across legs.
itineraries[].is_directbooleantruetotal_stops is 0.
itineraries[].departure_tokenstring | null"gf1.eNqFUMkKwjAU_Jd3TiGpVqU3TVuhBO1iIhp…"Pass to POST /v1/serp/google_flights_return for the next leg's options after choosing this one.
itineraries[].google_flights_urlstring | null"https://www.google.com/travel/flights/s…"Google Flights page for this option: the search page with the earlier legs chosen, or the booking page once every leg is chosen.
itineraries[].groupstring"best"best (Google's top flights) or other.
itineraries[].price_exactnumber | null526.19Price with minor units, from Google's price token (526.19 where price is 527).
itineraries[].carbon_emissionsobject | nullNull when Google gives no estimate.
itineraries[].total_duration_minutesinteger | null430Sum of the legs' door-to-door durations, minutes; null when one is unknown.
itineraries[].carry_on_bags_includedinteger | null1Carry-on bags included in the fare, as Google states it; null when not stated.
itineraries[].airline_logostring | null"https://www.gstatic.com/flights/airline…"Logo URL of the main airline; null when several airlines share the itinerary.
cheapest_pricenumber | null527Lowest price in itineraries; null when none is priced.
trip_typestring"round_trip"one_way, round_trip or multi_city.
leg_indexinteger0Which leg these options are for: 0 = first (outbound), 1 = return or second multi-city leg, and so on.
legs_totalinteger2Legs in the trip: 1 one-way, 2 round trip, 2-5 multi-city.
itinerary_countinteger69Number of entries in itineraries.
best_countinteger3How many itineraries have group: best.
price_insightsobject | nullNull when Google gives none (some filtered searches).
price_insights.lowest_pricenumber | null527Lowest price Google shows for this search, in currency.
price_insights.price_levelstring | null"typical"Google's verdict on today's price: low (below its typical range), typical (inside it) or high (above it).
price_insights.typical_price_rangearray of number | null[low, high]: Google's typical price range for this trip.
price_insights.price_historyarray of array of number[[unix_seconds, price], ...]: Google's price history for this trip, about 60 days.
airlines_availablearray of objectAirlines and alliances Google offers as filters for this search; the codes work in include_airlines.
airlines_available[].codestring"ONEWORLD"IATA airline code, or STAR_ALLIANCE / SKYTEAM / ONEWORLD.
airlines_available[].namestring | null"Oneworld"Name as the site shows it.
airlines_available[].typestring"alliance"
google_flights_urlstring"https://www.google.com/travel/flights/s…"Google Flights search page for this trip.
return_datestring (date)"2027-04-10"Present only for round trips.

Arrays show their first item; every item has the same fields. Full schema in the API reference

In the request

InputTypeRequiredWhat it does
departurestringYesIATA airport code (JFK) or IATA city code (NYC, LON, PAR, TYO...: every airport of that city).Min length 3, max length 3.
arrivalstringYesIATA airport code (JFK) or IATA city code (NYC, LON, PAR, TYO...: every airport of that city).Min length 3, max length 3.
departure_datestring (date)YesOutbound flight date, YYYY-MM-DD.
return_datestring (date) | nullNoReturn flight date for round-trip.
departure_idstring | nullNoSerpApi's departure_id: overrides departure with comma-separated IATA airport/city codes and/or Google city ids (/m/02_286), up to 7.Min length 3, max length 200.
arrival_idstring | nullNoSerpApi's arrival_id: overrides arrival the same way, e.g.Min length 3, max length 200.
multi_cityarray of object | nullNoMakes the trip multi-city: the legs after the first (departure -> arrival on departure_date), 1-4 of them, in date order.Min items 1, max items 4.
adultsintegerNoNumber of adult passengers (12+ years old).Default 1. Min 1, max 9.
childrenintegerNoNumber of children (2-11 years old).Default 0. Min 0, max 8.
infants_in_seatintegerNoNumber of infants with seat (under 2 years old).Default 0. Min 0, max 4.
infants_on_lapintegerNoNumber of lap infants (under 2 years old); at most one per adult.Default 0. Min 0, max 4.
cabin_classstringNoCabin class: economy, premium_economy, business, first.Default economy. Pattern ^(economy|premium_economy|business|first)$.
currencystringNoISO 4217 code for the returned prices.Default USD.
hlstringNoLanguage code for results.Default en.
glstringNoMarket/country code (two letters).Default us.
stopsinteger | nullNoMaximum stops filter: 0=nonstop only, 1=max 1 stop, 2=max 2 stops.Min 0, max 2.
include_airlinesstring | nullNoComma-separated IATA airline codes and/or alliances (STAR_ALLIANCE, SKYTEAM, ONEWORLD) to keep, e.g.Pattern ^[A-Za-z0-9_]{2,13}(,[A-Za-z0-9_]{2,13}){0,19}$.
exclude_airlinesstring | nullNoComma-separated airline codes to drop.Pattern ^[A-Za-z0-9_]{2,13}(,[A-Za-z0-9_]{2,13}){0,19}$.
max_priceinteger | nullNoOnly itineraries at or below this price, in currency.Min 1, max 1000000.
max_durationinteger | nullNoMaximum door-to-door travel time per leg, minutes.Min 30, max 5760.
outbound_timesstring | nullNoHour window from,to for departure, optionally followed by from,to for arrival (0-23; 8,12 = leaves 08:00-12:59).Pattern ^\d{1,2},\d{1,2}(,\d{1,2},\d{1,2})?$.
return_timesstring | nullNoHour window from,to for departure, optionally followed by from,to for arrival (0-23; 8,12 = leaves 08:00-12:59).Pattern ^\d{1,2},\d{1,2}(,\d{1,2},\d{1,2})?$.
carry_on_bagsintegerNoCarry-on bags per passenger to include in the price (Google adds the airline's bag fees).Default 0. Min 0, max 1.
checked_bagsintegerNoChecked bags per passenger to include in the price.Default 0. Min 0, max 2.
exclude_basic_economybooleanNoHide basic-economy fares (Google's "Economy (exclude Basic)"; offered on US routes).Default false.
less_emissionsbooleanNoOnly flights with lower-than-typical emissions.Default false.
layover_durationstring | nullNoLayover length window min,max in minutes, e.g.Pattern ^\d{1,4},\d{1,4}$.
connecting_airportsstring | nullNoOnly connect through these airports (comma-separated IATA codes).Pattern ^[A-Za-z0-9]{3}(,[A-Za-z0-9]{3}){0,19}$.
exclude_connecting_airportsstring | nullNoNever connect through these airports.Pattern ^[A-Za-z0-9]{3}(,[A-Za-z0-9]{3}){0,19}$.
sort_bystringNoResult order (SerpApi sort_by 1-6 in the same order): top_flights, price, departure_time, arrival_time, duration, emissions.Default top_flights. Pattern ^(top_flights|price|departure_time|arrival_time|duration|emissions)$.

Endpoints and price per call

Credits per successful call, and what 1,000 calls cost: from a credit pack down to the Business plan. Failed requests cost nothing.

EndpointWhat it returnsCreditsPer 1,000 calls
Flight search
POST /v1/serp/google_flights
Itineraries for one-way, round-trip and multi-city trips with filters4 credits$8.00 – $2.66
Return or next leg
POST /v1/serp/google_flights_return
The legs that pair with a chosen itinerary4 credits$8.00 – $2.66
Booking options
POST /v1/serp/google_flights_booking
Sellers, fares, fare rules and bag fees for a complete itinerary5 credits$10.00 – $3.33
Fare calendar
POST /v1/serp/google_flights_calendar
Cheapest fare per departure date6 credits$12.00 – $4.00
Airport lookup
POST /v1/serp/google_flights_location_search
Airports, cities and regions for a name2 credits$4.00 – $1.33

See all plans

Your first call in three steps

  1. 01

    Get an API key

    Create an account and verify your email, then copy a key from the dashboard. The free trial is 50 calls or 14 days, whichever ends first, no card needed.

  2. 02

    Send POST /v1/serp/google_flights

    Put the key in the x-api-key header and pass departure, arrival and departure_date. Every other input is optional and listed above.

  3. 03

    Read the JSON

    The answer is one JSON object with departure_airport, arrival_airport, departure_date, currency and adults, typed and named the same way on every call. A failed call costs 0 credits, so retrying is free.

Limits and coverage

Where it works
Worldwide; currency and market selectable
  • Up to 9 adults per call (adults)

Is it legal to scrape Google Flights?

It depends on what you collect and what you do with it. Here is what the API does, and what stays with you once the data is yours.

Public pages only

The API reads what Google Flights shows anyone who opens the page without signing in. It uses no account and opens nothing behind a paywall.

Facts are not the same as content

A price on a date, a rating or a count is a fact, and copyright does not protect facts. Review text, photos, descriptions and transcripts belong to their authors or the site. Counting, scoring or summarising them is a different use from republishing them, and republishing usually needs permission.

Databases have their own right in the EU and UK

Whoever invested in building a database there can stop others taking a substantial part of it, and repeated extraction of small parts can add up to a substantial part. Collect the fields and dates you need, not a copy of Google Flights.

No personal data in the answer

These answers carry no information about people, so privacy laws such as the GDPR do not come into it until you join the data to people yourself.

The site’s terms, and ours

The terms of use of Google Flights may limit automated access to it or reuse of its data. Our Terms make you responsible for how you use the data you collect, for following the terms of the sites it comes from, for data protection law, and for having the rights you need.

This is general information, not legal advice. For a specific use, ask a lawyer where you operate. Google Flights is a trademark of its owner. ScraperCompany is independent: not affiliated with or endorsed by Google Flights, and this is not an official Google Flights API.

Frequently asked questions

Read next

Guides

Does Google have a public Flights API?

No. Google retired its QPX Express flight API in 2018 and Google Flights has no public API. This API returns the public Google Flights results as structured data.

How do round trips work?

Send a search with a return_date. Each outbound itinerary carries a departure_token; pass it to the return-leg endpoint to get the return flights that pair with it, then use the booking_token of the complete trip for booking options. Multi-city trips work the same way, one leg at a time.

Which filters are supported?

Cabin class, passengers, stops, included or excluded airlines, maximum price and duration, departure and arrival time windows, layover duration, bags, emissions and sort order.

Can I find the cheapest day to fly?

Yes. The fare calendar returns the lowest fare for each departure date around the date you ask for, for one-way or round trips, in one 5-credit call.

Do failed requests cost credits?

No. A failed or blocked call (any 4xx or 5xx response) costs 0 credits, and so does a search page that comes back empty. You pay only for successful results.

How do I get an API key?

Create an account on the sign-up page and verify your email. You get a free trial of 50 calls or 14 days, whichever ends first, no card needed on the travel endpoints (hotels, vacation rentals, flights, reviews) and 10 calls to the other sources; for everything else, and after the trial, buy a credit pack (from $15) or pick a plan. You create and rotate keys yourself in the dashboard.

More APIs on the same key

All APIs
Google Hotels API

Search a destination, open a property, pull a whole price calendar and read its reviews. Every Google Hotels result as JSON, with base price, taxes, fees and total kept separate.

Google Maps API

Search Google Maps the way a person does, “coffee shops in Boston” or “hotels near Fenway”, and get every place as JSON with its address, coordinates, rating, phone number and website.

Google Search API

Organic results, People Also Ask, the AI Overview and related searches for any query, localized to a country or a city, as JSON. Autocomplete and Google News on the same key.

Web scraping API

Send a URL, get the page back as HTML, markdown or text. If an attempt does not return the page, the request is tried again automatically, and you pay only for a page that comes back with content.

Start with 50 free calls

Create an account and verify your email: your own API keys and a free trial of 50 calls or 14 days, whichever ends first, no card needed. Then buy a credit pack from $15 or pick a plan from $49 a month.

7,500 credits, one-time. No subscription. Or try it free: 50 calls, no card.