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 upTry 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.
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.
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"
}'{
"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
| Field | Type | Example | What it is |
|---|---|---|---|
| departure_airport | string | "YUL" | Echo of the request's departure. |
| arrival_airport | string | "CDG" | Echo of the request's arrival. |
| departure_date | string (date) | "2027-04-03" | Date of the leg these options are for. |
| currency | string | "USD" | The requested currency. |
| adults | integer | 1 | Adults the price is for. |
| itineraries | array of object | Options for the leg being chosen: Google's best flights first, then the others. | |
| itineraries[].legs | array of object | The leg chosen in this call (one entry). | |
| itineraries[].price | number | null | 527 | Google's displayed whole amount for the whole trip (every leg, all passengers), in currency. |
| itineraries[].currency | string | "USD" | The requested currency. |
| itineraries[].display_price | string | null | "$527" | price with its currency symbol, e.g. |
| itineraries[].carbon_emissions_kg | integer | null | 325 | CO2e estimate for this itinerary, kilograms (rounded). |
| itineraries[].carbon_emissions_comparison | string | null | "19% lower than typical" | E.g. |
Show all 40 fields
| itineraries[].trip_type | string | "round_trip" | one_way, round_trip or multi_city. |
| itineraries[].total_stops | integer | 0 | Stops across legs. |
| itineraries[].is_direct | boolean | true | total_stops is 0. |
| itineraries[].departure_token | string | 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_url | string | 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[].group | string | "best" | best (Google's top flights) or other. |
| itineraries[].price_exact | number | null | 526.19 | Price with minor units, from Google's price token (526.19 where price is 527). |
| itineraries[].carbon_emissions | object | null | Null when Google gives no estimate. | |
| itineraries[].total_duration_minutes | integer | null | 430 | Sum of the legs' door-to-door durations, minutes; null when one is unknown. |
| itineraries[].carry_on_bags_included | integer | null | 1 | Carry-on bags included in the fare, as Google states it; null when not stated. |
| itineraries[].airline_logo | string | null | "https://www.gstatic.com/flights/airline…" | Logo URL of the main airline; null when several airlines share the itinerary. |
| cheapest_price | number | null | 527 | Lowest price in itineraries; null when none is priced. |
| trip_type | string | "round_trip" | one_way, round_trip or multi_city. |
| leg_index | integer | 0 | Which leg these options are for: 0 = first (outbound), 1 = return or second multi-city leg, and so on. |
| legs_total | integer | 2 | Legs in the trip: 1 one-way, 2 round trip, 2-5 multi-city. |
| itinerary_count | integer | 69 | Number of entries in itineraries. |
| best_count | integer | 3 | How many itineraries have group: best. |
| price_insights | object | null | Null when Google gives none (some filtered searches). | |
| price_insights.lowest_price | number | null | 527 | Lowest price Google shows for this search, in currency. |
| price_insights.price_level | string | 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_range | array of number | null | [low, high]: Google's typical price range for this trip. | |
| price_insights.price_history | array of array of number | [[unix_seconds, price], ...]: Google's price history for this trip, about 60 days. | |
| airlines_available | array of object | Airlines and alliances Google offers as filters for this search; the codes work in include_airlines. | |
| airlines_available[].code | string | "ONEWORLD" | IATA airline code, or STAR_ALLIANCE / SKYTEAM / ONEWORLD. |
| airlines_available[].name | string | null | "Oneworld" | Name as the site shows it. |
| airlines_available[].type | string | "alliance" | |
| google_flights_url | string | "https://www.google.com/travel/flights/s…" | Google Flights search page for this trip. |
| return_date | string (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
| Input | Type | Required | What it does |
|---|---|---|---|
| departure | string | Yes | IATA airport code (JFK) or IATA city code (NYC, LON, PAR, TYO...: every airport of that city).Min length 3, max length 3. |
| arrival | string | Yes | IATA airport code (JFK) or IATA city code (NYC, LON, PAR, TYO...: every airport of that city).Min length 3, max length 3. |
| departure_date | string (date) | Yes | Outbound flight date, YYYY-MM-DD. |
| return_date | string (date) | null | No | Return flight date for round-trip. |
| departure_id | string | null | No | SerpApi'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_id | string | null | No | SerpApi's arrival_id: overrides arrival the same way, e.g.Min length 3, max length 200. |
| multi_city | array of object | null | No | Makes 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. |
| adults | integer | No | Number of adult passengers (12+ years old).Default 1. Min 1, max 9. |
| children | integer | No | Number of children (2-11 years old).Default 0. Min 0, max 8. |
| infants_in_seat | integer | No | Number of infants with seat (under 2 years old).Default 0. Min 0, max 4. |
| infants_on_lap | integer | No | Number of lap infants (under 2 years old); at most one per adult.Default 0. Min 0, max 4. |
| cabin_class | string | No | Cabin class: economy, premium_economy, business, first.Default economy. Pattern ^(economy|premium_economy|business|first)$. |
| currency | string | No | ISO 4217 code for the returned prices.Default USD. |
| hl | string | No | Language code for results.Default en. |
| gl | string | No | Market/country code (two letters).Default us. |
| stops | integer | null | No | Maximum stops filter: 0=nonstop only, 1=max 1 stop, 2=max 2 stops.Min 0, max 2. |
| include_airlines | string | null | No | Comma-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_airlines | string | null | No | Comma-separated airline codes to drop.Pattern ^[A-Za-z0-9_]{2,13}(,[A-Za-z0-9_]{2,13}){0,19}$. |
| max_price | integer | null | No | Only itineraries at or below this price, in currency.Min 1, max 1000000. |
| max_duration | integer | null | No | Maximum door-to-door travel time per leg, minutes.Min 30, max 5760. |
| outbound_times | string | null | No | Hour 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_times | string | null | No | Hour 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_bags | integer | No | Carry-on bags per passenger to include in the price (Google adds the airline's bag fees).Default 0. Min 0, max 1. |
| checked_bags | integer | No | Checked bags per passenger to include in the price.Default 0. Min 0, max 2. |
| exclude_basic_economy | boolean | No | Hide basic-economy fares (Google's "Economy (exclude Basic)"; offered on US routes).Default false. |
| less_emissions | boolean | No | Only flights with lower-than-typical emissions.Default false. |
| layover_duration | string | null | No | Layover length window min,max in minutes, e.g.Pattern ^\d{1,4},\d{1,4}$. |
| connecting_airports | string | null | No | Only connect through these airports (comma-separated IATA codes).Pattern ^[A-Za-z0-9]{3}(,[A-Za-z0-9]{3}){0,19}$. |
| exclude_connecting_airports | string | null | No | Never connect through these airports.Pattern ^[A-Za-z0-9]{3}(,[A-Za-z0-9]{3}){0,19}$. |
| sort_by | string | No | Result 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.
| Endpoint | What it returns | Credits | Per 1,000 calls |
|---|---|---|---|
| Flight search POST /v1/serp/google_flights | Itineraries for one-way, round-trip and multi-city trips with filters | 4 credits | $8.00 – $2.66 |
| Return or next leg POST /v1/serp/google_flights_return | The legs that pair with a chosen itinerary | 4 credits | $8.00 – $2.66 |
| Booking options POST /v1/serp/google_flights_booking | Sellers, fares, fare rules and bag fees for a complete itinerary | 5 credits | $10.00 – $3.33 |
| Fare calendar POST /v1/serp/google_flights_calendar | Cheapest fare per departure date | 6 credits | $12.00 – $4.00 |
| Airport lookup POST /v1/serp/google_flights_location_search | Airports, cities and regions for a name | 2 credits | $4.00 – $1.33 |
Your first call in three steps
- 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.
- 02
Send POST /v1/serp/google_flights
Put the key in the
x-api-keyheader and passdeparture,arrivalanddeparture_date. Every other input is optional and listed above. - 03
Read the JSON
The answer is one JSON object with
departure_airport,arrival_airport,departure_date,currencyandadults, 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
- Price a round trip
- Flight search reference
- Migrate from another SERP API
- Flight price tracking
- Travel agency API: hotel and flight prices for quotes
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 APIsSearch 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.
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.
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.
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.
- See pricing Plans, packs and every price
- Talk to sales Volume, custom terms, invoices
- Read the quickstart First call in five minutes