Google Flights
Arcade.dev LLM tools for getting flights via Google Flights
4.1.2Google Flights Toolkit
Arcade's Google Flights toolkit enables LLMs to search, compare, and resolve flight itineraries via Google Flights (powered by SerpApi), covering one-way, round-trip, and multi-city trips.
Capabilities
- Airport lookup: Resolve city names, country names, or airport names to IATA codes, including metropolitan codes (e.g., NYC, LON) that span multiple airports.
- Flight search: Search one-way and round-trip itineraries in a single call; round-trip fares are priced independently and should never be approximated by summing two one-way searches.
- Multi-city search: Query open-jaw or multi-leg itineraries as a single bundled request, which is typically cheaper than equivalent one-way searches summed.
- Booking option resolution: Convert a
booking_tokenfrom any search result into a list of airlines and OTAs selling that specific itinerary, with optional POST data for backend vendor hand-offs. - Direct booking links: Every search result includes a
google_flights_urlthat opens the pre-selected flight on Google Flights, enabling immediate user hand-off without an additional lookup.
Secrets
SERP_API_KEY — A SerpApi API key used to query the Google Flights data source. Obtain it by creating an account at SerpApi, then copying your private API key from the dashboard. Free-tier accounts have a limited monthly search quota; paid plans are required for production-level usage. The key requires no additional scope configuration — all SerpApi features are gated by plan tier, not key permissions.
For configuring secrets in Arcade, see https://docs.arcade.dev/en/guides/create-tools/tool-basics/create-tool-secrets. You can also manage secrets 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`` from a one-way, round-trip, or multi-city
flight search result 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.
Each returned itinerary carries a ``google_flights_url`` that opens
that specific pre-selected flight on Google Flights, so you can hand
the user a booking link straight from these results without a
separate booking-options lookup. | 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 several one-way
searches for a single multi-city query.
Each returned itinerary carries a ``google_flights_url`` that opens
that specific pre-selected itinerary on Google Flights, so you can
hand the user a booking link straight from these results without a
separate booking-options lookup. | 1 |