Skip to content
Routing API

Routing API

The Routing API calculates routes between two or more points. It supports car, bike, foot, and public transit, and returns turn-by-turn directions in JSON, GPX, or KML format.

Base URL

https://routing.maptoolkit.net/route

Authentication

Add your API key as ?api_key=YOUR_API_KEY to every request. See Authentication for details.

Parameters

ParameterTypeRequiredDescription
pointlat,lngYes (min. 2)A waypoint. Add this parameter multiple times to define the route. Order matters.
routeTypestringYesVehicle type: car, bike, foot, or transit. Transit is currently available only in NRW, Germany.
languagestringNoLanguage for turn instructions, as an ISO 639-1 code (e.g., en, de).
weightingstringNoBike only. Route optimization: networks (default), shortest, or fastest.
voice_instructions0 or 1NoAdds voice instruction text to each turn. Default: 0.
finish_instruction0 or 1NoAdds a finish instruction at the end of the route. Default: 0.
formatstringNoResponse format: json (default), gpx, or kml.
departuredate stringNoDeparture time for transit routing.
callbackstringNoWraps the response in a JSONP callback function.

Response

GET https://routing.maptoolkit.net/route?point=48.202596,16.369801&point=48.208373,16.370401&routeType=car&language=en&api_key=YOUR_API_KEY

This is a response to the HTTP GET request shown above:

{
  "info": {
    "copyrights": [
      "GraphHopper",
      "OpenStreetMap contributors"
    ],
    "took": 1,
    "road_data_timestamp": "2025-11-17T01:00:01Z"
  },
  "paths": [
    {
      "distance": 769.952,
      "weight": 168.289829,
      "time": 98995,
      "points_encoded": true,
      "bbox": [
        16.36885,
        48.202589,
        16.37053,
        48.20802
      ],
      "points": "eqeeHmf|bByD_BMCIVg@pDO`@Oj@INQ?a@OKMGIIMwAkAOC{@u@UYi@}@QU[SWIIASAG@GBIJQl@IH]nAIZy@m@uAw@k@YgBu@",
      "instructions": [
        {
          "distance": 117.483,
          "sign": 0,
          "interval": [
            0,
            2
          ],
          "text": "Continue onto Kärntner Straße",
          "time": 15105,
          "name": "Kärntner Straße",
          "distance_feet": 385,
          "distance_miles": 0.073000529193,
          "coordinate": [
            48.202589,
            16.369828
          ],
          "pushbike": false,
          "tags": {
            "highway": "street",
            "surface": "asphalt"
          },
          "speed": 27.999920556107252,
          "annotations": []
        },
        ...
      ],
      "ascend": 15.5657958984375,
      "descend": 6.759765625,
      "snapped_waypoints": "mf|bBeqeeHkC}`@",
      "ascend_feet": 51,
      "descend_feet": 22,
      "distance_feet": 2526,
      "distance_miles": 0.47842584419199996
    }
  ]
}

Response Fields

FieldDescription
paths[0].distanceTotal route distance in meters
paths[0].timeTotal route time in milliseconds
paths[0].pointsEncoded polyline of the full route
paths[0].bboxBounding box: [minLon, minLat, maxLon, maxLat]
paths[0].instructions[].textTurn instruction text
paths[0].instructions[].distanceDistance for this step in meters
paths[0].instructions[].timeDuration for this step in milliseconds
paths[0].instructions[].signTurn direction code (see table below)
paths[0].tags.highwayRoad type for this step
paths[0].tags.surfaceSurface type for this step

Turn direction codes (sign)

ValueMeaning
-3Sharp left
-2Left
-1Slight left
0Continue straight
1Slight right
2Right
3Sharp right
4Finish
5Via point reached
6Roundabout

Highway types

motorway, primary, road, street, pedestrian, cycleway, path, hiking, mountain_hiking, other

Surface types

asphalt, paved, unpaved, natural, alpine, other