Google Flights
Description: Empower your agents to search for flights using Arcade.
Author: Arcade
Code: GitHub
Auth: API Key
The Arcade Google Flights toolkit lets you search for flights with ease. Use these tools to build intelligent agents and applications that:
- Search for one-way flights.
Available Tools
Tool Name | Description |
---|---|
GoogleFlights.SearchOneWayFlights | Retrieve one-way flight search results using Google Flights. |
GoogleFlights.SearchOneWayFlights
Retrieve flight search results for a one-way flight using Google Flights.
Parameters
departure_airport_code
(string, required): The departure airport code. An uppercase 3-letter code.arrival_airport_code
(string, required): The arrival airport code. An uppercase 3-letter code.outbound_date
(string, required): Flight departure date in YYYY-MM-DD format.currency_code
(string, optional): Currency of the returned prices. Defaults to ‘USD’.travel_class
(enum (GoogleFlightsTravelClass), optional): Travel class of the flight. Defaults to ‘ECONOMY’.num_adults
(int, optional): Number of adult passengers. Defaults to 1.num_children
(int, optional): Number of child passengers. Defaults to 0.max_stops
(enum (GoogleFlightsMaxStops), optional): Maximum number of stops (layovers) for the flight. Defaults to any number of stops.sort_by
(enum (GoogleFlightsSortBy), optional): The sorting order of the results. Defaults to TOP_FLIGHTS.
Auth
The Arcade Google Flights toolkit uses the SerpAPI to search for flights from Google Flights.
- Secret:
SERP_API_KEY
: Your SerpAPI API key.
Setting the SERP_API_KEY
secret is only required if you are self-hosting Arcade. If you’re using Arcade Cloud, the secret is already set for you. To manage your secrets, go to the Secrets page in the Arcade Dashboard.
Reference
GoogleFlightsMaxStops
Defines the maximum number of stops for flights.
ANY
: Any number of stops is allowed.NONSTOP
: Only nonstop flights are allowed.ONE
: Only flights with one stop are allowed.TWO
: Only flights with two stops are allowed.
GoogleFlightsSortBy
Defines the sorting options for flight search results.
TOP_FLIGHTS
: Sort by the best available flights.PRICE
: Sort by the lowest price.DEPARTURE_TIME
: Sort by the earliest departure time.ARRIVAL_TIME
: Sort by the earliest arrival time.DURATION
: Sort by the shortest flight duration.EMISSIONS
: Sort by the lowest carbon emissions.
GoogleFlightsTravelClass
Defines the travel class options for flights.
ECONOMY
: Economy class.PREMIUM_ECONOMY
: Premium economy class.BUSINESS
: Business class.FIRST
: First class.