Google Maps

Learn how to use Google Maps with Composio

Overview

Enum

GOOGLE_MAPS

Description

Google Maps is a web mapping platform and consumer application offering satellite imagery, aerial photography, street maps, 360° interactive panoramic views of streets, real-time traffic conditions, and route planning for traveling by foot, car, bike, air and public transportation.

Authentication Details

client_id
stringRequired
client_secret
stringRequired
oauth_redirect_uri
stringDefaults to https://backend.composio.dev/api/v1/auth-apps/add
scopes
stringDefaults to https://www.googleapis.com/auth/cloud-platform
api_key
stringRequired

Actions

Computes routes between two points using google maps routes api. this action calculates routes between two locations, taking into account: - real-time traffic conditions (when routingpreference is traffic aware) - route preferences (avoiding tolls, highways, ferries) - alternative routes (when computealternativeroutes is true) - different travel modes (driving, walking, cycling, etc.) the response includes details like: - total distance in meters - estimated duration - encoded polyline for route visualization

Action Parameters

origin_address
stringRequired
destination_address
stringRequired
travelMode
stringDefaults to DRIVE
routingPreference
stringDefaults to TRAFFIC_AWARE
computeAlternativeRoutes
boolean
routeModifiers_avoidTolls
boolean
routeModifiers_avoidHighways
boolean
routeModifiers_avoidFerries
boolean
languageCode
stringDefaults to en-US
units
stringDefaults to IMPERIAL
fieldMask
stringDefaults to routes.distanceMeters,routes.duration,routes.polyline.encodedPolyline

Action Response

data
object
successful
boolean
error

Requires: valid google maps api key gets directions between locations using google maps directions api. this action provides detailed directions between two points, including: - turn-by-turn navigation steps - distance and duration for each step - alternative routes when available - support for waypoints - different travel modes examples: python # basic direction request request = getdirectionrequest( origin="disneyland", destination="universal studios hollywood" ) # complex route with waypoints and preferences request = getdirectionrequest( origin="los angeles airport", destination="santa monica pier", waypoints="venice beach,getty center", mode="driving", avoid="highways", units="metric" )

Action Parameters

origin
stringRequired
destination
stringRequired
waypoints
string
mode
stringDefaults to driving
avoid
string
language
stringDefaults to en
units
stringDefaults to imperial

Action Response

data
object
successful
boolean
error