# Google Maps

Integrate Google Maps to access location data, geocoding, directions, and mapping services in your application.

- **Category:** developer tools
- **Auth:** OAUTH2, API_KEY
- **Composio Managed App Available?** Yes
- **Tools:** 22
- **Triggers:** 0
- **Slug:** `GOOGLE_MAPS`
- **Version:** 20260316_00

## Frequently Asked Questions

### How do I set up custom Google OAuth credentials for Google Maps?

For a step-by-step guide on creating and configuring your own Google OAuth credentials with Composio, see [How to create OAuth2 credentials for Google Apps](https://composio.dev/auth/googleapps).

### Why am I seeing "App is blocked" when connecting Google Maps?

The OAuth client is requesting scopes that Google hasn't verified for that client. This usually happens when you add extra scopes beyond the defaults.

Remove the additional scopes from your auth config, or create your own OAuth app and submit the scopes for verification. See [How to create OAuth2 credentials for Google Apps](https://composio.dev/auth/googleapps).

### Why am I getting "Google Maps API has not been used in project" error?

When using custom OAuth credentials, the Google Maps API must be enabled in the Google Cloud project that owns those credentials. Enable it in Google Cloud Console under APIs & Services, wait a few minutes, and retry.

### Why am I getting "Error 400: invalid_scope"?

The requested scopes are invalid or incorrectly formatted in the authorization URL. Verify your scope values against the [Google OAuth scopes docs](https://developers.google.com/identity/protocols/oauth2). If you're creating auth configs programmatically, see the [programmatic auth config guide](/docs/auth-configuration/programmatic-auth-configs).

### Why does the OAuth consent screen show "Composio" instead of my app?

By default, the consent screen uses Composio's OAuth app. To show your own app name and logo, create your own OAuth app and set a custom redirect URL. See [White-labeling authentication](/docs/white-labeling-authentication#using-your-own-oauth-apps).

### Why am I getting 401 errors on tool calls?

The user's access token is no longer valid. Common causes: the user revoked access, changed their password or 2FA, a Workspace admin policy changed, or Google's refresh token limit (~50 per account) was exceeded. Re-authenticating the user typically resolves this.

---

## Tools

### Autocomplete Place Predictions

**Slug:** `GOOGLE_MAPS_AUTOCOMPLETE`

Returns place and query predictions for text input. Use when implementing as-you-type autocomplete functionality for place searches. Returns up to five predictions ordered by relevance.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `input` | string | Yes | Text string to search for place predictions. Can be full words, substrings, place names, addresses, or plus codes. Must be non-empty. |
| `origin` | object | No | Latitude/longitude point for distance calculations. |
| `regionCode` | string | No | Region code in ccTLD format for formatting responses (e.g., 'us', 'br'). |
| `inputOffset` | integer | No | Zero-based Unicode character offset of cursor position in the input string. |
| `languageCode` | string | No | Preferred language for results using IETF BCP-47 language codes (e.g., 'en-US', 'es-ES'). |
| `locationBias` | object | No | Area to bias search results toward. |
| `sessionToken` | string | No | User-generated string grouping calls into sessions for billing purposes. |
| `includedRegionCodes` | array | No | Up to 15 two-character country codes (ISO 3166-1 Alpha-2) to restrict results. Query predictions unavailable when this is set. |
| `locationRestriction` | object | No | Area to restrict search results within. |
| `includedPrimaryTypes` | array | No | Restricts results to up to five specified primary types (e.g., 'restaurant', 'cafe'). |
| `includeQueryPredictions` | boolean | No | Includes query predictions in response for text searches (default: false). |
| `includePureServiceAreaBusinesses` | boolean | No | Includes businesses without physical locations (default: false). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Compute Route Matrix

**Slug:** `GOOGLE_MAPS_COMPUTE_ROUTE_MATRIX`

Calculates travel distance and duration matrix between multiple origins and destinations using the modern Routes API; supports OAuth2 authentication and various travel modes. Matrix is capped at 625 elements (e.g., 25×25); chunk larger sets to avoid RESOURCE_EXHAUSTED errors. Response elements may be returned out of input order — always use originIndex and destinationIndex to map results. Only use elements where condition='ROUTE_EXISTS'; the matrix may be incomplete.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `units` | string ("METRIC" | "IMPERIAL") | No | Unit system (e.g., 'METRIC' for kilometers, 'IMPERIAL' for miles) for displaying distances. Note: distanceMeters in responses is always in meters regardless of this setting; units affects only human-readable text output. |
| `origins` | array | Yes | List of origin locations. Each can be specified as an address or latitude/longitude coordinates. |
| `fieldMask` | string | No | Comma-separated list of response fields to include (e.g., 'originIndex,destinationIndex,duration,distanceMeters'). Use '*' for all fields. |
| `travelMode` | string ("DRIVE" | "BICYCLE" | "WALK" | "TWO_WHEELER" | "TRANSIT") | No | Mode of transportation for the route matrix calculation. |
| `destinations` | array | Yes | List of destination locations. Each can be specified as an address or latitude/longitude coordinates. |
| `languageCode` | string | No | BCP-47 language code (e.g., 'en-US', 'es') for textual information. |
| `routingPreference` | string ("ROUTING_PREFERENCE_UNSPECIFIED" | "TRAFFIC_UNAWARE" | "TRAFFIC_AWARE" | "TRAFFIC_AWARE_OPTIMAL") | No | Specifies factors to consider when calculating the route. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Distance Matrix (Legacy)

**Slug:** `GOOGLE_MAPS_DISTANCE_MATRIX_API`

DEPRECATED: Legacy API that calculates travel distance and time for a matrix of origins and destinations. This API only works with API keys (no OAuth2 support). Use the modern 'Compute Route Matrix' action instead, which supports OAuth2 authentication. Supports different modes of transportation and options like departure/arrival times. Capped at 100 elements per request (elements = origins × destinations count); split large sets into batches.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `key` | string | No | Your application's API key. This key identifies your application for purposes of quota management. |
| `mode` | string ("driving" | "walking" | "bicycling" | "transit") | No | Specifies the mode of transport to use. |
| `avoid` | string ("tolls" | "highways" | "ferries" | "indoor") | No | Indicates that the calculated route should avoid the specified features. Multiple values can be pipe-separated e.g. 'tolls\|highways'. |
| `units` | string ("metric" | "imperial") | No | Specifies the unit system to use when displaying results. The default is metric. |
| `region` | string | No | The region code, specified as a ccTLD ('top-level domain') two-character value. This helps influence results based on the region. |
| `origins` | string | Yes | The starting point for calculating travel distance and time. You can supply one or more locations separated by the pipe character (\|), in the form of a place ID (prefixed with place_id:), an address, latitude/longitude coordinates (e.g., '40.7128,-74.0060'), a plus code, or an encoded polyline (prefixed with enc: and a colon). |
| `language` | string | No | The language in which to return results. See the list of supported languages: https://developers.google.com/maps/faq#languagesupport |
| `arrival_time` | integer | No | Specifies the desired time of arrival for transit directions, in seconds since midnight, January 1, 1970 UTC. You can specify either departure_time or arrival_time, but not both. |
| `destinations` | string | Yes | One or more locations to use as the finishing point for calculating travel distance and time. Accepts the same formats as origins. |
| `transit_mode` | string ("bus" | "subway" | "train" | "tram" | "rail") | No | Specifies one or more preferred modes of transit. This parameter may only be specified for transit directions. Multiple values can be pipe-separated e.g. 'bus\|train'. |
| `traffic_model` | string ("best_guess" | "pessimistic" | "optimistic") | No | Specifies the assumptions to use when calculating time in traffic. This parameter is only used if the request includes a departure_time and mode is 'driving'. |
| `departure_time` | string | No | Specifies the desired time of departure. You can specify the time as an integer in seconds since midnight, January 1, 1970 UTC, or as the string 'now'. Required for duration_in_traffic. |
| `transit_routing_preference` | string ("less_walking" | "fewer_transfers") | No | Specifies preferences for transit routes. This parameter may only be specified for transit directions. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Geocode Address

**Slug:** `GOOGLE_MAPS_GEOCODE_ADDRESS`

DEPRECATED: Legacy API to convert street addresses into geographic coordinates (latitude and longitude). This API works best with API key authentication. For OAuth connections without an API key, you may need to provide the 'key' parameter or use the newer 'Text Search' action instead. Use when you need to geocode an address or location to get its precise latitude/longitude coordinates.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `key` | string | No | Your application's API key. This parameter is required when using API key authentication. If not provided, will attempt to use OAuth authentication (requires X-Goog-User-Project header with project ID). |
| `bounds` | string | No | Bounding box of the viewport within which to bias geocode results more prominently. Format: southwest_lat,southwest_lng\|northeast_lat,northeast_lng. This parameter will only influence, not fully restrict, results from the geocoder. |
| `region` | string | No | Region code specified as a ccTLD (country code top-level domain) two-character value. This parameter will only influence, not fully restrict, results from the geocoder. |
| `address` | string | No | The street address that you want to geocode, in the format used by the national postal service of the country concerned. Additional address elements such as business names and unit, suite or floor numbers should be avoided. Street address elements should be delimited by spaces (shown here as url-escaped to %20). If both address and components are provided, address takes precedence. |
| `language` | string | No | Language in which to return results. If not supplied, the geocoder attempts to use the preferred language as specified in the Accept-Language header, or the native language of the domain from which the request is sent. |
| `components` | string | No | Component filters separated by a pipe (\|). Each component filter consists of component:value pair and fully restricts results from the geocoder. Examples: components=country:US or components=postal_code:94043\|country:US. If both address and components are provided, address takes precedence. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Geocode Address With Query

**Slug:** `GOOGLE_MAPS_GEOCODE_ADDRESS_WITH_QUERY`

Tool to map addresses to geographic coordinates with query parameter. Use when you need to convert a textual address into latitude/longitude coordinates using the modern v4beta API. Results may match multiple places — always verify `formattedAddress`, `region`, and `addressComponents` in the response before using returned coordinates.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `region_code` | string | No | Region code, specified as a ccTLD two-character value (e.g., 'US', 'FR'). This parameter affects results based on applicable law. |
| `address_query` | string | Yes | The unstructured address to geocode. This should be a single string containing the full address (e.g., '1600 Amphitheatre Parkway Mountain View CA'). Include city, state/region, and country where possible — incomplete or ambiguous strings may return zero results or incorrect matches. |
| `language_code` | string | No | Language in which the results should be returned (e.g., 'en', 'es', 'fr'). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Geocode Destinations

**Slug:** `GOOGLE_MAPS_GEOCODE_DESTINATIONS`

Tool to perform destination lookup and return detailed destination information including primary place, containing places, sub-destinations, landmarks, entrances, and navigation points. Use when you need comprehensive destination data for an address, place ID, or geographic coordinates.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `place` | string | No | Resource name in format 'places/{placeId}' to retrieve destination by Place ID |
| `regionCode` | string | No | Two-character ccTLD region code for formatting/filtering (e.g., 'US', 'UK') |
| `travelModes` | array | No | Filter navigation points by travel mode. Supported values: DRIVE, WALK |
| `addressQuery` | object | No | Address query in unstructured or structured format |
| `languageCode` | string | No | Preferred language code for results (e.g., 'en', 'es', 'fr') |
| `locationQuery` | object | No | Location query using geographic coordinates |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Reverse Geocode Location

**Slug:** `GOOGLE_MAPS_GEOCODE_LOCATION`

Tool to convert geographic coordinates (latitude and longitude) to human-readable addresses using reverse geocoding. Use when you need to find the address or place name for a given set of coordinates. A single coordinate pair may return multiple results; verify formattedAddress, region, and addressComponents before committing to a result.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `types` | array | No | Set of type tags to restrict results; results without specified types are removed |
| `latitude` | number | Yes | Latitude coordinate in degrees, range [-90.0, +90.0] |
| `longitude` | number | Yes | Longitude coordinate in degrees, range [-180.0, +180.0] |
| `regionCode` | string | No | Region code specified as a ccTLD two-character value, affecting results based on applicable law |
| `languageCode` | string | No | Language code in which the results should be returned (BCP-47 format) |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Geocode Place by ID

**Slug:** `GOOGLE_MAPS_GEOCODE_PLACE`

Tool to perform geocode lookup using a place identifier to retrieve address and coordinates. Use when you need to get detailed geographic information for a specific Google Place ID.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `place_id` | string | Yes | Place identifier to geocode. Must be in the format 'places/{placeId}' or just the place ID (e.g., 'ChIJj61dQgK6j4AR4GeTYWZsKWw'). The unique identifier for a place in the Google Places database. |
| `regionCode` | string | No | Region code specified as a ccTLD two-character value, affecting results based on applicable law and address formatting. |
| `languageCode` | string | No | Language code in which the results should be returned (BCP-47 format). Defaults to 'en' if not specified. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Geocoding API

**Slug:** `GOOGLE_MAPS_GEOCODING_API`

Convert addresses into geographic coordinates (latitude and longitude) and vice versa (reverse geocoding), or get an address for a Place ID. Uses the Geocoding API v4 (v4beta) which supports OAuth2 authentication. Exactly one of `address`, `latlng`, or `place_id` must be provided per request; omitting all three or mixing incompatible combinations yields no useful results.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `key` | string | No | Your application's API key. If not provided, will be extracted from connection metadata. |
| `bounds` | string | No | The bounding box of the viewport within which to bias geocode results more prominently (e.g., '34.172684,-118.604794\|34.236144,-118.500938'). This parameter will only influence, not fully restrict, results. |
| `latlng` | string | No | The latitude and longitude coordinates specifying the location for which you want the closest, human-readable address (e.g., '40.714224,-73.961452'). Provide for reverse geocoding. |
| `region` | string | No | The region code, specified as a ccTLD ('top-level domain') two-character value. This parameter will only influence, not fully restrict, results from the geocoder. |
| `address` | string | No | The street address or plus code that you want to geocode. Provide for geocoding (address to coordinates). |
| `language` | string | No | The language in which to return results. If language is not supplied, the geocoder attempts to use the preferred language as specified in the Accept-Language header, or the native language of the domain from which the request is sent. |
| `place_id` | string | No | The place ID of the place for which you wish to obtain the human-readable address. Provide for place ID geocoding. |
| `components` | string | No | A components filter with elements separated by a pipe (\|). E.g., 'postal_code:94043\|country:US'. Used for geocoding, can be restrictive or biasing. Supplying only `components` without `address` may return ZERO_RESULTS for some queries. |
| `result_type` | string | No | A filter of one or more address types, separated by a pipe (\|) (e.g., 'street_address\|locality'). Used for reverse geocoding and place ID geocoding. |
| `location_type` | string | No | A filter of one or more location types, separated by a pipe (\|) (e.g., 'ROOFTOP\|RANGE_INTERPOLATED'). Used for reverse geocoding and place ID geocoding. |
| `extra_computations` | array | No | Use this parameter to specify additional features in the response. Can select multiple values. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Geolocate Device

**Slug:** `GOOGLE_MAPS_GEOLOCATE`

Tool to determine location based on cell towers and WiFi access points. Use when you need to find the geographic location of a device using network infrastructure data.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `carrier` | string | No | Carrier name. |
| `radioType` | string ("gsm" | "cdma" | "wcdma" | "lte" | "nr") | No | Radio type. Defaults to 'gsm'. |
| `cellTowers` | array | No | Array of cell tower objects. |
| `considerIp` | boolean | No | Whether to fall back to IP geolocation if WiFi and cell tower signals are missing. Defaults to true. |
| `wifiAccessPoints` | array | No | Array of WiFi access point objects (minimum 2 required for success). |
| `homeMobileCountryCode` | integer | No | Mobile country code for device's home network. Range: 0-999. |
| `homeMobileNetworkCode` | integer | No | MNC for GSM/WCDMA/LTE/NR (0-999); SID for CDMA (0-32767). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get 2D Map Tile

**Slug:** `GOOGLE_MAPS_GET2D_TILE`

Tool to retrieve a 2D map tile image at specified coordinates for building custom map visualizations. Use when you need to download individual map tile images for roadmap, satellite, or terrain views. Requires a valid session token from the createSession endpoint.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `x` | integer | Yes | Tile column coordinate. Valid range: [0, (2^zoom)-1]. |
| `y` | integer | Yes | Tile row coordinate. Valid range: [0, (2^(zoom-1))-1]. Valid range: [0, (2^zoom)-1], same as `x`. |
| `z` | integer | Yes | Zoom level ranging from 0 (entire world) to 22 (highly detailed). |
| `key` | string | No | Google API key for authentication. If not provided, will be extracted from connection metadata. Required if not using Bearer token authentication. |
| `session` | string | Yes | Session token UUID obtained from /v1/createSession endpoint. Valid for approximately two weeks. Required for all 2D tile requests. Reuse across multiple tile requests; each createSession call consumes quota. |
| `orientation` | integer | No | Rotation parameter in degrees counter-clockwise. Valid values: 0, 90, 180, or 270. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get 3D Tiles Root

**Slug:** `GOOGLE_MAPS_GET3D_TILES_ROOT`

Tool to retrieve the 3D Tiles tileset root configuration for photorealistic 3D map rendering. Use when you need to initialize a 3D renderer with Google's photorealistic tiles following the OGC 3D Tiles specification. The Map Tiles API is billable per request; cache the root response client-side and avoid repeated calls.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `key` | string | No | Your Google Maps API key with Map Tiles API enabled. If not provided, will be extracted from connection metadata. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Directions

**Slug:** `GOOGLE_MAPS_GET_DIRECTION`

Fetches detailed directions between an origin and a destination, supporting intermediate waypoints and various travel modes. Automatically uses the modern Routes API with OAuth2 when available, falling back to legacy API with API key if provided.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `mode` | string ("driving" | "walking" | "bicycling" | "transit") | No | The mode of transportation for which to calculate directions. |
| `avoid` | string | No | Specifies features to avoid in the generated route. Multiple values can be combined using a pipe delimiter (e.g., 'tolls\|highways'). Valid options include 'tolls', 'highways', and 'ferries'. |
| `units` | string ("metric" | "imperial") | No | The unit system for displaying distances. Defaults to 'imperial'. |
| `origin` | string | Yes | The starting point for the directions. This can be a textual address (e.g., '123 Main St, Los Angeles, CA'), a place name (e.g., 'Disneyland'), or latitude/longitude coordinates (e.g., '34.0522,-118.2437'). |
| `language` | string | No | The language code for returning results, e.g., 'en' for English, 'es' for Spanish. Defaults to 'en'. |
| `waypoints` | string | No | A pipe-separated (\|) string of intermediate locations (addresses, place names, or coordinates) to visit between the origin and destination. For example: 'Anaheim, CA\|Long Beach, CA' or 'Hollywood Bowl\|Getty Center'. |
| `destination` | string | Yes | The ending point for the directions. This can be a textual address (e.g., '456 Park Ave, New York, NY'), a place name (e.g., 'Universal Studios Hollywood'), or latitude/longitude coordinates (e.g., '40.7128,-74.0060'). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Place Details

**Slug:** `GOOGLE_MAPS_GET_PLACE_DETAILS`

Retrieves comprehensive details for a place using its resource name (places/{place_id} format). Use when you need detailed information about a specific place.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | Yes | Google Place ID ONLY - an alphanumeric code (NOT a business name, address, or search query). Accepts 'places/{place_id}' or just the place_id. Place IDs typically start with 'ChIJ' followed by alphanumeric characters. To find a place ID from a business name, first use TEXT_SEARCH or NEARBY_SEARCH. |
| `fieldMask` | string | No | Comma-separated list of place fields to return (no spaces allowed). Use '*' for all fields (not recommended for performance/cost). Common fields: id, displayName, formattedAddress, location, types, rating, photos, reviews, regularOpeningHours, nationalPhoneNumber, internationalPhoneNumber, websiteUri, googleMapsUri. Note: 'emailAddress' and 'phoneNumber' are NOT valid fields - use 'nationalPhoneNumber' or 'internationalPhoneNumber' instead. |
| `regionCode` | string | No | Unicode country/region code (CLDR format) for region-specific display names. Examples: 'US', 'GB', 'FR', 'JP'. This affects how place names and addresses are formatted. |
| `languageCode` | string | No | Preferred language code for place details (BCP-47 format). Examples: 'en' (English), 'es' (Spanish), 'fr' (French), 'ja' (Japanese). If not specified, defaults to the language of the request location. |
| `sessionToken` | string | No | URL-safe base64 string (max 36 characters) for Autocomplete session billing. Used to group this request with previous Autocomplete requests for billing purposes. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Route

**Slug:** `GOOGLE_MAPS_GET_ROUTE`

Calculates one or more routes between two specified locations. Uses various travel modes and preferences; addresses must be resolvable by Google Maps. Response `duration` is a string with 's' suffix (e.g., `"4557s"`); parse before displaying.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `units` | string ("METRIC" | "IMPERIAL") | No | Unit system (e.g., 'METRIC' for kilometers, 'IMPERIAL' for miles) for displaying distances. Note: `routes.distanceMeters` in the response is always in meters regardless of this setting; `units` only affects human-readable distance formatting in other fields. |
| `fieldMask` | string | No | Comma-separated list of `Route` object fields to include in the response (e.g., 'routes.distanceMeters,routes.duration'). If not specified, a default fieldMask is used based on travelMode: for TRANSIT mode, transit-specific fields (transitDetails, steps, etc.) are included; for other modes, basic route fields (distanceMeters, duration, polyline) are included. Fields not listed are absent from the response; explicitly include all needed fields such as `routes.legs.steps` and `routes.polyline.encodedPolyline`. |
| `travelMode` | string ("DRIVE" | "BICYCLE" | "WALK" | "TWO_WHEELER" | "TRANSIT") | No | Mode of transportation for the route. |
| `languageCode` | string | No | BCP-47 language code (e.g., 'en-US', 'es') for textual information like navigation instructions. |
| `origin_address` | string | Yes | Starting point for the route calculation. Can be an address (e.g., '1600 Amphitheatre Parkway, Mountain View, CA') or coordinates as 'latitude,longitude' (e.g., '48.8566,2.3522'). |
| `routingPreference` | string ("ROUTING_PREFERENCE_UNSPECIFIED" | "TRAFFIC_UNAWARE" | "TRAFFIC_AWARE" | "TRAFFIC_AWARE_OPTIMAL") | No | Specifies routing preference: `TRAFFIC_UNAWARE` (fastest, ignores traffic), `TRAFFIC_AWARE` (considers traffic, optimized), `TRAFFIC_AWARE_OPTIMAL` (most accurate traffic-based routing), or `ROUTING_PREFERENCE_UNSPECIFIED` (behavior similar to `TRAFFIC_UNAWARE`). Cannot be set when travelMode is WALK, BICYCLE, or TRANSIT - must be omitted for these modes. |
| `destination_address` | string | Yes | Destination point for the route calculation. Can be an address (e.g., '85 10th Ave, New York, NY') or coordinates as 'latitude,longitude' (e.g., '40.7484,-73.9967'). |
| `computeAlternativeRoutes` | boolean | No | Computes and returns alternative routes if true. |
| `routeModifiers_avoidTolls` | boolean | No | Attempts to avoid toll roads if true. |
| `routeModifiers_avoidFerries` | boolean | No | Attempts to avoid ferries if true. |
| `routeModifiers_avoidHighways` | boolean | No | Attempts to avoid highways if true. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Lookup Aerial Video

**Slug:** `GOOGLE_MAPS_LOOKUP_AERIAL_VIDEO`

Tool to look up an aerial view video by address or video ID. Returns video metadata including state and URIs for playback. Use when you need to retrieve a previously rendered aerial video or check the status of a video render request. Note that receiving a video is a billable event.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `address` | string | No | A US postal address. Either videoId or address must be provided, but not both. |
| `videoId` | string | No | An ID returned from videos.renderVideo. Either videoId or address must be provided, but not both. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Embed Google Map

**Slug:** `GOOGLE_MAPS_MAPS_EMBED_API`

Tool to generate an embeddable Google Map URL and HTML iframe code. Use when you need to display a map (place, view, directions, street view, search) on a webpage without JavaScript. Note: This API only works with API keys (no OAuth2 support). It generates embed URLs and does not make direct API calls. Generated embed URLs are publicly accessible; avoid passing sensitive or internal location queries.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `mode` | string ("place" | "view" | "directions" | "streetview" | "search") | Yes | The mode of the embedded map. |
| `api_key` | string | No | Google Maps API key. Required if not provided via connection metadata. The Maps Embed API only supports API key authentication, not OAuth. |
| `view_params` | object | No | Parameters for 'view' mode. |
| `place_params` | object | No | Parameters for 'place' mode. |
| `search_params` | object | No | Parameters for 'search' mode. |
| `directions_params` | object | No | Parameters for 'directions' mode. |
| `streetview_params` | object | No | Parameters for 'streetview' mode. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Nearby search

**Slug:** `GOOGLE_MAPS_NEARBY_SEARCH`

Searches for places (e.g., restaurants, parks) within a specified circular area, with options to filter by place types and customize the returned fields and number of results.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `radius` | number | Yes | Radius of the circular search area in meters. |
| `latitude` | number | Yes | Latitude coordinate of the search center in decimal degrees. |
| `fieldMask` | string | No | Comma-separated list of place fields for the response. Fields are automatically prefixed with 'places.' if missing. Common fields: displayName, formattedAddress, id, types, rating, userRatingCount, location, businessStatus, regularOpeningHours, photos, reviews. Use '*' for all fields (not recommended for production). Valid field names include: displayName, formattedAddress, shortFormattedAddress, id, types, primaryType, primaryTypeDisplayName, location, viewport, plusCode, rating, userRatingCount, reviews, regularOpeningHours, currentOpeningHours, photos, websiteUri, googleMapsUri, businessStatus, priceLevel, priceRange, addressComponents, utcOffsetMinutes, internationalPhoneNumber, nationalPhoneNumber, editorialSummary, accessibilityOptions, parkingOptions, paymentOptions, delivery, dineIn, takeout, reservable, servesBreakfast, servesLunch, servesDinner, servesBeer, servesWine, allowsDogs, outdoorSeating, liveMusic, goodForChildren, goodForGroups. |
| `longitude` | number | Yes | Longitude coordinate of the search center in decimal degrees. |
| `excludedTypes` | array | No | List of place types to exclude from Table A. Results matching any of these types are omitted. Up to 50 types allowed. Must be provided as a list, e.g., ['cafe'] for a single type or ['cafe', 'store'] for multiple types. Must use valid Table A types only. |
| `includedTypes` | array | No | List of place types to include from Table A. Results will match at least one of these types. Up to 50 types allowed. Must be provided as a list, e.g., ['restaurant'] for a single type or ['atm', 'bank'] for multiple types. Common types: restaurant, cafe, bank, atm, hospital, pharmacy, school, park, gym, hotel, airport, gas_station. IMPORTANT: 'food' is NOT a valid type (it's in Table B); use specific types like restaurant, cafe, bakery, fast_food_restaurant instead. Note: 'locality' is valid, but 'city', 'town', 'sublocality', 'landmark', and 'point_of_interest' are NOT valid for filtering. |
| `maxResultCount` | integer | No | Maximum number of search results to return. Valid range: 1-20. The actual count may be lower based on available places. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Place Photo

**Slug:** `GOOGLE_MAPS_PLACE_PHOTO`

Retrieves high quality photographic content from the Google Maps Places database. Use when you need to download a place photo using a photo_reference obtained from Place Details, Nearby Search, or Text Search requests. Images are scaled proportionally to fit within specified dimensions.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `maxwidth` | integer | No | Maximum desired width of the image in pixels (1-1600). Image will be scaled proportionally. You must specify either maxwidth, maxheight, or both. |
| `maxheight` | integer | No | Maximum desired height of the image in pixels (1-1600). Image will be scaled proportionally. You must specify either maxwidth, maxheight, or both. |
| `photo_reference` | string | Yes | A string identifier that uniquely identifies a photo. Can be either: (1) A full photo resource name in format 'places/{place_id}/photos/{photo}' from the new Places API, or (2) Just the photo reference string from legacy API. Obtained from Place Details, Nearby Search, or Text Search requests. Note: Photo references cannot be cached and may expire over time. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Render Aerial Video

**Slug:** `GOOGLE_MAPS_RENDER_AERIAL_VIDEO`

Starts rendering an aerial view video for a US postal address. Returns a video ID that can be used with lookupVideo to retrieve the video once rendering completes. Rendering typically takes up to a few hours.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `address` | string | Yes | US postal address for which to render aerial video. Must be a valid US address with street, city, state, and postal code. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Text Search

**Slug:** `GOOGLE_MAPS_TEXT_SEARCH`

Searches for places on Google Maps using a textual query (e.g., "restaurants in London", "Eiffel Tower"). Results may include CLOSED_PERMANENTLY or TEMPORARILY_CLOSED places — filter by businessStatus=OPERATIONAL. Include city/region and business type in textQuery to avoid empty or irrelevant results. Deduplicate using id or formattedAddress, not name alone. Throttle to ~1 req/s; OVER_QUERY_LIMIT (HTTP 429) requires exponential backoff.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `fieldMask` | string | No | Comma-separated list of place fields to return. Common fields include: displayName, formattedAddress, types, rating, userRatingCount, priceLevel, websiteUri, nationalPhoneNumber, internationalPhoneNumber, regularOpeningHours, location, photos, googleMapsUri, businessStatus, id. The 'places.' prefix is optional and will be added automatically. Use '*' for all fields (not recommended for performance/cost). Common aliases are supported: 'name'->displayName, 'address'->formattedAddress, 'url'/'website'->websiteUri, 'type'->types, 'phone'->nationalPhoneNumber. Invalid field names (e.g., places.phoneNumber instead of places.nationalPhoneNumber) cause errors. Many fields (rating, websiteUri, regularOpeningHours, nationalPhoneNumber) may be absent even when requested — handle nulls. |
| `textQuery` | string | Yes | Text query for searching places. Matched against place name, address, and category. Underspecified queries (missing city, region, or business type) yield empty or irrelevant results. Brand-name-only queries return multiple franchise branches — validate formattedAddress against the intended location. |
| `maxResultCount` | integer | No | Maximum number of place results to return (must be 1-20). Note: Google prefers `pageSize`, but this action uses `maxResultCount`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Tiles Session

**Slug:** `GOOGLE_MAPS_TILES_CREATE_SESSION`

Tool to create a session token required for accessing 2D Tiles and Street View imagery. Use when you need to initialize tile-based map rendering or street view display. The session token is valid for approximately two weeks and must be included in all subsequent tile requests. Each call consumes quota — cache and reuse the returned token across all tile requests within its validity window rather than creating a new session per request.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `scale` | string ("scaleFactor1x" | "scaleFactor2x" | "scaleFactor4x") | No | Label scaling factor for high-resolution displays. Valid values: 'scaleFactor1x' (standard), 'scaleFactor2x' (2x resolution), or 'scaleFactor4x' (4x resolution). |
| `region` | string | Yes | Two-letter CLDR region code representing the user's location (e.g., 'US', 'GB', 'FR'). This helps Google Maps provide region-specific content. |
| `styles` | array | No | JSON style objects for customizing map appearance (roadmap only). Allows custom styling of map features like roads, buildings, and landmarks. |
| `highDpi` | boolean | No | Enable high-resolution tiles for high DPI displays. Works only with 2x or 4x scale factors. Set to true for sharper images on high-resolution screens. |
| `mapType` | string ("roadmap" | "satellite" | "terrain" | "streetview") | Yes | Base map type. Valid values: 'roadmap' for standard road map, 'satellite' for satellite imagery, 'terrain' for terrain maps, or 'streetview' for street view imagery. |
| `overlay` | boolean | No | Render map layers separately (true) or combined into a single image (false). Set to true if you want individual overlay layers. |
| `language` | string | Yes | IETF language tag specifying the display language for map labels and information (e.g., 'en-US', 'es-ES', 'fr-FR'). |
| `layerTypes` | array | No | Overlay options for the map. Valid values: 'layerRoadmap' (road overlay), 'layerStreetview' (street view overlay), 'layerTraffic' (traffic layer). Note: terrain mapType requires layerRoadmap. |
| `imageFormat` | string ("jpeg" | "png") | No | Output format for tile images. Valid values: 'jpeg' or 'png'. If omitted, the format will be auto-selected by the API. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
