Mandala
Tools

Google Maps

Geocoding, directions, places, and distance calculations

Usage Instructions

Integrate Google Maps Platform APIs into your workflow. Supports geocoding addresses to coordinates, reverse geocoding, getting directions between locations, calculating distance matrices, searching for places, retrieving place details, elevation data, and timezone information.

Tools

google_maps_air_quality

Get current air quality data for a location

Input

ParameterTypeRequiredDescription
apiKeystringYesGoogle Maps API key with Air Quality API enabled
latnumberYesLatitude coordinate
lngnumberYesLongitude coordinate
languageCodestringNoLanguage code for the response (e.g., "en", "es")

Output

ParameterTypeDescription
dateTimestringTimestamp of the air quality data
regionCodestringRegion code for the location
indexesarrayArray of air quality indexes
pollutantsarrayArray of pollutant concentrations
healthRecommendationsobjectHealth recommendations for different populations

google_maps_directions

Get directions and route information between two locations

Input

ParameterTypeRequiredDescription
apiKeystringYesGoogle Maps API key
originstringYesStarting location (address or lat,lng)
destinationstringYesDestination location (address or lat,lng)
modestringNoTravel mode: driving, walking, bicycling, or transit
avoidstringNoFeatures to avoid: tolls, highways, or ferries
waypointsjsonNoArray of intermediate waypoints
unitsstringNoUnit system: metric or imperial
languagestringNoLanguage code for results (e.g., en, es, fr)

Output

ParameterTypeDescription
routesarrayAll available routes
distanceTextstringTotal distance as human-readable text (e.g., "5.2 km")
distanceMetersnumberTotal distance in meters
durationTextstringTotal duration as human-readable text (e.g., "15 mins")
durationSecondsnumberTotal duration in seconds
startAddressstringResolved starting address
endAddressstringResolved ending address
stepsarrayTurn-by-turn navigation instructions
polylinestringEncoded polyline for the primary route

google_maps_distance_matrix

Calculate travel distance and time between multiple origins and destinations

Input

ParameterTypeRequiredDescription
apiKeystringYesGoogle Maps API key
originstringYesOrigin location (address or lat,lng)
destinationsjsonYesArray of destination locations
modestringNoTravel mode: driving, walking, bicycling, or transit
avoidstringNoFeatures to avoid: tolls, highways, or ferries
unitsstringNoUnit system: metric or imperial
languagestringNoLanguage code for results (e.g., en, es, fr)

Output

ParameterTypeDescription
originAddressesarrayResolved origin addresses
destinationAddressesarrayResolved destination addresses
rowsarrayDistance matrix rows (one per origin)

google_maps_elevation

Get elevation data for a location

Input

ParameterTypeRequiredDescription
apiKeystringYesGoogle Maps API key
latnumberYesLatitude coordinate
lngnumberYesLongitude coordinate

Output

ParameterTypeDescription
elevationnumberElevation in meters above sea level (negative for below)
latnumberLatitude of the elevation sample
lngnumberLongitude of the elevation sample
resolutionnumberMaximum distance between data points (meters) from which elevation was interpolated

google_maps_geocode

Convert an address into geographic coordinates (latitude and longitude)

Input

ParameterTypeRequiredDescription
apiKeystringYesGoogle Maps API key
addressstringYesThe address to geocode
languagestringNoLanguage code for results (e.g., en, es, fr)
regionstringNoRegion bias as a ccTLD code (e.g., us, uk)

Output

ParameterTypeDescription
formattedAddressstringThe formatted address string
latnumberLatitude coordinate
lngnumberLongitude coordinate
locationjsonLocation object with lat and lng
placeIdstringGoogle Place ID for this location
addressComponentsarrayDetailed address components
locationTypestringLocation accuracy type (ROOFTOP, RANGE_INTERPOLATED, etc.)

google_maps_geolocate

Geolocate a device using WiFi access points, cell towers, or IP address

Input

ParameterTypeRequiredDescription
apiKeystringYesGoogle Maps API key with Geolocation API enabled
homeMobileCountryCodenumberNoHome mobile country code (MCC)
homeMobileNetworkCodenumberNoHome mobile network code (MNC)
radioTypestringNoRadio type: lte, gsm, cdma, wcdma, or nr
carrierstringNoCarrier name
considerIpbooleanNoWhether to use IP address for geolocation (default: true)
cellTowersarrayNoArray of cell tower objects with cellId, locationAreaCode, mobileCountryCode, mobileNetworkCode
wifiAccessPointsarrayNoArray of WiFi access point objects with macAddress (required), signalStrength, etc.

Output

ParameterTypeDescription
latnumberLatitude coordinate
lngnumberLongitude coordinate
accuracynumberAccuracy radius in meters

google_maps_place_details

Get detailed information about a specific place

Input

ParameterTypeRequiredDescription
apiKeystringYesGoogle Maps API key
placeIdstringYesGoogle Place ID
fieldsstringNoComma-separated list of fields to return
languagestringNoLanguage code for results (e.g., en, es, fr)

Output

ParameterTypeDescription
placeIdstringGoogle Place ID
namestringPlace name
formattedAddressstringFormatted street address
latnumberLatitude coordinate
lngnumberLongitude coordinate
typesarrayPlace types (e.g., restaurant, cafe)
ratingnumberAverage rating (1.0 to 5.0)
userRatingsTotalnumberTotal number of user ratings
priceLevelnumberPrice level (0=Free, 1=Inexpensive, 2=Moderate, 3=Expensive, 4=Very Expensive)
websitestringPlace website URL
phoneNumberstringLocal formatted phone number
internationalPhoneNumberstringInternational formatted phone number
openNowbooleanWhether the place is currently open
weekdayTextarrayOpening hours formatted by day of week
reviewsarrayUser reviews (up to 5 most relevant)
photosarrayPlace photos
urlstringGoogle Maps URL for the place
utcOffsetnumberUTC offset in minutes
vicinitystringSimplified address (neighborhood/street)
businessStatusstringBusiness status (OPERATIONAL, CLOSED_TEMPORARILY, CLOSED_PERMANENTLY)

google_maps_places_nearby

Search for places of a given type within a radius of a location

Input

ParameterTypeRequiredDescription
apiKeystringYesGoogle Maps API key
latnumberYesLatitude of the center point to search around
lngnumberYesLongitude of the center point to search around
radiusnumberYesSearch radius in meters (up to 50000)
includedTypesarrayNoPlace types to include in the results (e.g., restaurant, cafe)
maxResultCountnumberNoMaximum number of results to return (1-20, defaults to 20)
rankPreferencestringNoHow to rank results: POPULARITY (default) or DISTANCE
languageCodestringNoLanguage code for the response (e.g., en, es)
regionCodestringNoRegion bias as a ccTLD code (e.g., us, uk)

Output

ParameterTypeDescription
placesarrayList of places found near the given location

Search for places using a text query

Input

ParameterTypeRequiredDescription
apiKeystringYesGoogle Maps API key
querystringYesSearch query (e.g., "restaurants in Times Square")
locationjsonNoLocation to bias results towards ({lat, lng})
radiusnumberNoSearch radius in meters
typestringNoPlace type filter (e.g., restaurant, cafe, hotel)
languagestringNoLanguage code for results (e.g., en, es, fr)
regionstringNoRegion bias as a ccTLD code (e.g., us, uk)
pageTokenstringNoToken from a previous search response to fetch the next page of results. Wait a couple seconds after receiving the token before using it, or the API returns INVALID_REQUEST

Output

ParameterTypeDescription
placesarrayList of places found
nextPageTokenstringToken for fetching the next page of results

google_maps_pollen

Get a daily pollen forecast (grass, tree, weed) for a location

Input

ParameterTypeRequiredDescription
apiKeystringYesGoogle Maps API key with Pollen API enabled
latnumberYesLatitude coordinate
lngnumberYesLongitude coordinate
daysnumberNoNumber of forecast days to return (1-5, defaults to 1)
languageCodestringNoLanguage code for the response (e.g., "en", "es")
plantsDescriptionbooleanNoInclude detailed plant descriptions (defaults to true)

Output

ParameterTypeDescription
regionCodestringRegion code (ISO 3166-1 alpha-2) for the location
dailyInfoarrayDaily pollen forecast entries

google_maps_reverse_geocode

Convert geographic coordinates (latitude and longitude) into a human-readable address

Input

ParameterTypeRequiredDescription
apiKeystringYesGoogle Maps API key
latnumberYesLatitude coordinate
lngnumberYesLongitude coordinate
languagestringNoLanguage code for results (e.g., en, es, fr)

Output

ParameterTypeDescription
formattedAddressstringThe formatted address string
placeIdstringGoogle Place ID for this location
addressComponentsarrayDetailed address components
typesarrayAddress types (e.g., street_address, route)

google_maps_snap_to_roads

Snap GPS coordinates to the nearest road segment

Input

ParameterTypeRequiredDescription
apiKeystringYesGoogle Maps API key with Roads API enabled
pathstringYesPipe-separated list of lat,lng coordinates (e.g., "60.170880,24.942795|60.170879,24.942796")
interpolatebooleanNoWhether to interpolate additional points along the road

Output

ParameterTypeDescription
snappedPointsarrayArray of snapped points on roads
warningMessagestringWarning message if any (e.g., if points could not be snapped)

google_maps_solar

Get solar potential and panel insights for the building nearest a location

Input

ParameterTypeRequiredDescription
apiKeystringYesGoogle Maps API key with Solar API enabled
latnumberYesLatitude coordinate
lngnumberYesLongitude coordinate
requiredQualitystringNoMinimum imagery quality to accept (HIGH, MEDIUM, or BASE)

Output

ParameterTypeDescription
namestringResource name of the building (e.g., "buildings/ChIJ...")
centerobjectCenter coordinate of the building
imageryDateobjectDate the underlying imagery was captured
imageryQualitystringQuality of the imagery used (HIGH, MEDIUM, BASE)
regionCodestringRegion code (ISO 3166-1 alpha-2) for the building
postalCodestringPostal code of the building
administrativeAreastringAdministrative area (e.g., state or province)
solarPotentialobjectSolar potential: max panel count/area, sunshine hours, carbon offset, panel specs, and configs

google_maps_speed_limits

Get speed limits for road segments. Requires either path coordinates or placeIds.

Input

ParameterTypeRequiredDescription
apiKeystringYesGoogle Maps API key with Roads API enabled
pathstringNoPipe-separated list of lat,lng coordinates (required if placeIds not provided)
placeIdsarrayNoArray of Place IDs for road segments (required if path not provided)
unitsstringNoUnits for the returned speed limits: KPH (default) or MPH

Output

ParameterTypeDescription
speedLimitsarrayArray of speed limits for road segments
snappedPointsarrayArray of snapped points corresponding to the speed limits

google_maps_timezone

Get timezone information for a location

Input

ParameterTypeRequiredDescription
apiKeystringYesGoogle Maps API key
latnumberYesLatitude coordinate
lngnumberYesLongitude coordinate
timestampnumberNoUnix timestamp to determine DST offset (defaults to current time)
languagestringNoLanguage code for timezone name (e.g., en, es, fr)

Output

ParameterTypeDescription
timeZoneIdstringIANA timezone ID (e.g., "America/New_York", "Europe/London")
timeZoneNamestringLocalized timezone name (e.g., "Eastern Daylight Time")
rawOffsetnumberUTC offset in seconds (without DST)
dstOffsetnumberDaylight Saving Time offset in seconds (0 if not in DST)
totalOffsetSecondsnumberTotal UTC offset in seconds (rawOffset + dstOffset)
totalOffsetHoursnumberTotal UTC offset in hours (e.g., -5 for EST, -4 for EDT)

google_maps_validate_address

Validate and standardize a postal address

Input

ParameterTypeRequiredDescription
apiKeystringYesGoogle Maps API key with Address Validation API enabled
addressstringYesThe address to validate (as a single string)
regionCodestringNoISO 3166-1 alpha-2 country code (e.g., "US", "CA")
localitystringNoCity or locality name
enableUspsCassbooleanNoEnable USPS CASS validation for US addresses

Output

ParameterTypeDescription
formattedAddressstringThe standardized formatted address
latnumberLatitude coordinate
lngnumberLongitude coordinate
placeIdstringGoogle Place ID for this address
addressCompletebooleanWhether the address is complete and deliverable
hasUnconfirmedComponentsbooleanWhether some address components could not be confirmed
hasInferredComponentsbooleanWhether some components were inferred (not in input)
hasReplacedComponentsbooleanWhether some components were replaced with canonical values
validationGranularitystringGranularity of validation (PREMISE, SUB_PREMISE, ROUTE, etc.)
geocodeGranularitystringGranularity of the geocode result
addressComponentsarrayDetailed address components
missingComponentTypesarrayTypes of address components that are missing
unconfirmedComponentTypesarrayTypes of components that could not be confirmed
unresolvedTokensarrayInput tokens that could not be resolved

Notes

  • Category: tools
  • Type: google_maps
Google Maps