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, foot or transit. The transit routeType is currently only available in NRW in Germany. If you need other regions, get in contact with us. |
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 |
departure | A data-string readable by the Javascript Date object. This parameter has only an effect for the transit routeType. |
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 |
paths[0].tags.mode | In case of transit this field contains the transport-mode. E.g. foot, bus, train ... |
paths[0].tags.from | In case of transit this field contains the name of the start point of the current leg. |
paths[0].tags.to | In case of transit this field contains the name of the end point of the current leg. |
paths[0].tags.line | In case of transit this field contains the line of the means of transport. |
paths[0].tags.color | In case of transit this field contains the color (if available) of the means of transport. |
paths[0].tags.departure | In case of transit this field contains the depature time. |
paths[0].tags.arrival | In case of transit this field contains the arrival time. |
paths[0].tags.destinationDisplay | In case of transit this field contains the shield-name of the means of transport. |
{
"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. The isochrone for the transit routeType is only available for the Region of NRW in Germany. If you need other regions, please get in contact with us.
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, foot or transit |
departure | String | A data-string readable by the Javascript Date object. This parameter has only an effect for the transit routeType. |
format | String | To get an GeoJSON geometry object instead of an array of [lat, lng]-object set this parameter to geojson. For transit isochrones this parameter is necessary because of the complexity of the isochrones. |
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], ... ]
Calculate a matrix of travel times between N origins and M destinations.
This includes the common cases of routes from one origin to many destinations, or from many origins to one destination.
Be aware that the Matrix-API is currently only available in the Germany state of NRW. Get in touch for other regions.
https://routing.maptoolkit.net/matrix?<params>
Name | Value | Description |
---|---|---|
departure | Date | Data in the format of ISO 8601. This parameter has only an effent on transit routing. |
from | Number,Number | Coordinate for a from-point in the format of <lat>,<lng>. Define multipe parameters for multiple origins. |
to | Number,Number | Coordinate for a to-point in the format of <lat>,<lng>. Define multipe parameters for multiple destinations. |
routeType | String | The vehicle for which the route should be calculated. Use car, bike, foot or transit |
https://routing.maptoolkit.net/matrix?routeType=car&from=51.2194,6.7941&from=50.7323,7.0960&to=50.9420,6.9581&to=50.7681,6.0926&depature=2025-04-05T023:16:00.833Z&rapidapi-key=your-api-key
Returns a matrix object for times and distances for the specified points in the order [[from1->to1, from1->to2, ...], [from2->to1, from2->to2, ...], ...]. The times are in seconds, the distances in meter. The matrix contains null values for connections that could not be found. Also the distances matrix is not available for the transit profile.
{"distances":[[39594,86415],[30321,94823]],"times":[[1765,3391],[1453,3587]]}