Routes from A to B.
Find the way between two or more places on foot, by bike or by car. Each route comes with its distance, travel time, climbs and turn-by-turn directions, ready to show on your map.
More than a line on the map.
The API works out the way along real streets, paths and trails, and returns everything a traveller needs to know about it:
Directions and street names
Every turn as a short instruction with the street name, in the language of your choice.
Several stops on the way
Add as many stops as you need. The route visits them in the order you give, here four lakeside towns in one drive.
Climbs along the way
Each route says how many metres go up and down, so a bike ride up to Igls shows its 358 m of climbing before you set off.
On foot, by bike or by car.
The route from the top of the page, live. Drag A or B, or switch how you travel, and the route follows the right network.
Walking: streets, footpaths and mountain trails
Cycling: follows cycle routes by default
Driving: cars and vans on the road network
Send the stops, get the route.
Send the stops and the way of travel. You get back the line, distance, time, climbs and directions. The Map Matching API answers in the same format.
const url = new URL("https://routing.maptoolkit.net/route");
url.searchParams.append("point", "47.8128,13.0456");
url.searchParams.append("point", "47.7626,13.0607");
url.searchParams.append("routeType", "bike");
url.searchParams.append("api_key", "YOUR_API_KEY");
const route = (await (await fetch(url)).json()).paths[0];
The result is the dark blue route in the hero: 8.1 km, 30 min.
Two or more stops
Add the stops in the order they should be visited (point).
Many stops via POST
Long lists of stops go in the request body instead of the web address.
JSON, GPX or KML
Get the route as JSON for your map, or as a GPX or KML file to download (format).
Directions in your language
Choose the language of the directions and add voice text if you need it (language, voice_instructions).
Any map library
Draw the line with MapLibre, Leaflet or any other library. The docs have working examples.
API key in the web address
Add your key to every request (api_key).
Where routes are used.
Wherever people plan how to get somewhere. Three common examples:
Tour portals
Hikes and bike tours with their length and climbs, and a GPX file to take along.
Mobile apps
Turn-by-turn directions for walking, cycling and driving inside your own app.
Property portals
How long the trip to work or school takes from each home, by bike, by car and on foot.
Routes in these examples are Routing API results.
Questions about routing.
Short answers on route formats, bike routes and billing.
Can I get the route as GeoJSON?
Yes. By default the route comes back as an encoded line, which keeps the response small. Add points_encoded=false and you get a GeoJSON line instead, which MapLibre and Leaflet can draw directly. Keep in mind that GeoJSON lists longitude first, while the points you send to the API are latitude first.
Can cyclists choose between the fastest, the shortest and the most bike-friendly route?
Yes. By default, bike routes follow recommended cycle routes. You can switch to the fastest or the shortest route instead, depending on what your users care about. Every route reports how many meters go up and down, so you can also compare the options by effort.
How are routing requests counted and billed?
Every route counts as one request toward the monthly quota of your plan; there is no per-second limit. On the free Basic plan, requests stop once the quota is used up. On Pro and Ultra, requests beyond the allowance are billed. Enterprise plans have no request limit.
See your use case on a Maptoolkit map.
In the demo, one of our engineers walks you through the platform, your data and the move from your current provider.

