When the top-level status code is other than OK
, this field contains more detailed information
about the reasons behind the given status code.
contains an array with details about the geocoding of origin, destination and waypoints.
These details will not be present for waypoints specified as textual latitude/longitude values if the service returns no results.
This is because such waypoints are only reverse geocoded to obtain their representative address after a route has been found.
An empty JSON object will occupy the corresponding places in the geocoded_waypoints
array.
Optional
html_may contain a set of attributions about this listing which must be displayed to the user (some listings may not have attribution).
Optional
next_contains a token that can be used to return up to 20 additional results.
A next_page_token
will not be returned if there are no additional results to display.
The maximum number of results that can be returned is 60.
There is a short delay between when a next_page_token
is issued, and when it will become valid.
contains an array of routes from the origin to the destination.
When the Directions API returns results, it places them within a (JSON) routes
array. Even if the service returns no results
(such as if the origin and/or destination doesn't exist) it still returns an empty routes
array.
(XML responses consist of zero or more <route>
elements.)
Each element of the routes
array contains a single result from the specified origin and destination.
This route may consist of one or more legs
depending on whether any waypoints were specified.
As well, the route also contains copyright and warning information which must be displayed to the user in addition to the
routing information.
contains metadata on the request. See Status Codes below.
contains an array of available travel modes. This field is returned when a request specifies a travel
mode
and gets no results. The array contains the available travel modes in the countries of the given set of waypoints. This field is not returned if one or more of the waypoints arevia:
waypoints.