Distance.to
Search…
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
1
[
2
{
3
"t": "Berlin"
4
},
5
{
6
"t": "Hamburg"
7
}
8
];
Copied!
You should JSON.stringify the waypoints array before adding as query params.

Waypoint

1
{
2
"t": "Berlin", // required
3
"c": "DEU" // optional
4
}
Copied!

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
Last modified 2yr ago