Use Google Maps APIs to look up coordinates and places, calculate routes and travel times, validate addresses, and retrieve location-based environmental data. Each action below documents its required location inputs and returned fields.
Look up coordinates and places, calculate routes and travel times, retrieve place, elevation, and timezone details, validate addresses, and query supported environmental data.
Get current air quality data for a location
Inputs and outputsParameter Type Required Description apiKeystring Yes Google Maps API key with Air Quality API enabled latnumber Yes Latitude coordinate lngnumber Yes Longitude coordinate languageCodestring No Language code for the response (e.g., "en", "es")
Parameter Type Description dateTimestring Timestamp of the air quality data regionCodestring Region code for the location indexesarray Array of air quality indexes ↳ code string Index code (e.g., "uaqi", "usa_epa") ↳ displayName string Display name of the index ↳ aqi number Air quality index value ↳ aqiDisplay string Formatted AQI display string ↳ color object RGB color for the AQI level ↳ category string Category description (e.g., "Good", "Moderate") ↳ dominantPollutant string The dominant pollutant pollutantsarray Array of pollutant concentrations ↳ code string Pollutant code (e.g., "pm25", "o3") ↳ displayName string Display name ↳ fullName string Full pollutant name ↳ concentration object Concentration info ↳ value number Concentration value ↳ units string Units (e.g., "PARTS_PER_BILLION") ↳ additionalInfo object Additional info about sources and effects healthRecommendationsobject Health recommendations for different populations
Get directions and route information between two locations
Inputs and outputsParameter Type Required Description apiKeystring Yes Google Maps API key originstring Yes Starting location (address or lat,lng) destinationstring Yes Destination location (address or lat,lng) modestring No Travel mode: driving, walking, bicycling, or transit avoidstring No Features to avoid: tolls, highways, or ferries waypointsjson No Array of intermediate waypoints unitsstring No Unit system: metric or imperial languagestring No Language code for results (e.g., en, es, fr)
Parameter Type Description routesarray All available routes ↳ summary string Route summary (main road names) ↳ legs array Route legs (segments between waypoints) ↳ overviewPolyline string Encoded polyline for the entire route ↳ warnings array Route warnings ↳ waypointOrder array Optimized waypoint order (if requested) distanceTextstring Total distance as human-readable text (e.g., "5.2 km") distanceMetersnumber Total distance in meters durationTextstring Total duration as human-readable text (e.g., "15 mins") durationSecondsnumber Total duration in seconds startAddressstring Resolved starting address endAddressstring Resolved ending address stepsarray Turn-by-turn navigation instructions ↳ instruction string Navigation instruction (HTML stripped) ↳ distanceText string Step distance as text ↳ distanceMeters number Step distance in meters ↳ durationText string Step duration as text ↳ durationSeconds number Step duration in seconds ↳ startLocation object Step start coordinates ↳ endLocation object Step end coordinates ↳ travelMode string Travel mode for this step ↳ maneuver string Maneuver type (turn-left, etc.) polylinestring Encoded polyline for the primary route
Calculate travel distance and time between multiple origins and destinations
Inputs and outputsParameter Type Required Description apiKeystring Yes Google Maps API key originstring Yes Origin location (address or lat,lng) destinationsjson Yes Array of destination locations modestring No Travel mode: driving, walking, bicycling, or transit avoidstring No Features to avoid: tolls, highways, or ferries unitsstring No Unit system: metric or imperial languagestring No Language code for results (e.g., en, es, fr)
Parameter Type Description originAddressesarray Resolved origin addresses destinationAddressesarray Resolved destination addresses rowsarray Distance matrix rows (one per origin) ↳ elements array Elements (one per destination) ↳ distanceText string Distance as text (e.g., "5.2 km") ↳ distanceMeters number Distance in meters ↳ durationText string Duration as text (e.g., "15 mins") ↳ durationSeconds number Duration in seconds ↳ durationInTrafficText string Duration in traffic as text ↳ durationInTrafficSeconds number Duration in traffic in seconds ↳ status string Element status (OK, NOT_FOUND, ZERO_RESULTS)
Get elevation data for a location
Inputs and outputsParameter Type Required Description apiKeystring Yes Google Maps API key latnumber Yes Latitude coordinate lngnumber Yes Longitude coordinate
Parameter Type Description elevationnumber Elevation in meters above sea level (negative for below) latnumber Latitude of the elevation sample lngnumber Longitude of the elevation sample resolutionnumber Maximum distance between data points (meters) from which elevation was interpolated
Convert an address into geographic coordinates (latitude and longitude)
Inputs and outputsParameter Type Required Description apiKeystring Yes Google Maps API key addressstring Yes The address to geocode languagestring No Language code for results (e.g., en, es, fr) regionstring No Region bias as a ccTLD code (e.g., us, uk)
Parameter Type Description formattedAddressstring The formatted address string latnumber Latitude coordinate lngnumber Longitude coordinate locationjson Location object with lat and lng placeIdstring Google Place ID for this location addressComponentsarray Detailed address components ↳ longName string Full name of the component ↳ shortName string Abbreviated name ↳ types array Component types locationTypestring Location accuracy type (ROOFTOP, RANGE_INTERPOLATED, etc.)
Geolocate a device using WiFi access points, cell towers, or IP address
Inputs and outputsParameter Type Required Description apiKeystring Yes Google Maps API key with Geolocation API enabled homeMobileCountryCodenumber No Home mobile country code (MCC) homeMobileNetworkCodenumber No Home mobile network code (MNC) radioTypestring No Radio type: lte, gsm, cdma, wcdma, or nr carrierstring No Carrier name considerIpboolean No Whether to use IP address for geolocation (default: true) cellTowersarray No Array of cell tower objects with cellId, locationAreaCode, mobileCountryCode, mobileNetworkCode wifiAccessPointsarray No Array of WiFi access point objects with macAddress (required), signalStrength, etc.
Parameter Type Description latnumber Latitude coordinate lngnumber Longitude coordinate accuracynumber Accuracy radius in meters
Get detailed information about a specific place
Inputs and outputsParameter Type Required Description apiKeystring Yes Google Maps API key placeIdstring Yes Google Place ID fieldsstring No Comma-separated list of fields to return languagestring No Language code for results (e.g., en, es, fr)
Parameter Type Description placeIdstring Google Place ID namestring Place name formattedAddressstring Formatted street address latnumber Latitude coordinate lngnumber Longitude coordinate typesarray Place types (e.g., restaurant, cafe) ratingnumber Average rating (1.0 to 5.0) userRatingsTotalnumber Total number of user ratings priceLevelnumber Price level (0=Free, 1=Inexpensive, 2=Moderate, 3=Expensive, 4=Very Expensive) websitestring Place website URL phoneNumberstring Local formatted phone number internationalPhoneNumberstring International formatted phone number openNowboolean Whether the place is currently open weekdayTextarray Opening hours formatted by day of week reviewsarray User reviews (up to 5 most relevant) ↳ authorName string Reviewer name ↳ authorUrl string Reviewer profile URL ↳ profilePhotoUrl string Reviewer photo URL ↳ rating number Rating given (1-5) ↳ text string Review text ↳ time number Review timestamp (Unix epoch) ↳ relativeTimeDescription string Relative time (e.g., "a month ago") photosarray Place photos ↳ photoReference string Photo reference for Place Photos API ↳ height number Photo height in pixels ↳ width number Photo width in pixels ↳ htmlAttributions array Required attributions urlstring Google Maps URL for the place utcOffsetnumber UTC offset in minutes vicinitystring Simplified address (neighborhood/street) businessStatusstring Business status (OPERATIONAL, CLOSED_TEMPORARILY, CLOSED_PERMANENTLY)
Search for places of a given type within a radius of a location
Inputs and outputsParameter Type Required Description apiKeystring Yes Google Maps API key latnumber Yes Latitude of the center point to search around lngnumber Yes Longitude of the center point to search around radiusnumber Yes Search radius in meters (up to 50000) includedTypesarray No Place types to include in the results (e.g., restaurant, cafe) maxResultCountnumber No Maximum number of results to return (1-20, defaults to 20) rankPreferencestring No How to rank results: POPULARITY (default) or DISTANCE languageCodestring No Language code for the response (e.g., en, es) regionCodestring No Region bias as a ccTLD code (e.g., us, uk)
Parameter Type Description placesarray List of places found near the given location ↳ placeId string Google Place resource ID ↳ name string Place name ↳ formattedAddress string Formatted address ↳ lat number Latitude ↳ lng number Longitude ↳ types array Place types ↳ rating number Average rating (1-5) ↳ userRatingsTotal number Number of ratings ↳ priceLevel string Price level (e.g., PRICE_LEVEL_MODERATE) ↳ openNow boolean Whether currently open ↳ businessStatus string Business status
Search for places using a text query
Inputs and outputsParameter Type Required Description apiKeystring Yes Google Maps API key querystring Yes Search query (e.g., "restaurants in Times Square") locationjson No Location to bias results towards ({lat, lng}) radiusnumber No Search radius in meters typestring No Place type filter (e.g., restaurant, cafe, hotel) languagestring No Language code for results (e.g., en, es, fr) regionstring No Region bias as a ccTLD code (e.g., us, uk) pageTokenstring No Token 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
Parameter Type Description placesarray List of places found ↳ placeId string Google Place ID ↳ name string Place name ↳ formattedAddress string Formatted address ↳ lat number Latitude ↳ lng number Longitude ↳ types array Place types ↳ rating number Average rating (1-5) ↳ userRatingsTotal number Number of ratings ↳ priceLevel number Price level (0-4) ↳ openNow boolean Whether currently open ↳ photoReference string Photo reference for Photos API ↳ businessStatus string Business status nextPageTokenstring Token for fetching the next page of results
Get a daily pollen forecast (grass, tree, weed) for a location
Inputs and outputsParameter Type Required Description apiKeystring Yes Google Maps API key with Pollen API enabled latnumber Yes Latitude coordinate lngnumber Yes Longitude coordinate daysnumber No Number of forecast days to return (1-5, defaults to 1) languageCodestring No Language code for the response (e.g., "en", "es") plantsDescriptionboolean No Include detailed plant descriptions (defaults to true)
Parameter Type Description regionCodestring Region code (ISO 3166-1 alpha-2) for the location dailyInfoarray Daily pollen forecast entries ↳ date object Calendar date of the forecast entry ↳ pollenTypeInfo array Pollen type indices (grass, tree, weed) ↳ code string Pollen type code (GRASS, TREE, WEED) ↳ displayName string Display name ↳ inSeason boolean Whether the pollen type is in season ↳ indexInfo object Universal Pollen Index (UPI) info ↳ healthRecommendations array Health recommendations ↳ plantInfo array Per-plant forecast with descriptions ↳ code string Plant code (e.g., BIRCH, RAGWEED) ↳ displayName string Display name ↳ inSeason boolean Whether the plant is in season ↳ indexInfo object Universal Pollen Index (UPI) info ↳ plantDescription object Plant details (type, family, season, cross-reactions)
Convert geographic coordinates (latitude and longitude) into a human-readable address
Inputs and outputsParameter Type Required Description apiKeystring Yes Google Maps API key latnumber Yes Latitude coordinate lngnumber Yes Longitude coordinate languagestring No Language code for results (e.g., en, es, fr)
Parameter Type Description formattedAddressstring The formatted address string placeIdstring Google Place ID for this location addressComponentsarray Detailed address components ↳ longName string Full name of the component ↳ shortName string Abbreviated name ↳ types array Component types typesarray Address types (e.g., street_address, route)
Snap GPS coordinates to the nearest road segment
Inputs and outputsParameter Type Required Description apiKeystring Yes Google Maps API key with Roads API enabled pathstring Yes Pipe-separated list of lat,lng coordinates (e.g., "60.170880,24.942795|60.170879,24.942796") interpolateboolean No Whether to interpolate additional points along the road
Parameter Type Description snappedPointsarray Array of snapped points on roads ↳ location object Snapped location coordinates ↳ lat number Latitude ↳ lng number Longitude ↳ originalIndex number Index in the original path (if not interpolated) ↳ placeId string Place ID for this road segment warningMessagestring Warning message if any (e.g., if points could not be snapped)
Get solar potential and panel insights for the building nearest a location
Inputs and outputsParameter Type Required Description apiKeystring Yes Google Maps API key with Solar API enabled latnumber Yes Latitude coordinate lngnumber Yes Longitude coordinate requiredQualitystring No Minimum imagery quality to accept (HIGH, MEDIUM, or BASE)
Parameter Type Description namestring Resource name of the building (e.g., "buildings/ChIJ...") centerobject Center coordinate of the building ↳ lat number Latitude ↳ lng number Longitude imageryDateobject Date the underlying imagery was captured imageryQualitystring Quality of the imagery used (HIGH, MEDIUM, BASE) regionCodestring Region code (ISO 3166-1 alpha-2) for the building postalCodestring Postal code of the building administrativeAreastring Administrative area (e.g., state or province) solarPotentialobject Solar potential: max panel count/area, sunshine hours, carbon offset, panel specs, and configs
Get speed limits for road segments. Requires either path coordinates or placeIds.
Inputs and outputsParameter Type Required Description apiKeystring Yes Google Maps API key with Roads API enabled pathstring No Pipe-separated list of lat,lng coordinates (required if placeIds not provided) placeIdsarray No Array of Place IDs for road segments (required if path not provided) unitsstring No Units for the returned speed limits: KPH (default) or MPH
Parameter Type Description speedLimitsarray Array of speed limits for road segments ↳ placeId string Place ID for the road segment ↳ speedLimit number Speed limit value ↳ units string Speed limit units (KPH or MPH) snappedPointsarray Array of snapped points corresponding to the speed limits ↳ location object Snapped location coordinates ↳ lat number Latitude ↳ lng number Longitude ↳ originalIndex number Index in the original path ↳ placeId string Place ID for this road segment
Get timezone information for a location
Inputs and outputsParameter Type Required Description apiKeystring Yes Google Maps API key latnumber Yes Latitude coordinate lngnumber Yes Longitude coordinate timestampnumber No Unix timestamp to determine DST offset (defaults to current time) languagestring No Language code for timezone name (e.g., en, es, fr)
Parameter Type Description timeZoneIdstring IANA timezone ID (e.g., "America/New_York", "Europe/London") timeZoneNamestring Localized timezone name (e.g., "Eastern Daylight Time") rawOffsetnumber UTC offset in seconds (without DST) dstOffsetnumber Daylight Saving Time offset in seconds (0 if not in DST) totalOffsetSecondsnumber Total UTC offset in seconds (rawOffset + dstOffset) totalOffsetHoursnumber Total UTC offset in hours (e.g., -5 for EST, -4 for EDT)
Validate and standardize a postal address
Inputs and outputsParameter Type Required Description apiKeystring Yes Google Maps API key with Address Validation API enabled addressstring Yes The address to validate (as a single string) regionCodestring No ISO 3166-1 alpha-2 country code (e.g., "US", "CA") localitystring No City or locality name enableUspsCassboolean No Enable USPS CASS validation for US addresses
Parameter Type Description formattedAddressstring The standardized formatted address latnumber Latitude coordinate lngnumber Longitude coordinate placeIdstring Google Place ID for this address addressCompleteboolean Whether the address is complete and deliverable hasUnconfirmedComponentsboolean Whether some address components could not be confirmed hasInferredComponentsboolean Whether some components were inferred (not in input) hasReplacedComponentsboolean Whether some components were replaced with canonical values validationGranularitystring Granularity of validation (PREMISE, SUB_PREMISE, ROUTE, etc.) geocodeGranularitystring Granularity of the geocode result addressComponentsarray Detailed address components ↳ longName string Full name of the component ↳ shortName string Abbreviated name ↳ types array Component types missingComponentTypesarray Types of address components that are missing unconfirmedComponentTypesarray Types of components that could not be confirmed unresolvedTokensarray Input tokens that could not be resolved