JustSERPDocs
Google

Google Flights

Flight itineraries between airports on dates, answered as the document: `search_metadata`, `search_parameters`, `search_information` (`{}`), `best_flights`, `other_flights`, `price_insights` and `airlines`.

GET
/v1/google/flights

Flight itineraries between airports on dates, answered as the document: search_metadata, search_parameters, search_information ({}), best_flights, other_flights, price_insights and airlines. Each itinerary carries a departure_token (a leg is still to be chosen: send it back to get the next leg's flights; a round trip's second leg is priced for the whole trip) or a booking_token (the last leg: send it back to get selected_flights and booking_options). The tokens are ours, not Google's. Not answered: airports, baggage links, cheaper_alternatives, amenity flags, baggage prices. The bag, emissions, separate-tickets, basic-economy, hidden-flights, expanded-search and excluded-airlines parameters are refused (400), not ignored.

Authorization

headerX-API-Key<token>

Your API key.

Query Parameters

cancel_token?string

A name you make up for this request (a UUID is fine), so you can later GET /v1/cancel with it. Only you know it, so only you can cancel. Use a new one for every request, retries included: a cancelled token stays cancelled for a few minutes.

Length1 <= length <= 128
departure_id?string

Airport code (JFK) or place id (/m/02_286, /g/...); up to 10, comma-separated.

arrival_id?string

Same forms; needs a place that is not in departure_id.

flight_type?string
Default"round_trip"
Value in"round_trip""one_way""multi_city"
outbound_date?string

YYYY-MM-DD.

Formatdate
return_date?string

YYYY-MM-DD; required for a round trip.

Formatdate
multi_city_json?string

For multi_city: a JSON list of 2 to 6 {departure_id, arrival_id, outbound_date, times}.

travel_class?string
Default"economy"
Value in"economy""premium_economy""business""first_class"
adults?integer
Range1 <= value
Default1
children?integer
Range0 <= value
Default0
infants_in_seat?integer
Range0 <= value
Default0
infants_on_lap?integer
Range0 <= value
Default0
stops?string
Default"any"
Value in"any""nonstop""one_stop_or_fewer""two_stops_or_fewer"
max_price?integer

Highest price, in currency.

included_airlines?string

Airline codes or ONEWORLD, SKYTEAM, STAR_ALLIANCE, comma-separated.

outbound_times?string

Up to four hours: departure from, to; arrival from, to.

Default"0,23,0,23"
return_times?string

As outbound_times.

Default"0,23,0,23"
included_connecting_airports?string

Airport codes, comma-separated.

excluded_connecting_airports?string

Airport codes, comma-separated.

layover_duration_min?integer

Minutes.

layover_duration_max?integer

Minutes.

max_flight_duration?integer

Minutes.

sort_by?string

Sorts each of the two lists.

Default"top_flights"
Value in"top_flights""price""departure_time""arrival_time""duration""emissions"
departure_token?string

A token from an answer: chooses that itinerary for the leg and answers the next leg's flights. A token that chooses more legs than the trip has is a 400.

booking_token?string

A token that chooses every leg: answers selected_flights and booking_options. One that chooses fewer legs is a 400.

currency?string
Default"USD"
hl?string
Default"en"
gl?string
Default"us"

Response Body

The itineraries, as the document. When the page could not be parsed, the usual envelope.

application/json
  1. response

The first three keys of every parsed 200 (the answer is the document itself, no success/data envelope): what the search was (search_metadata), what it asked (search_parameters), the parser's own search_information ({} when it has none). The engine's blocks follow, at the same level. An engine whose answer is a list puts it under results.

search_metadata*
search_parameters*

The request's own fields as sent, engine first, without cancel_token.

search_information*

The parser's own, e.g. yelp_search's; otherwise {}.

best_flights?array<>
other_flights?array<>
price_insights?
airlines?array<>
selected_flights?array<>

A booking answer only; one summary a leg.

booking_options?array<>

A booking answer only.

[key: string]?any
Example Request
curl -X GET 'https://api.justserp.com/v1/google/flights?departure_id=JFK&arrival_id=LHR&outbound_date=2026-12-12&return_date=2026-12-19'
Example Response
{  "search_metadata": {    "id": "string",    "status": "Success",    "created_at": "string",    "request_url": "string",    "html_url": "string"  },  "search_parameters": {},  "search_information": {},  "best_flights": [    {      "flights": [        {          "departure_airport": {            "name": "string",            "id": "string",            "date": "string",            "time": "string"          },          "arrival_airport": {            "name": "string",            "id": "string",            "date": "string",            "time": "string"          },          "duration": 0,          "airplane": "string",          "airline": "string",          "airline_logo": "string",          "travel_class": "string",          "flight_number": "string",          "ticket_also_sold_by": [            "string"          ],          "is_overnight": true,          "extensions": [            "string"          ],          "detected_extensions": {            "legroom_short": "string",            "legroom_long": "string",            "carbon_emission": 0          }        }      ],      "layovers": [        {          "duration": 0,          "name": "string",          "id": "string"        }      ],      "total_duration": 0,      "carbon_emissions": {        "this_flight": 0,        "typical_for_this_route": 0,        "difference_percent": 0,        "lowest_route": 0      },      "price": 0,      "type": "string",      "airline_logo": "string",      "departure_token": "string",      "booking_token": "string"    }  ],  "other_flights": [    {      "flights": [        {          "departure_airport": {            "name": "string",            "id": "string",            "date": "string",            "time": "string"          },          "arrival_airport": {            "name": "string",            "id": "string",            "date": "string",            "time": "string"          },          "duration": 0,          "airplane": "string",          "airline": "string",          "airline_logo": "string",          "travel_class": "string",          "flight_number": "string",          "ticket_also_sold_by": [            "string"          ],          "is_overnight": true,          "extensions": [            "string"          ],          "detected_extensions": {            "legroom_short": "string",            "legroom_long": "string",            "carbon_emission": 0          }        }      ],      "layovers": [        {          "duration": 0,          "name": "string",          "id": "string"        }      ],      "total_duration": 0,      "carbon_emissions": {        "this_flight": 0,        "typical_for_this_route": 0,        "difference_percent": 0,        "lowest_route": 0      },      "price": 0,      "type": "string",      "airline_logo": "string",      "departure_token": "string",      "booking_token": "string"    }  ],  "price_insights": {    "lowest_price": 0,    "typical_price_range": [      0,      0    ],    "price_level": "low",    "price_history": [      [        0      ]    ]  },  "airlines": [    {      "id": "string",      "name": "string"    }  ],  "selected_flights": [    {      "flights": [        {          "departure_airport": {            "name": "string",            "id": "string",            "date": "string",            "time": "string"          },          "arrival_airport": {            "name": "string",            "id": "string",            "date": "string",            "time": "string"          },          "duration": 0,          "airplane": "string",          "airline": "string",          "airline_logo": "string",          "travel_class": "string",          "flight_number": "string",          "ticket_also_sold_by": [            "string"          ],          "is_overnight": true,          "extensions": [            "string"          ],          "detected_extensions": {            "legroom_short": "string",            "legroom_long": "string",            "carbon_emission": 0          }        }      ],      "layovers": [        {          "duration": 0,          "name": "string",          "id": "string"        }      ],      "total_duration": 0,      "carbon_emissions": {        "this_flight": 0,        "typical_for_this_route": 0,        "difference_percent": 0,        "lowest_route": 0      },      "price": 0,      "type": "string",      "airline_logo": "string",      "departure_token": "string",      "booking_token": "string"    }  ],  "booking_options": [    {      "book_with": "string",      "price": 0,      "airline_logos": [        "string"      ],      "marketed_as": [        "string"      ],      "option_title": "string",      "booking_request": {        "url": "string",        "post_data": "string"      }    }  ]}