Distance.to
Search
K

Request

Learn more about the request parameter
get
https://distanceto.p.mashape.com
/get
Get distance

Headers

X-RapidAPI-Key

Authentication is made via the X-RapidAPI-Key. You can find more information about api keys and authentication in the RapidAPI docs.

Query parameter

route

The route array contains multiple objects of waypoints
[
{
"t": "Berlin"
},
{
"t": "Hamburg"
}
];
You should JSON.stringify the waypoints array before adding as query params.

Waypoint

{
"t": "Berlin", // required
"c": "DEU" // optional
}

t: Input data

The waypoints consists of a required "t" property which can include the following information to describe a waypoint:
  • Country, city or region
  • Postal address
  • Postal code (don't forget to set the correct country)
  • Airport code (iata)
  • Coordinate (latitude,longitude)

c: country

You can specify the country with the optional "c" property. Countries are defined with its ISO 3166-1 alpha-2 or alpha-3 codes (DE or DEU for germany).
If "c" is not set the first found result will be used. To use postal codes it is highly recommended to use "c".

car

If you need distances and durations of car routes between the waypoints
If you need distances and durations of foot route between the waypoints