Google Maps

App · Travel & Places · 2 actions

Get directions between places and look up place details with Google Maps.

Get directions

Get directions between two places. Give a start and end point as an address, a place name, or 'latitude,longitude', and get back the distance, travel time, and turn-by-turn steps for the best route. Choose a travel mode and, for driving, whether to avoid tolls, highways, or ferries.

Inputs

StartorigintextRequired
Where the route starts. An address, a place name, a plus code, or 'latitude,longitude', for example "1600 Amphitheatre Parkway, Mountain View, CA" or "37.4224,-122.0842".
EnddestinationtextRequired
Where the route ends. An address, a place name, a plus code, or 'latitude,longitude'.
Travel modetravel_modetext
How the trip is made.One of: DRIVE (Driving), WALK (Walking), BICYCLE (Bicycling), TWO_WHEELER (Two-wheeler (motorcycle)), TRANSIT (Public transit). Default: DRIVE.
Avoid tollsavoid_tollstrue/false
Avoid toll roads. Applies to Driving and Two-wheeler routes only.Default: false.
Avoid highwaysavoid_highwaystrue/false
Avoid highways. Applies to Driving and Two-wheeler routes only.Default: false.
Avoid ferriesavoid_ferriestrue/false
Avoid ferries. Applies to Driving and Two-wheeler routes only.Default: false.
Unitsunitstext
Unit system for the distance and duration text in the result.One of: METRIC (Metric (km)), IMPERIAL (Imperial (miles)). Default: METRIC.

Outputs

distance_metersnumber
Total route distance in meters.
distance_texttext
Human-readable distance, for example '15.2 km'.
duration_secondsnumber
Estimated travel time in seconds.
duration_texttext
Human-readable travel time, for example '22 mins'.
foundtrue/false
Whether a route was found.
polylinetext
Encoded polyline for the route geometry.
stepslist
Turn-by-turn steps for the route.
warningslist
Advisory warnings returned for the route.
Example output
{
  "distance_meters": 51234,
  "distance_text": "51.2 km",
  "duration_seconds": 2460,
  "duration_text": "41 mins",
  "found": true,
  "polyline": "ipkcFfichVnP@j@BLoFVwM{E?",
  "steps": [
    {
      "distance": "0.2 km",
      "instruction": "Head north on Amphitheatre Pkwy"
    },
    {
      "distance": "48 km",
      "instruction": "Turn right onto US-101 N"
    }
  ],
  "warnings": []
}

Get place details

Get details about a place from its Google Place ID: name, address, coordinates, phone number, website, rating, opening hours, and more. Get a Place ID from Google's Place ID Finder or from another Maps action that returns one.

Inputs

Place IDplace_idtextRequired
The Google Place ID, for example "ChIJj61dQgK6j4AR4GeTYWZsKWw". The "places/" prefix is optional. Find one with Google's Place ID Finder: https://developers.google.com/maps/documentation/places/web-service/place-id.
Languagelanguage_codetext
Optional. Language for the results as a BCP-47 code, for example "en" or "fr".
Regionregion_codetext
Optional. Region bias as a two-letter CLDR/ISO country code, for example "US" or "GB". Affects address formatting.

Outputs

business_statustext
Business status, for example 'OPERATIONAL'.
editorial_summarytext
A short editorial description of the place.
formatted_addresstext
The full formatted address.
foundtrue/false
Whether the place was found.
google_maps_uritext
Link to the place on Google Maps.
latitudenumber
Latitude of the place.
longitudenumber
Longitude of the place.
nametext
The place's display name.
national_phone_numbertext
National-format phone number.
open_nowtrue/false
Whether the place is open right now.
opening_hourslist
Human-readable opening hours, one line per day.
phone_numbertext
International phone number.
place_idtext
The place's Google Place ID.
price_leveltext
Price level, for example 'PRICE_LEVEL_MODERATE'.
ratingnumber
Average user rating (1.0–5.0).
typeslist
Place type tags, for example 'restaurant'.
user_rating_countnumber
Number of user ratings.
websitetext
The place's website URL.
Example output
{
  "business_status": "OPERATIONAL",
  "editorial_summary": "Google's headquarters in Mountain View, California.",
  "formatted_address": "1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA",
  "found": true,
  "google_maps_uri": "https://maps.google.com/?cid=10281119596374313554",
  "latitude": 37.4224764,
  "longitude": -122.0842499,
  "name": "Googleplex",
  "national_phone_number": "(650) 253-0000",
  "open_now": true,
  "opening_hours": [
    "Monday: 9:00 AM \u2013 5:00 PM",
    "Tuesday: 9:00 AM \u2013 5:00 PM"
  ],
  "phone_number": "+1 650-253-0000",
  "place_id": "ChIJj61dQgK6j4AR4GeTYWZsKWw",
  "price_level": "",
  "rating": 4.6,
  "types": [
    "corporate_office",
    "point_of_interest",
    "establishment"
  ],
  "user_rating_count": 2847,
  "website": "https://about.google/"
}

On this page