Overview of Urbi navigation APIs
Use Urbi Navigation APIs to build routes and get information about route length and travel time.
Routing API helps to build routes on the map for different types of transport, such as cars, taxis, bicycles, scooters, motorcycles, and more. You can add intermediate points, build the shortest routes by time or distance, exclude specific areas, and consider traffic, road closures, dedicated lanes, stairways, obstacles, and other parameters.
For each route, you can retrieve its length, travel time, full geometry, information about altitudes (only for some types of transportation) and special points (e.g., the start of a toll road section).
Explore how to build a route with the Routing API:
To build public transport routes, use the Public Transport API. It allows you to get multiple route options in a single request, along with information about transfers, stops, platforms, length of pedestrian segments, and other parameters.
To calculate distances and travel times between multiple points, use the Distance Matrix API. The API allows you to optimize routes (for example, for courier delivery) and solve logistics problems.
Specify points on the map and the transportation type to get data for each pair of points. For example, for 3 starting points and 3 ending points, the API calculates the matrix of distance and travel time for 9 route options. You can calculate a matrix of up to 1000 points: in this case, the asynchronous API mode is used.
Example of using the Distance Matrix API in synchronous mode:
TSP API solves the traveling salesman problem and finds optimal routes to visit multiple points for couriers. If necessary, the API optimizes the route based on time or distance and excludes couriers if the task can be completed with fewer resources. You can specify the transportation type for couriers, time windows for points, courier working hours, courier capacity, and other parameters. The API operates in asynchronous mode.
Try building a route with the TSP API:
Isochrone API builds proximity zones on the map - areas that can be reached from a given point within a specified time or, conversely, from the boundaries to the point. You can create proximity zones for different types of transport.
Example of using the Isochrone API:
Map Matching API allows you to reconstruct a driving route from points recorded by a vehicle. The request returns the full route geometry, including its length and travel time.
Route Planner API helps to build the most efficient route that passes through all roads within a polygon. The API can be used for scenarios where you need to drive along specific streets: for example, to organize the work of cleaning equipment.
Radar API helps to determine the approximate device geolocation when the satellite signal is unavailable, and when other positioning systems are unstable. Radar API determines the location using Wi-Fi access points and cellular towers.
Detailed request examples and parameter references are available in the documentation for each navigation API.
FAQ
How to get started with navigation APIs?
To work with the API, you need to get an access key:
- Sign in to the Platform Manager.
- Create a demo key or purchase a subscription to use the APIs.
- Study the examples of requests and responses in the documentation for the required API.
How is API usage cost calculated?
The cost of using navigation APIs can be calculated by the number of API requests, the number of routes built, or the number of time and distance calculations between pairs of points. For more details on the calculation method, see the Tariffs section on each API page.
Can I use navigation APIs for free?
You can get a demo access key to test navigation APIs for one month.
How to track actual API resource usage?
You can track the progress of limit consumption by services and request distribution statistics in the Platform Manager. For more details, see the Statistics section.
How to manage API resource consumption?
To avoid premature exhaustion of limits, you can restrict the use of API resources by your applications. In the Platform Manager personal account, several ways to configure restrictions are available:
- Set limits on requests to specific services for all API keys in the subscription or for individual keys. Exceeding the limits will block product usage: API requests will return an error.
- Configure notifications to be sent when approaching limits.
For more details, see the Access Key Management section.
How to get traffic information?
Routing API, Distance Matrix API, TSP API, Isochrone API, and Route Planner API support consideration of current or statistical traffic data to most accurately calculate the optimal route and travel time. Traffic information is not provided separately.
How quickly is traffic data updated?
Traffic information (congestion and road closures) is updated in Urbi every few minutes and becomes available in your projects simultaneously with Urbi products.
How to display a route on the map?
- For web applications: install a vector map using MapGL JS API and display the route using the Directions plugin. For more details, see the Route Building section.
- For mobile applications: initialize the Urbi mobile SDK and use tools to create a map and build routes. For more details, see the Navigation section in the SDK documentation for iOS, Android, or Flutter.
How to create a navigator for a built route?
Use the Urbi mobile SDK to create a navigator for a built route. The SDK provides tools for tracking user location, searching for alternative routes on the way, voice prompts, and other navigator functions. For more details, see the Navigation section in the SDK documentation for iOS, Android, or Flutter.
I could not find an answer to my question
Use the documentation search or send an email to api@2gis.ru.