Google Flights
Arcade.dev LLM tools for getting flights via Google Flights
4.0.4The Google Flights toolkit lets LLMs search and resolve flight itineraries via the SerpApi Google Flights endpoint. It covers airport lookup, one-way/round-trip search, multi-city search, and booking option resolution.
Capabilities
- Airport discovery — resolve city names, country names, or airport names to IATA codes (including metropolitan codes like NYC or LON) for use in flight searches.
- One-way & round-trip search — query Google Flights for itineraries with flexible cabin class, passenger counts, and date options; round-trips are fetched in a single call to reflect true bundled pricing.
- Multi-city / open-jaw search — book complex multi-leg itineraries in one query, which typically prices cheaper than summing equivalent one-way fares.
- Booking option resolution — convert a
booking_tokenfrom a search result into the full list of airlines and OTAs selling that specific itinerary, with optional POST data for backend vendor hand-offs.
Secrets
SERP_API_KEY— An API key issued by SerpApi, the service that powers the underlying Google Flights data. To obtain one: create an account at https://serpapi.com/users/sign_up, then retrieve your private API key from the SerpApi dashboard. The key must have access to the Google Flights engine; free-tier accounts include a limited monthly search quota, while paid plans unlock higher volume. Pass this key as theSERP_API_KEYsecret in your Arcade configuration.
See the Arcade secrets guide for how to store secrets, or manage them directly at https://api.arcade.dev/dashboard/auth/secrets.
Available tools(4)
| Tool name | Description | Secrets | |
|---|---|---|---|
Resolve a ``booking_token`` to the airlines and OTAs selling that itinerary.
Pass a ``booking_token`` returned by ``search_flights`` or
``search_multi_city_flights`` to get the vendors selling that
specific flight. The token encodes the route, dates, cabin class,
and passenger counts (every segment for multi-city), so there are
no ``travel_class``, ``num_adults``, or ``num_children`` parameters;
supplying a cabin or party size would silently disagree with the
itinerary the token was issued for.
Leave ``include_booking_post_data`` off (the default) when an LLM
is comparing prices; turn it on only when a backend needs to
rebuild the vendor hand-off, since the POST body is multiple
kilobytes per option. | 1 | ||
Find IATA airport codes for a city, country, or airport name.
Metropolitan codes (NYC, LON, TYO, PAR, ...) are accepted as a
``departure_airport_code`` or ``arrival_airport_code`` in flight
searches and mean "any airport in this city". | |||
Search Google Flights for one-way or round-trip itineraries.
For a trip where the traveler returns to their origin, issue a
single call with both ``outbound_date`` and ``return_date`` set.
Do NOT issue two separate one-way searches in opposite directions
and sum the prices: airlines price round-trip fares independently
from one-way fares, so the sum of two cheapest one-ways is rarely
equal to the cheapest round-trip and is typically more expensive. | 1 | ||
Search Google Flights for a multi-city (open-jaw) itinerary.
Use this for trips that are neither a simple one-way nor a round-trip
(e.g. an open-jaw three-leg trip that ends back at the origin).
The open-jaw bundle is typically cheaper than the equivalent set
of one-way searches summed; never substitute multiple
``search_flights`` calls for a single multi-city query. | 1 |
Selected tools
No tools selected.
Click "Show all tools" to add tools.
Requirements
Select tools to see requirements
GoogleFlights.GetFlightBookingOptions
Execution hints
Signals for MCP clients and agents about how this tool behaves.
Reads data without modifying any state in the target system.
May permanently delete or overwrite data in the target system.
Repeated calls with the same inputs produce no additional effect.
Communicates with external APIs, databases, or other services.
Resolve a ``booking_token`` to the airlines and OTAs selling that itinerary. Pass a ``booking_token`` returned by ``search_flights`` or ``search_multi_city_flights`` to get the vendors selling that specific flight. The token encodes the route, dates, cabin class, and passenger counts (every segment for multi-city), so there are no ``travel_class``, ``num_adults``, or ``num_children`` parameters; supplying a cabin or party size would silently disagree with the itinerary the token was issued for. Leave ``include_booking_post_data`` off (the default) when an LLM is comparing prices; turn it on only when a backend needs to rebuild the vendor hand-off, since the POST body is multiple kilobytes per option.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
booking_token | string | Required | An opaque booking_token from a previously-returned itinerary. The token already encodes the originating route, dates, cabin class, passenger counts, and (for multi-city) every segment, so no other search inputs are needed to identify or price the itinerary. |
currency_code | string | Optional | ISO 4217 currency code for prices in the response. Defaults to 'USD'. |
include_booking_post_data | boolean | Optional | Surface the raw per-vendor POST hand-off (booking_request_post_url and booking_request_post_data) on POST-method options. The POST body Google would send to the vendor is multiple kilobytes per option, and an LLM comparing vendors does not need it. Backends that need to replay the vendor hand-off can opt in. The clickable booking_request_url and booking_request_method are always surfaced regardless. Defaults to false. |
limit | integer | Optional | Maximum vendor offers to return in this response (1-30). Defaults to 10. A popular round-trip can easily return 30+ vendors; the default keeps the response compact, and the caller can page through for the long tail. |
page | integer | Optional | Page number for pagination. Increment to fetch the next slice when has_more is true. Defaults to 1 (first page). |
Requirements
Output
json— Vendors selling the chosen itinerary.GoogleFlights.LookupAirports
Execution hints
Signals for MCP clients and agents about how this tool behaves.
Reads data without modifying any state in the target system.
May permanently delete or overwrite data in the target system.
Repeated calls with the same inputs produce no additional effect.
Communicates with external APIs, databases, or other services.
Find IATA airport codes for a city, country, or airport name. Metropolitan codes (NYC, LON, TYO, PAR, ...) are accepted as a ``departure_airport_code`` or ``arrival_airport_code`` in flight searches and mean "any airport in this city".
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
query | string | Required | A city name, country name, airport name, or IATA code to search for. Case-insensitive substring match (e.g. 'paris', 'london', 'JFK', 'tokyo'). |
limit | integer | Optional | Maximum number of airports and cities to return in each list (1-25). Defaults to 10. |
page | integer | Optional | Page number for pagination. Increment to fetch the next slice when has_more is true. Defaults to 1 (first page). |
Requirements
Output
json— Matching airports and metropolitan city codes.GoogleFlights.SearchFlights
Execution hints
Signals for MCP clients and agents about how this tool behaves.
Reads data without modifying any state in the target system.
May permanently delete or overwrite data in the target system.
Repeated calls with the same inputs produce no additional effect.
Communicates with external APIs, databases, or other services.
Search Google Flights for one-way or round-trip itineraries. For a trip where the traveler returns to their origin, issue a single call with both ``outbound_date`` and ``return_date`` set. Do NOT issue two separate one-way searches in opposite directions and sum the prices: airlines price round-trip fares independently from one-way fares, so the sum of two cheapest one-ways is rarely equal to the cheapest round-trip and is typically more expensive.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
departure_airport_code | string | Required | IATA code of the origin airport or metro city (e.g. SFO, JFK, LHR, NYC, PAR). Three uppercase letters. Metro codes are expanded to all their member airports before search. |
arrival_airport_code | string | Required | IATA code of the destination airport or metro city. Three uppercase letters. Metro codes are expanded to all their member airports before search. |
outbound_date | string | Required | Outbound departure date in YYYY-MM-DD format. Past dates return an empty flights list with a structured `past_date` warning rather than an error. |
return_date | string | Optional | Return date in YYYY-MM-DD format for a round-trip search. Leave empty for a one-way search. When set and earlier than outbound_date, the response returns an empty flights list with a structured `return_before_outbound` warning rather than raising. |
currency_code | string | Optional | ISO 4217 currency code for prices in the response. Defaults to 'USD'. |
travel_class | string | Optional | Cabin class to search. Defaults to ECONOMY.ECONOMYPREMIUM_ECONOMYBUSINESSFIRST |
num_adults | integer | Optional | Number of adult passengers (12+). Must be >= 1 when num_children > 0. Defaults to 1. |
num_children | integer | Optional | Number of child passengers (under 12). Defaults to 0. |
max_stops | string | Optional | Maximum allowed number of layovers. Defaults to ANY.ANYNONSTOPONETWO |
sort_by | string | Optional | Sort order for the results. Defaults to TOP_FLIGHTS (Google's blended rank).TOP_FLIGHTSPRICEDEPARTURE_TIMEARRIVAL_TIMEDURATIONEMISSIONS |
include_airlines | array<string> | Optional | Restrict results to these 2-letter IATA airline codes (e.g. ['DL', 'AA']). Leave empty for no filter. Cannot be combined with exclude_airlines. |
exclude_airlines | array<string> | Optional | Exclude these 2-letter IATA airline codes from results. Leave empty for no filter. Cannot be combined with include_airlines. |
outbound_departure_window | string | Optional | Time-of-day window for the outbound departure. Defaults to ANY.ANYEARLY_MORNINGMORNINGAFTERNOONEVENING |
outbound_arrival_window | string | Optional | Time-of-day window for the outbound arrival. Defaults to ANY.ANYEARLY_MORNINGMORNINGAFTERNOONEVENING |
return_departure_window | string | Optional | Time-of-day window for the return-leg departure. Only takes effect when return_date is set; otherwise a `return_param_ignored_one_way` warning is emitted and the value is dropped. Defaults to ANY.ANYEARLY_MORNINGMORNINGAFTERNOONEVENING |
return_arrival_window | string | Optional | Time-of-day window for the return-leg arrival. Only takes effect when return_date is set; otherwise a `return_param_ignored_one_way` warning is emitted and the value is dropped. Defaults to ANY.ANYEARLY_MORNINGMORNINGAFTERNOONEVENING |
max_total_duration_minutes | integer | Optional | Maximum end-to-end itinerary duration in minutes (each direction). Leave empty for no limit. |
connection_airport_code | string | Optional | Require itineraries to connect through this 3-letter IATA airport. Filters results client-side after the search, so nonstop itineraries are dropped and the response may shrink. Leave empty for no constraint. |
avoid_overnight_layovers | boolean | Optional | Drop itineraries with any layover that requires sleeping at the connecting airport. The decision is exposed on each layover as layovers[].requires_airport_sleep, derived from upstream's overnight flag OR a six-hour duration threshold (catches airport-sleep cases Google does not always tag). Filtered client-side, so the response may shrink. Defaults to false. |
include_price_history | boolean | Optional | Include the ~60-row daily price_history series under price_insights. Off by default because the rolling history dwarfs the rest of the response for an LLM that only needs typical_lowest_for_route, price_level, and typical_price_range. Set true when the caller is specifically visualising the price trend over time. |
limit | integer | Optional | Maximum itineraries to return in this response (1-50). Defaults to 20. A popular route can easily return 50+ itineraries; trim down to keep the response compact, or page through to see more. |
page | integer | Optional | Page number for pagination. Increment to fetch the next slice when has_more is true. Defaults to 1 (first page). |
Requirements
Output
json— Itineraries from Google Flights.GoogleFlights.SearchMultiCityFlights
Execution hints
Signals for MCP clients and agents about how this tool behaves.
Reads data without modifying any state in the target system.
May permanently delete or overwrite data in the target system.
Repeated calls with the same inputs produce no additional effect.
Communicates with external APIs, databases, or other services.
Search Google Flights for a multi-city (open-jaw) itinerary. Use this for trips that are neither a simple one-way nor a round-trip (e.g. an open-jaw three-leg trip that ends back at the origin). The open-jaw bundle is typically cheaper than the equivalent set of one-way searches summed; never substitute multiple ``search_flights`` calls for a single multi-city query.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
segments | array<json> | Required | Ordered list of itinerary segments. Each segment has departure_airport_code (IATA), arrival_airport_code (IATA), and outbound_date (YYYY-MM-DD). Between 2 and 6 segments. Dates must be non-decreasing and all today or later. Metro codes are expanded to their member airports before search. |
currency_code | string | Optional | ISO 4217 currency code for prices in the response. Defaults to 'USD'. |
travel_class | string | Optional | Cabin class to search across every segment. Defaults to ECONOMY.ECONOMYPREMIUM_ECONOMYBUSINESSFIRST |
num_adults | integer | Optional | Number of adult passengers. Must be >= 1 when num_children > 0. Defaults to 1. |
num_children | integer | Optional | Number of child passengers. Defaults to 0. |
max_stops | string | Optional | Maximum allowed number of layovers per segment. Defaults to ANY.ANYNONSTOPONETWO |
sort_by | string | Optional | Sort order for the results. Defaults to TOP_FLIGHTS.TOP_FLIGHTSPRICEDEPARTURE_TIMEARRIVAL_TIMEDURATIONEMISSIONS |
avoid_overnight_layovers | boolean | Optional | Drop itineraries with any layover that requires sleeping at the connecting airport, on any segment. The decision is exposed on each layover as layovers[].requires_airport_sleep, derived from upstream's overnight flag OR a six-hour duration threshold (catches multi-leg airport-sleep cases Google does not always tag). Filtered client-side, so the response may shrink. Defaults to false. |
limit | integer | Optional | Maximum itineraries to return in this response (1-50). Defaults to 20. |
page | integer | Optional | Page number for pagination. Increment to fetch the next slice when has_more is true. Defaults to 1 (first page). |
Requirements
Output
json— Multi-city itineraries from Google Flights.