Calculate a route

A basic route request consists of an origin, departure, and transportMode. The resulting response will contain a list of routes. The list may be empty if no routes were possible.

The origin and destination can be a latitude and longitude pairs and represent the beginning and end of the requested route.

transportMode controls what mode of transport is used for the route. pedestrian, car, truck, bicycle and scooter are currently available.

If the request specifies alternatives, the response may provide additional routes.

If the request specifies return with summary or travelSummary, then the sections will provide additional summary information such as length and duration.

A route will include one or more sections.

In case that no route is possible, an empty list of routes and a notice will be returned.

curl -X GET \
  'https://router.hereapi.com/v8/routes?transportMode=car&origin=52.5308,13.3847&destination=52.5323,13.3789&return=summary&apikey={YOUR_API_KEY}'
{
  "routes": [
    {
      "id": "bfaed7d0-19c7-4e72-81b7-24eeb148b62b",
      "sections": [
        {
          "arrival": {
            "place": {
              "location": {
                "lat": 52.53232637420297,
                "lng": 13.378873988986016
              },
              "type": "place"
            },
            "time": "2019-12-09T16:05:05+01:00"
          },
          "departure": {
            "place": {
              "location": {
                "lat": 52.53098367713392,
                "lng": 13.384566977620125
              },
              "type": "place"
            },
            "time": "2019-12-09T16:03:02+01:00"
          },
          "id": "85357f8f-00ad-447e-a510-d8c02e0b264f",
          "summary": {
            "duration": 123,
            "length": 538
          },
          "transport": {
            "mode": "car"
          },
          "type": "vehicle"
        }
      ]
    }
  ]
}

For more information and examples of route calculation with intermediate waypoints, see Route via intermediate waypoint. For more information and examples of specifying information for a route calculation, see:

For more information and examples of route calculation with specified timing, see these sections:

results matching ""

    No results matching ""