distance/route

Calculate distance (airline, car routing) between points

Car routing and airline distance

post

Calculate airline and car routing distances between multiple points.

Authorizations
X-Billing-TokenstringRequired

Authentication token for billing. Get your token at https://developers.distance.tools.

Query parameters
carbooleanOptional

Get car routing distances

flightbooleanOptional

Get flight distances

equalbooleanOptional

Get equal distances

Body
Responses
200

Valid request and found waypoints

application/json
post
/distance/route

Request Body

The route object defines a route with all its waypoints and has a minimum of two waypoints and a maximum of 75 waypoints.

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.

Airline distance

Learn more about airline distance calculation.

Car routing distance

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.

Last updated