Routing API Developer's Guide

Requesting a Route With Alternatives

You can request alternative routes to the one our router considers to be best. Specify the parameter alternatives. Its default value is 0. The response contains a maximum of this amount of alternatives. The router returns only alternatives that are reasonably fast and different from the original route. Because of that, it is not always possible to return the requested amount of alternatives or any at all.

The following example shows request, where 5 alternatives were requested and 2 alternatives were returned (3 routes including the original).
https://route.ls.hereapi.com/routing/7.2/calculateroute.json
?apikey={YOUR_APIKEY}
&waypoint0=geo!52.526922,13.386224
&waypoint1=geo!52.523189,13.403243
&mode=fastest;car;traffic:disabled
&alternatives=5
Note: This example uses a HERE API Key to authenticate your request. For information on other possible options, see https://developer.here.com/documentation/authentication. For examples of how to use the other authentication options with the Routing API, see Authentication Examples.
Figure 1. Example of response with alternatives

You can only use two waypoints when requesting alternatives. Sending more than two results in an error.