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 round-trip flights.
- Search for one-way flights.
Install
pip install arcade_search
pip installing the toolkit is only needed if you are self-hosting Arcade. You do not need to install the toolkit if you’re using Arcade Cloud.
Available Tools
Tool Name | Description |
---|---|
SearchRoundtripFlights | Retrieve roundtrip flight search results using Google Flights. |
SearchOneWayFlights | Retrieve one-way flight search results using Google Flights. |
SearchRoundtripFlights
Retrieve flight search results 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 outbound date in YYYY-MM-DD format.return_date
(string, optional): Flight return 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.
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.