The route object defines a route with all its waypoints and has a minimum of two waypoints and a maximum of 75waypoints.
Waypoint
A waypoint describes each step of a route and is defined as its required name field and an optional country field to specify its specific location.
The name field can contain any textual information about the location like postal address, city or region, postal code, IATA code, what3words or a coordinate in the format latitude,longitude. If using coordinate or what3words you do not need to specify the country. Learn more about input and geocoding.
Response
A Distance API response consists of 3 main parts. route contains summarized info about route between all waypoints. points array contains additional information about the waypoints of the requested route. steps array describes distance, duration and travel information for the ways between each waypoints.
Route
The route object contains summarized information about the route between all waypoints. This object is available in responses from all endpoints returning route information.
You'll get a HTTP status code 200 with waypoint information even if there could no car routing distance found. status flag indicates a car route was found or not found. If one of the waypoints could not be found and geocoded a 404 is returned. Learn more about response statuses.
{
"route": [{
"name": "Berlin", // Required: Any input text or lat,lng
"country": "DEU" // Optional: ISO 3166-1 alpha-3 country code
},{
"name": "Hamburg", // Required: Any input text or lat,lng
"country": "DEU" // Optional: ISO 3166-1 alpha-3 country code
},{
"name": "52.5162,13.37795"
},{
...
}]
}
{
"name": "Berlin", // Required: Any input text or lat,lng
"country": "DEU" // Optional: ISO 3166-1 alpha-3 country code
}
{
"route": { ... }, // Contains summarized info about route between all waypoints
"points": [...], // Contains geocoding & geographical information of waypoints
"steps": [...] // Contains routing information of each step of a route
}
{
"route": {
"vincenty": 709.63, // airline distance in Kilometer
"haversine": 708.6068727785872, // airline distance in Kilometer
"greatCircle": 708.6068950233187, // airline distance in Kilometer
}
}
{
"route": {
"car": {
"distance": 812.1059, // car routing distance in Kilometer
"duration": 39012.7, // car routing duration in Seconds
"status": "found" // Status weather a round was "found" or "not found"
}
}
}