Google Maps
Description: Enable agents to get directions between two locations with Google Maps.
Author: Arcade
Code: GitHub
Auth: API Key
The Arcade Google Maps toolkit provides a pre-built set of tools for interacting with Google Maps. These tools make it easy to build agents and AI apps that can:
- Get directions to a location using an address or latitude/longitude.
Available Tools
Tool Name | Description |
---|---|
GoogleMaps.GetDirectionsBetweenAddresses | Get directions between two addresses. |
GoogleMaps.GetDirectionsBetweenCoordinates | Get directions between two latitude/longitude coordinates. |
If you need to perform an action that’s not listed here, you can get in touch with us to request a new tool, or create your own tools.
GoogleMaps.GetDirectionsBetweenAddresses
Get directions between two addresses.
Parameters
origin_address
(string, required) The origin address. Example: ‘123 Main St, New York, NY 10001’.destination_address
(string, required) The destination address. Example: ‘456 Main St, New York, NY 10001’.language
(string, optional, Defaults to ‘en’ English) 2-character language code to use in the Google Maps search. A list of supported language codes can be found here.country
(string, optional, Defaults toNone
) 2-character country code to use in the Google Maps search. A list of supported country codes can be found here.distance_unit
(enum (GoogleMapsDistanceUnit), optional, Defaults toGoogleMapsDistanceUnit.KM
) Distance unit to use in the Google Maps search.travel_mode
(enum (GoogleMapsTravelMode), optional, Defaults toGoogleMapsTravelMode.BEST
) Travel mode to use in the Google Maps search.
GoogleMaps.GetDirectionsBetweenCoordinates
Get directions between two latitude/longitude coordinates.
Parameters
origin_latitude
(float, required) The origin latitude.origin_longitude
(float, required) The origin longitude.destination_latitude
(float, required) The destination latitude.destination_longitude
(float, required) The destination longitude.language
(string, optional, Defaults to ‘en’ English) 2-character language code to use in the Google Maps search. A list of supported language codes can be found here.country
(string, optional, Defaults toNone
) 2-character country code to use in the Google Maps search. A list of supported country codes can be found here.distance_unit
(enum (GoogleMapsDistanceUnit), optional, Defaults toGoogleMapsDistanceUnit.KM
) Distance unit to use in the Google Maps search.travel_mode
(enum (GoogleMapsTravelMode), optional, Defaults toGoogleMapsTravelMode.BEST
) Travel mode to use in the Google Maps search.
Auth
The Arcade Google Maps toolkit uses the SerpAPI to get directions.
- 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.
Default parameters
Language, Country, Distance Unit, and Travel Mode are configurable through environment variables. When set, they will be used as default for Google Maps tools.
Providing a different value as language
, country
, distance_unit
, or travel_mode
argument in a tool call will override the default value.
Language
The language code is a 2-character code that determines the language in which the API will search and return directions. There are two environment variables:
ARCADE_GOOGLE_LANGUAGE
: a default value for all Google tools. If not set, defaults to ‘en’ (English).ARCADE_GOOGLE_MAPS_LANGUAGE
: a default value for the Google Maps tools. If not set, defaults toARCADE_GOOGLE_LANGUAGE
.
A list of supported language codes can be found here.
Country
The country code is a 2-character code that determines the country in which the API will search for directions:
ARCADE_GOOGLE_MAPS_COUNTRY
: a default value for the Google Maps tools. If not set, defaults toNone
.
A list of supported country codes can be found here.
Distance Unit
The distance unit is a string that determines the unit of distance to use in the Google Maps search:
ARCADE_GOOGLE_MAPS_DISTANCE_UNIT
: a default value for the Google Maps tools. If not set, defaults toGoogleMapsDistanceUnit.KM
.
A list of supported distance units can be found here.
Travel Mode
The travel mode is a string that determines the mode of travel to use in the Google Maps search:
ARCADE_GOOGLE_MAPS_TRAVEL_MODE
: a default value for the Google Maps tools. If not set, defaults toGoogleMapsTravelMode.BEST
.
A list of supported travel modes can be found here.
- 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
GoogleMapsDistanceUnit
Distance unit to use in the Google Maps search.
KM
: Kilometers.MI
: Miles.
GoogleMapsTravelMode
Travel mode to use in the Google Maps search.
BEST
: Best mode.DRIVING
: Driving mode.MOTORCYCLE
: Motorcycle mode.PUBLIC_TRANSPORTATION
: Public transportation mode.WALKING
: Walking mode.BICYCLE
: Bicycling mode.FLIGHT
: Flight mode.
LanguageCodes
ar
: Arabicbn
: Bengalida
: Danishde
: Germanel
: Greeken
: Englishes
: Spanishfi
: Finnishfr
: Frenchhi
: Hindihu
: Hungarianid
: Indonesianit
: Italianja
: Japaneseko
: Koreanms
: Malaynl
: Dutchno
: Norwegianpcm
: Nigerian Pidginpl
: Polishpt
: Portuguesept-br
: Portuguese (Brazil)pt-pt
: Portuguese (Portugal)ru
: Russiansv
: Swedishtl
: Filipinotr
: Turkishuk
: Ukrainianzh
: Chinesezh-cn
: Chinese (Simplified)zh-tw
: Chinese (Traditional)
CountryCodes
af
: Afghanistanal
: Albaniadz
: Algeriaas
: American Samoaad
: Andorraao
: Angolaai
: Anguillaaq
: Antarcticaag
: Antigua and Barbudaar
: Argentinaam
: Armeniaaw
: Arubaau
: Australiaat
: Austriaaz
: Azerbaijanbs
: Bahamasbh
: Bahrainbd
: Bangladeshbb
: Barbadosby
: Belarusbe
: Belgiumbz
: Belizebj
: Beninbm
: Bermudabt
: Bhutanbo
: Boliviaba
: Bosnia and Herzegovinabw
: Botswanabv
: Bouvet Islandbr
: Brazilio
: British Indian Ocean Territorybn
: Brunei Darussalambg
: Bulgariabf
: Burkina Fasobi
: Burundikh
: Cambodiacm
: Cameroonca
: Canadacv
: Cape Verdeky
: Cayman Islandscf
: Central African Republictd
: Chadcl
: Chilecn
: Chinacx
: Christmas Islandcc
: Cocos (Keeling) Islandsco
: Colombiakm
: Comoroscg
: Congocd
: Congo, the Democratic Republic of theck
: Cook Islandscr
: Costa Ricaci
: Cote D’ivoirehr
: Croatiacu
: Cubacy
: Cypruscz
: Czech Republicdk
: Denmarkdj
: Djiboutidm
: Dominicado
: Dominican Republicec
: Ecuadoreg
: Egyptsv
: El Salvadorgq
: Equatorial Guineaer
: Eritreaee
: Estoniaet
: Ethiopiafk
: Falkland Islands (Malvinas)fo
: Faroe Islandsfj
: Fijifi
: Finlandfr
: Francegf
: French Guianapf
: French Polynesiatf
: French Southern Territoriesga
: Gabongm
: Gambiage
: Georgiade
: Germanygh
: Ghanagi
: Gibraltargr
: Greecegl
: Greenlandgd
: Grenadagp
: Guadeloupegu
: Guamgt
: Guatemalagg
: Guernseygn
: Guineagw
: Guinea-Bissaugy
: Guyanaht
: Haitihm
: Heard Island and Mcdonald Islandsva
: Holy See (Vatican City State)hn
: Hondurashk
: Hong Konghu
: Hungaryis
: Icelandin
: Indiaid
: Indonesiair
: Iran, Islamic Republic ofiq
: Iraqie
: Irelandim
: Isle of Manil
: Israelit
: Italyje
: Jerseyjm
: Jamaicajp
: Japanjo
: Jordankz
: Kazakhstanke
: Kenyaki
: Kiribatikp
: Korea, Democratic People’s Republic ofkr
: Korea, Republic ofkw
: Kuwaitkg
: Kyrgyzstanla
: Lao People’s Democratic Republiclv
: Latvialb
: Lebanonls
: Lesotholr
: Liberialy
: Libyan Arab Jamahiriyali
: Liechtensteinlt
: Lithuanialu
: Luxembourgmo
: Macaomk
: Macedonia, the Former Yugosalv Republic ofmg
: Madagascarmw
: Malawimy
: Malaysiamv
: Maldivesml
: Malimt
: Maltamh
: Marshall Islandsmq
: Martiniquemr
: Mauritaniamu
: Mauritiusyt
: Mayottemx
: Mexicofm
: Micronesia, Federated States ofmd
: Moldova, Republic ofmc
: Monacomn
: Mongoliame
: Montenegroms
: Montserratma
: Moroccomz
: Mozambiquemm
: Myanmarna
: Namibianr
: Naurunp
: Nepalnl
: Netherlandsan
: Netherlands Antillesnc
: New Caledonianz
: New Zealandni
: Nicaraguane
: Nigerng
: Nigerianu
: Niuenf
: Norfolk Islandmp
: Northern Mariana Islandsno
: Norwayom
: Omanpk
: Pakistanpw
: Palaups
: Palestinian Territory, Occupiedpa
: Panamapg
: Papua New Guineapy
: Paraguaype
: Peruph
: Philippinespn
: Pitcairnpl
: Polandpt
: Portugalpr
: Puerto Ricoqa
: Qatarre
: Reunionro
: Romaniaru
: Russian Federationrw
: Rwandash
: Saint Helenakn
: Saint Kitts and Nevislc
: Saint Luciapm
: Saint Pierre and Miquelonvc
: Saint Vincent and the Grenadinesws
: Samoasm
: San Marinost
: Sao Tome and Principesa
: Saudi Arabiasn
: Senegalrs
: Serbiasc
: Seychellessl
: Sierra Leonesg
: Singaporesk
: Slovakiasi
: Sloveniasb
: Solomon Islandsso
: Somaliaza
: South Africags
: South Georgia and the South Sandwich Islandses
: Spainlk
: Sri Lankasd
: Sudansr
: Surinamesj
: Svalbard and Jan Mayensz
: Swazilandse
: Swedench
: Switzerlandsy
: Syrian Arab Republictw
: Taiwan, Province of Chinatj
: Tajikistantz
: Tanzania, United Republic ofth
: Thailandtl
: Timor-Lestetg
: Togotk
: Tokelauto
: Tongatt
: Trinidad and Tobagotn
: Tunisiatr
: Turkiyetm
: Turkmenistantc
: Turks and Caicos Islandstv
: Tuvaluug
: Ugandaua
: Ukraineae
: United Arab Emiratesuk
: United Kingdomgb
: United Kingdomus
: United Statesum
: United States Minor Outlying Islandsuy
: Uruguayuz
: Uzbekistanvu
: Vanuatuve
: Venezuelavn
: Viet Namvg
: Virgin Islands, Britishvi
: Virgin Islands, U.S.wf
: Wallis and Futunaeh
: Western Saharaye
: Yemenzm
: Zambiazw
: Zimbabwe