Request
Learn more about the request parameter
get
https://distanceto.p.mashape.com
/get
Get distance
Authentication is made via the X-RapidAPI-Key. You can find more information about api keys and authentication in the RapidAPI docs.
The route array contains multiple objects of waypoints
[
{
"t": "Berlin"
},
{
"t": "Hamburg"
}
];
You should
JSON.stringify
the waypoints array before adding as query params.{
"t": "Berlin", // required
"c": "DEU" // optional
}
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)
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".
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 4yr ago