Example overview
This section provides the main usage scenarios and examples of requests to the Routing API. For detailed information about request parameters, see the API Reference.
Mandatory parameters for route building:
-
Your API key (
key). -
At least two route points:
- For public transport: coordinates of the starting (
source) and ending (target) route points. - For other transportation types: coordinates and types of points in the
pointsarray.
- For public transport: coordinates of the starting (
-
Only for public transport: transport type (
transport).
If only mandatory parameters are specified, routes with the following properties are built (if possible, multiple route options are built):
-
For public transport:
- The shortest by time
- With the current local time of departure
- Considering the public transport schedule
-
For other transportation types:
- Route by car
- The shortest by time
- Considering traffic jams and road closures relevant at the time of the request
You can modify these parameters or add additional ones. Request examples are provided using cURL.