Routing API Developer's Guide

Requesting a Route With Alternatives

You can request alternative routes to the one our router considers to be best. This is done by specifying the parameter alternatives. Its default value is 0. The result will contain a maximum of this amount of alternatives. The router returns only alternatives which are reasonably fast and different from original. Because of that, it is not always possible to return the requested amount of alternatives, or it can even happen that none are returned.

The following example shows request, where 5 alternatives were requested and 2 alternatives were returned (3 routes including the original).
Figure 1. Example of response with alternatives.

Only 2 waypoints can be used when requesting alternatives. If more than 2 are sent an error is returned.