google-maps
v1.0.3Geocode addresses, calculate directions, and search places with maps and routing
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
locate_device Locate Device
Determines a device's geographic location based on detected cell towers and WiFi access points. Returns coordinates with an accuracy radius, with optional fallback to IP-based geolocation.
| Parameter | Type | Description |
|---|---|---|
carrier | string | The name of the cellular carrier or network operator. |
cellTowers | array | An array of cell tower objects detected by the device. Each object should contain signal strength and tower identification data. Order does not affect results. |
considerIp | string | Whether to use IP address geolocation as a fallback when cell tower and WiFi signals are unavailable. Defaults to true; set to false to disable IP-based fallback. |
homeMobileCountryCode | integer | The Mobile Country Code (MCC) of the primary cell tower. Used to identify the country of the cellular network. |
homeMobileNetworkCode | integer | The Mobile Network Code (MNC) of the primary cell tower. For GSM and WCDMA networks this is the MNC; for CDMA networks this is the System ID (SID). |
radioType | string | The type of mobile radio technology in use. Supported values are lte, gsm, cdma, and wcdma. Including this value improves location accuracy when available. |
wifiAccessPoints | array | An array of at least two WiFi access point objects detected by the device. Each object should contain BSSID and signal strength data. More access points improve accuracy. |
calculate_directions Calculate Directions
Calculate directions and distances between locations using various transportation modes. Supports multiple routes, waypoints, and real-time traffic data for driving directions.
| Parameter | Type | Description |
|---|---|---|
destination * | string | The destination location as a place ID (prefixed with 'place_id:'), street address, latitude/longitude coordinates, or plus code. Place IDs are recommended for accuracy and performance. |
origin * | string | The starting location as a place ID (prefixed with 'place_id:'), street address, latitude/longitude coordinates, or plus code. Place IDs are recommended for accuracy and performance over addresses or… |
alternatives | boolean | Allow the service to return multiple alternative routes. Only available for requests without intermediate waypoints. Note that providing alternatives may increase response time. |
avoid | string | Specify route features to avoid, such as tolls, highways, ferries, or indoor steps. Multiple restrictions can be combined using the pipe character separator. |
language | string | The language for returned results. Defaults to the Accept-Language header preference. Supports 40+ languages including regional variants like en-GB and pt-BR. |
mode | string | The transportation mode for calculating directions. Choose 'driving' (default), 'walking', 'bicycling', or 'transit'. Transit directions support optional departure/arrival times and transit preference… |
region | string | The region code as a two-character ccTLD to bias results toward a specific country. Defaults to 'en'. Use country-specific codes like 'uk' for United Kingdom or 'au' for Australia. |
traffic_model | string | Traffic prediction model for driving directions with a departure time. Choose 'best_guess' (default) for balanced predictions, 'pessimistic' for longer estimates, or 'optimistic' for shorter estimates… |
transit_mode | string | Preferred transit modes to prioritize in the route calculation. Supports 'bus', 'subway', 'train', 'tram', or 'rail' (combines train, tram, and subway). Multiple modes can be combined using pipe separ… |
transit_routing_preference | string | Transit routing preference to bias results. Choose 'less_walking' to minimize walking distance or 'fewer_transfers' to reduce the number of transit transfers. |
units | string | The unit system for displaying distances in results. Choose 'metric' for kilometers and meters, or 'imperial' for miles and feet. Defaults to the origin country's standard system. |
waypoints | string | Intermediate locations to route through or stop at between origin and destination. Supports up to 25 waypoints using place IDs, addresses, coordinates, or encoded polylines separated by pipes. Use 'vi… |
get_elevation Get Elevation
Retrieve elevation data for specific locations or sample elevation along a path. The API returns elevation values relative to local mean sea level, with interpolated values for locations where exact measurements aren't available.
| Parameter | Type | Description |
|---|---|---|
samples | number | Number of elevation samples to return along a path. Required when querying elevation along a path instead of discrete locations. Specifies how many evenly-distributed points along the path should be s… |
geocode_address Geocode Address
Convert addresses to geographic coordinates (geocoding) or coordinates to human-readable addresses (reverse geocoding). Supports street addresses, plus codes, and place IDs across multiple countries with varying accuracy levels.
| Parameter | Type | Description |
|---|---|---|
address | string | Street address or plus code to geocode. Use standard postal service format for the country (e.g., '24 Sussex Drive Ottawa ON'). Plus codes should be formatted as global codes (4-character area + 6+ ch… |
bounds | array | Bounding box to bias results toward a specific viewport region. Specified as an array of two coordinate pairs [southwest, northeast] in latitude,longitude format. Results are influenced but not strict… |
components | array | Component filters to restrict results by address elements (postal_code, country, route, locality, administrative_area). Use pipe-separated key:value pairs. Country codes should be ISO 3166-1 format. D… |
language | string | Language code for result formatting. Defaults to English. Supports ISO 639-1 language codes with optional region variants (e.g., en-GB, pt-BR). Street addresses are returned in local language when pos… |
location_type | array | Filter results by location precision type using pipe-separated values. Options include ROOFTOP (street address precision), RANGE_INTERPOLATED (approximated between intersections), GEOMETRIC_CENTER (po… |
place_id | string | Unique textual identifier for a place returned from Place Search. Use this to retrieve the address for a known place ID instead of searching by address or coordinates. |
region | string | Region code (ccTLD format) to bias results toward a specific country or region. Uses two-character country code top-level domains (e.g., 'uk' for United Kingdom, 'us' for United States). Influences re… |
result_type | array | Filter results by address type using pipe-separated values. Supported types include street_address, route, intersection, locality, administrative areas (level 1-5), postal_code, country, airport, park… |
get_timezone Get Timezone
Retrieves the time zone information for a specific geographic location, including the time zone name, UTC offset, and daylight savings offset for a given date and time.
| Parameter | Type | Description |
|---|---|---|
location * | string | The geographic coordinates as a comma-separated latitude,longitude pair (e.g., 39.6034810,-119.6822510). Required to identify the location for time zone lookup. |
timestamp * | number | The target date and time as a Unix timestamp (seconds since January 1, 1970 UTC). Used to determine whether daylight savings time applies at the specified location. Historical time zone changes are no… |
language | string | The language for the time zone name and results. Supports 40+ languages including major variants like English, Spanish, Chinese, and others. Defaults to English if not specified or falls back to the A… |
snap_coordinates_to_roads Snap Coordinates to Roads
Snaps GPS coordinates to the most likely road geometry, returning corrected points that align with actual road paths. Optionally interpolates additional points to create a smooth path following road geometry.
| Parameter | Type | Description |
|---|---|---|
path * | array | A sequence of latitude/longitude coordinate pairs representing the GPS path to be snapped. Coordinates are formatted as comma-separated lat/lon values and separated by pipe characters (e.g., lat1,lon1… |
interpolate | boolean | When enabled, generates additional interpolated points along the snapped road geometry to create a smooth, continuous path that follows road curves and geometry. The resulting path will typically cont… |
snap_points_to_roads Snap Points to Roads
Snaps GPS coordinates to the nearest road segments. Accepts up to 100 latitude/longitude points and returns the closest matching road for each point, useful for map matching and route analysis.
| Parameter | Type | Description |
|---|---|---|
points * | array | A list of GPS coordinates to snap to roads, provided as latitude/longitude pairs separated by pipes. Each coordinate pair should be comma-separated (e.g., latitude,longitude|latitude,longitude). Suppo… |
calculate_distance_matrix Calculate Distance Matrix
Calculate travel distances and durations between multiple origin and destination points using various transportation modes. Returns a matrix of distance and time values for each origin-destination pair based on Google Maps routing.
| Parameter | Type | Description |
|---|---|---|
destinations * | array | One or more destination locations where travel ends. Accepts place IDs (prefixed with 'place_id:'), addresses, latitude/longitude coordinates, plus codes, or encoded polylines. Place IDs are preferred… |
origins * | array | One or more starting locations for travel calculation. Accepts place IDs (prefixed with 'place_id:'), addresses, latitude/longitude coordinates, plus codes, or encoded polylines. Multiple origins can… |
avoid | string | Specify route restrictions to avoid. Supports tolls, highways, ferries, and indoor steps. Note that restrictions bias results toward favorable routes but do not guarantee avoidance. |
language | string | Language for result text. Defaults to English. Supports 40+ languages including regional variants. The API returns street addresses in the local language when available, transliterated to the preferre… |
mode | string | Transportation mode for route calculation. Defaults to driving. Walking and bicycling may lack clear pedestrian or bicycle paths and will include warnings. Transit mode supports optional departure/arr… |
region | string | Region bias using two-character country code (ccTLD format). Influences result selection and ordering. Defaults to 'en'. Use country-specific codes like 'uk' for United Kingdom or 'gb' for ISO standar… |
traffic_model | string | Traffic prediction model for driving directions with departure times. 'best_guess' (default) balances historical and live traffic; 'pessimistic' estimates longer times; 'optimistic' estimates shorter… |
transit_mode | string | Preferred transit modes to favor in route calculation. Supports bus, subway, train, tram, and rail (combination of train/tram/subway). Multiple modes can be specified separated by pipe characters. Onl… |
transit_routing_preference | string | Transit route preferences to bias results. Choose 'less_walking' to minimize walking distance or 'fewer_transfers' to reduce transfer count. Only applies to transit mode. |
units | string | Unit system for displaying distance results. Choose between imperial (miles/feet) or metric (kilometers/meters). Note that distance values are always returned in meters regardless of this setting. |
get_place_details Get Place Details
Retrieve comprehensive information about a specific place including address, contact details, opening hours, ratings, and reviews. Use a place ID from a prior search to fetch detailed establishment or location data.
| Parameter | Type | Description |
|---|---|---|
place_id * | string | Unique identifier for the place, obtained from a Place Search request. This ID is required to retrieve the place's detailed information. |
fields | array | Comma-separated list of specific place data fields to return (e.g., formatted_address,name,geometry). Use forward slashes for nested fields (e.g., opening_hours/open_now). Omit to return default field… |
language | string | Language code for returned results (e.g., en, es, fr, ja). Defaults to English. The API will attempt to use the Accept-Language header if not specified. Affects address formatting and review translati… |
region | string | Two-character country/region code (ccTLD format, e.g., us, gb, de) to bias results toward a specific region. Defaults to 'en'. Influences address interpretation and result prioritization. |
reviews_no_translations | boolean | Set to true to return reviews in their original language without translation, or false/omitted to enable translation using the specified or preferred language. |
reviews_sort | string | Sort order for returned reviews: 'most_relevant' (default, language-aware) or 'newest' (chronological). Recommend displaying the sort method to end users. |
sessiontoken | string | Unique session identifier for grouping related autocomplete and details requests for billing optimization. Generate a fresh UUID for each new user session and reuse it across multiple requests within… |
search_place_by_text Search Place by Text
Search for a place using text input such as a name, address, or phone number. Returns matching places with optional detailed information based on requested fields.
| Parameter | Type | Description |
|---|---|---|
input * | string | The search text input, which can be a place name, street address, or phone number. The API returns candidate matches ordered by perceived relevance based on this input. |
inputtype * | string | The type of input being searched: 'textquery' for place names and addresses, or 'phonenumber' for phone numbers in international E.164 format (e.g., +1-555-0123). |
fields | array | Comma-separated list of place data fields to return in the response. Omitting this parameter returns only the place_id. Fields are categorized as Basic (no additional charge), Contact, or Atmosphere (… |
language | string | The language for returned results. Defaults to English. Affects how addresses and place names are displayed, with the API attempting to provide locally-readable transliterations when applicable. Suppo… |
locationbias | string | Optional geographic bias to prefer results in a specific area. Specify 'ipbias' to use IP-based biasing, a circular area using 'circle:radius_meters@latitude,longitude', or a rectangular area using 'r… |
search_nearby_places Search Nearby Places
Search for places within a specified geographic area. Refine results by keywords, place types, or business status to discover relevant locations near a given coordinate.
| Parameter | Type | Description |
|---|---|---|
location * | string | Center point for the search area, specified as latitude and longitude separated by a comma (e.g., 40,-110). |
radius * | number | Search radius in meters around the location. Maximum values vary by search type: up to 50,000 meters for keyword or name searches, dynamically adjusted for searches without keywords or names. When ran… |
keyword | string | Search term for places, such as a business name, address, or category (e.g., 'restaurant', '123 Main Street'). Combining location information in this parameter may conflict with the location and radiu… |
language | string | Language for result content, supporting 40+ languages including regional variants (e.g., 'en', 'es', 'zh-CN'). Defaults to 'en' if not specified. The API uses the Accept-Language header as a fallback… |
opennow | boolean | When enabled, returns only places currently open for business. Places without specified opening hours in the Google Places database will be excluded. |
rankby | string | Determines result ordering: 'prominence' (default) ranks by importance and requires the radius parameter, while 'distance' orders by proximity and requires at least one of keyword, name, or type but d… |
type | string | Restrict results to a single place type (e.g., 'hospital', 'pharmacy'). Only the first type is used if multiple are provided. Combining the same value as both keyword and type may return no results. |
search_places_by_text Search Places by Text
Search for places using a text query string, optionally filtered by location radius, type, and opening status. Returns a ranked list of matching places with basic information.
| Parameter | Type | Description |
|---|---|---|
query * | string | The search query string, such as a place name (e.g., 'pizza'), address (e.g., '123 Main Street'), or category (e.g., 'restaurants'). Results are ranked by perceived relevance to this query. |
radius * | number | Search radius in meters, up to a maximum of 50,000 meters. Results within this circle are preferred, though places outside may still be returned. The API may adjust this radius based on result density… |
language | string | Language code for result content. Defaults to English. Affects how addresses and place names are returned and transliterated. The API uses the Accept-Language header if not specified. |
opennow | boolean | Filter results to only include places currently open for business. Places without specified opening hours in the database will be excluded when this filter is applied. |
region | string | Two-character region code (ccTLD format, e.g., 'us', 'gb', 'uk') to bias results to a specific country or region. Defaults to 'en'. |
type | string | Restrict results to a single place type from the supported types list. If multiple types are provided, only the first is used; others are ignored. |
get_place_photo Get Place Photo
Retrieve a high-quality photo for a place using a photo reference. Returns the image data that can be resized and displayed in your application, with attribution requirements included when necessary.
| Parameter | Type | Description |
|---|---|---|
photo_reference * | string | A unique identifier for the photo, obtained from Place Search, Nearby Search, Text Search, or Place Details requests. This reference is required to retrieve the actual photo image. |
get_query_suggestions Get Query Suggestions
Get autocomplete suggestions for geographic queries as users type. Returns predicted queries based on categorical searches like "pizza near New York", matching both full words and substrings.
| Parameter | Type | Description |
|---|---|---|
input * | string | The search text to get predictions for. The service matches this string against both full words and substrings to return relevant suggestions ordered by perceived relevance. |
radius * | number | The search radius in meters within which to prefer returning results. Maximum of 50,000 meters. Results outside this radius may still be returned. Helps bias suggestions to a geographic area when comb… |
language | string | The language for returned results. Defaults to English. Supports 40+ languages including regional variants (e.g., en-GB, pt-BR). If not specified, the API attempts to use the language from the Accept-… |
offset | number | Optional character position in the input text where matching should stop. Useful for matching against partial input (e.g., matching "Goo" when input is "Google"). Typically set to the text caret posit… |
autocomplete_place Autocomplete Place
Get place predictions as a user types a geographic search query. Returns matching businesses, addresses, and points of interest based on the input text, with optional geographic filtering and biasing.
| Parameter | Type | Description |
|---|---|---|
input * | string | The search text to match against place names, addresses, and plus codes. The service returns predictions ordered by perceived relevance to this input. |
radius * | number | The search radius in meters within which to prefer results. Maximum 50,000 meters for autocomplete. Results outside this radius may still be returned if they match the input. |
components | string | Restrict results to specific countries using ISO 3166-1 Alpha-2 country codes. Separate multiple countries with a pipe character (e.g., country:us|country:ca). Up to 5 countries can be specified. |
language | string | The language for returned results. Defaults to English. Affects how place names and addresses are translated and formatted. See supported languages list for valid codes. |
locationbias | string | Prefer results in a specified area using IP-based biasing, a circular radius, or a rectangular bounding box. Circular format: circle:radius_in_meters@latitude,longitude. Rectangular format: rectangle:… |
locationrestriction | string | Strictly limit results to a specified area using a circular radius or rectangular bounding box. Unlike location bias, results outside this area will not be returned. Circular format: circle:radius_in_… |
offset | number | The character position in the input text where matching should end. Useful for matching against partial words as the user types. If omitted, the entire input term is used for matching. |
origin | string | The starting point for calculating straight-line distance to results. Specify as latitude,longitude in decimal degrees. Distance is returned in the response as distance_meters. |
region | string | The region code as a ccTLD (country code top-level domain) to bias results and interpretation. Defaults to 'en'. Use two-character codes like 'uk' for United Kingdom or 'de' for Germany. |
sessiontoken | string | A unique identifier for this autocomplete session used for billing optimization. Generate a fresh UUID for each new user search session. All requests within a session must use the same API key and pro… |
strictbounds | boolean | When enabled, returns only places strictly within the region defined by location and radius, excluding any matches outside the boundary. |
types | string | Filter results to specific place types. Specify up to 5 types separated by pipe characters (e.g., book_store|cafe), or use a single type collection filter. See supported types documentation for valid… |
get_street_view Get Street View
Retrieve a static Street View image for a specified location or panorama. Returns a static image without interactive elements, useful for embedding Street View imagery in web pages.
| Parameter | Type | Description |
|---|---|---|
size * | string | Specifies the output image dimensions as width by height in pixels. Both dimensions must not exceed 640 pixels; larger values default to 640. Use the format widthxheight (for example, 600x400). |
fov | number | Controls the horizontal zoom level of the image in degrees. Accepts values from 0 to 120, where smaller values provide higher zoom. Defaults to 90 degrees if not specified. |
heading | number | Sets the compass direction the camera faces, using values from 0 to 360 degrees where 0 and 360 represent North, 90 represents East, and 180 represents South. If omitted, the camera automatically orie… |
pano | string | Targets a specific panorama by its unique identifier. Panorama IDs are generally persistent but may change as Street View imagery is updated. |
pitch | number | Adjusts the vertical camera angle relative to the Street View vehicle. Positive values tilt upward (90 degrees points straight up), negative values tilt downward (-90 degrees points straight down). De… |
source | string | Restricts Street View results to specific imagery sources. Use 'default' to search all available sources, or 'outdoor' to exclude indoor collections. Note that outdoor panoramas may not exist for all… |
get_street_view_metadata Get Street View Metadata
Retrieve metadata about a Street View panorama at a specific location or panorama ID, including availability, coordinates, panorama ID, capture date, and copyright information to customize error handling in your application.
| Parameter | Type | Description |
|---|---|---|
heading | number | The compass heading of the camera in degrees, ranging from 0 to 360 where 0 and 360 indicate North, 90 indicates East, and 180 indicates South. If not specified, the heading will be automatically calc… |
pano | string | A specific panorama ID to retrieve metadata for. Panorama IDs are generally stable identifiers, though they may change as Street View imagery is updated. |
pitch | number | The vertical angle of the camera relative to the Street View vehicle, ranging from -90 degrees (straight down) to 90 degrees (straight up), with 0 as the default horizontal position. |
size | string | The output image dimensions specified as width by height in pixels (e.g., 600x400 for a 600-pixel wide by 400-pixel high image). |
source | string | Limits Street View searches to specific sources: use 'default' to search all available sources, or 'outdoor' to search only outdoor collections and exclude indoor panoramas. Note that outdoor panorama… |