Please be advised that the following documentation pertains only to our self-service plans, namely Basic, Pro, and Ultra, which are accessible via RapidAPI. If you are an Enterprise customer, we offer dedicated documentation with extended code examples, which can be found in our developer backend.
✕
Maptoolkit provides a powerful routing API
Every request have to be signed by an API key. For a detailed explanation click here.
To do a normal routing request from A to B call:
https://maptoolkit.p.rapidapi.com/route
To do a map-matching request. E.g. match a route with the OSM street network and get a queuesheet for it, call:
https://maptoolkit.p.rapidapi.com/match
Name | Description |
---|---|
language | Language of the instructions in ISO 639-1 codes (two letter). |
routeType | The vehicle for which the route should be calculated. Use car, bike or foot |
weighting | Special weighting of the routing. This is only available for the routeType bike and available options are networks (default), shortest and fastest. |
point | Specify multiple points for which the route should be calculated. The order is important. Specify at least two points. You can define as much points as you like. This is especially useful when doing a map-maptching request. HINT! use a POST request for this. |
gpx | Only available for map-matching. Specify a GPX file URL for which the route should be calculated. |
voice_instructions | This enables voice instructions for text to speech engines. The instructions attribute is extended with this instructions. 0=disabled, 1=enabled. |
finish_instruction | Set to 1 if you need a finish-instruction (with sign 4) in the instruction-list. default=0. |
format | Specifies the resulting format of the route: json, the content type will be application/json. if a callback parameter is given the content type is application/javascript. gpx, the content type will be applicaton/x-gpx. kml, the content type will be applicaton/vnd.google-earth.kml+xml. |
callback | jsonp callback function name |
filename | define a filename if the format parameter is gpx or kml |
https://maptoolkit.p.rapidapi.com/route?point=48.202596,16.369801&point=48.208373,16.370401&routeType=car&voice_instructions=1&language=de&rapidapi-key=your-api-key
Name | Description |
---|---|
info.took | How many ms the request took on the server, of course without network latency taken into account. |
paths | An array of possible paths |
paths[0].distance | The overall distance of the route, in meter |
paths[0].time | The overall time of the route, in ms |
paths[0].points | The polyline encoded coordinates of the path. Order is lat,lon,elelevation |
paths[0].bbox | The bounding box of the route, format: minLon, minLat, maxLon, maxLat |
paths[0].instructions | Contains information about the instructions for this route. The last instruction is always the Finish instruction and takes 0ms and 0meter. |
paths[0].instructions[0].text | A description what the user has to do in order to follow the route. The language depends on the locale parameter. |
paths[0].instructions[0].coordinate | The first coordinate of the interval |
paths[0].instructions[0].distance | The distance for this instruction, in meter |
paths[0].instructions[0].time | The duration for this instruction, in ms |
paths[0].instructions[0].interval | An array containing the first and the last index (relative to paths[0].points) of the points for this instruction. This is useful to know for which part of the route the instructions are valid. |
paths[0].instructions[0].sign | A number which specifies the sign to show e.g. for right turn etc: TURN_SHARP_LEFT = -3 TURN_LEFT = -2 TURN_SLIGHT_LEFT = -1 CONTINUE_ON_STREET = 0 TURN_SLIGHT_RIGHT = 1 TURN_RIGHT = 2 TURN_SHARP_RIGHT = 3 FINISH = 4 VIA_REACHED = 5 USE_ROUNDABOUT = 6 |
paths[0].instructions[0..n].voice_instructions | [optional] Only available if the request parameter voice_instructions is defined. Contains information about the voice instructions for this route. |
paths[0].instructions[0..n].voice_instructions.coordinate | The coordinate for the voice instruction |
paths[0].instructions[0..n].voice_instructions.text | A description what the user has to do in order to follow the route. The language depends on the locale parameter. |
paths[0].tags | An object containing some addition tags for this instruction. |
paths[0].tags.highway | contains the highway-information for this instruction. The following values are available: - motorway - primary - road for all secondary or tertiery streets - street for every other street-type - pedestrian - cycleway - path - hiking for paths that are tagged especially for hiking - mountain_hiking for hiking paths in the mountains - other for all other |
paths[0].tags.surface | contains the surface-information for this instructions: asphalt, paved, unpaved, natural, alpine or other |
{
"info":{
"took":16
},
"paths":[
{
"distance":757.343,
"weight":757.342901,
"points_encoded":true,
"points":"cqeeHkf|bByD_BOCSv@M~@YnBUZSFk@GoAaA{CkCGOKOWSoAg@KC[bAGH]nAGZy@m@aCsAgBu@",
"bbox":[
16.368987,
48.202589,
16.370538,
48.208019
],
"time":109046,
"instructions":[
{
"distance":117.45,
"text":"Geradeaus auf K\u00e4rntner Stra\u00dfe",
"interval":[
0,
2
],
"sign":0,
"time":16911,
"coordinate":[
48.20359,
16.37032
],
"tags:" {
"highway": "road",
"surface": "asphalt"
}
"voice_instructions":[
{
"coordinate":[
48.20258,
16.36982
],
"text":"Geradeaus auf K\u00e4rntner Stra\u00dfe und in 120 Meter links abbiegen auf Philharmonikerstra\u00dfe"
}
]
},
...
]
}
]
To request the available isochrone for a spezific point and radius make a request to our isochrone-API
https://maptoolkit.p.rapidapi.com/isochrone?<params>
Name | Value | Description |
---|---|---|
time | Number | time in seconds |
point | Number,Number | String with the centerpoint in form of <lat>,<lng> |
routeType | String | The vehicle for which the route should be calculated. Use car, bike or foot |
https://maptoolkit.p.rapidapi.com/isochrone?point=50,10&time=10&rapidapi-key=your-api-key
The result is a polygon in form of list of coordinates.
[ [lat, lng], [lat, lng], ... ]