Navigation | Truck Direction API | Overview | 2GIS Documentation
Truck Direction API

Truck Directions API

The Truck Directions API allows you to build a route for trucks or any other freight transport, excluding streets with current restrictions for such transport.

When creating a route for trucks the Truck Directions API takes into account:

  • dimensions and weight of the vehicle
  • maximum permitted mass on the route
  • restrictions on movement with dangerous and explosive cargoes
  • restrictions by signs “No goods vehicles” and “No vehicles” in combination with plates “Vehicle type”, “Restriction of maximum gross weight” (2.5 tons) and “Direction of action”
  • information about traffic jams based on the real-time or statistical data
  • dirt or toll roads, trying to avoid such roads if this option was chosen when building the route

The list of regions where it is possible to build routes for trucks is gradually supplemented with new cities.


Requests are made using the POST method, all required parameters should be passed in the JSON format. The responses are also generated in the JSON format.

The request takes the coordinates of the route points. You will receive the length of the route and estimated travel time in response. All request and response parameters are listed in the API reference.

This video shows an example of building a route for trucks while taking into account the restrictions on the dimensions of the vehicle.

This video shows an example of building a route for trucks avoiding the streets, where movement of such transport is prohibited.

To retrieve route data used in these video examples make a POST request to https://catalog.api.2gis.com/truck/6.0.0/global?key=YOUR_KEY with Content-Type application/json.

The request takes the following parameters:

  • key=YOUR_KEY — your API key.
{
    "locale": "en",
    "point_a_name": "Source",
    "point_b_name": "Target",
    "points": [
        {
            "type": "pedo",
            "x": 37.604503,
            "y": 55.763114
        },
        {
            "object_id": "4504235282733728",
            "type": "pedo",
            "x": 37.607681,
            "y": 55.766273
        }
    ],
    "type": "truck_jam"
}
[
    {
        "query": {
            "locale": "en",
            "point_a_name": "Source",
            "point_b_name": "Target",
            "points": [],
            "type": "truck_jam"
        },
        "result": [
            {
                "algorithm": "including traffic jams",
                "begin_pedestrian_path": {
                    "geometry": {}
                },
                "end_pedestrian_path": {
                    "geometry": {}
                },
                "requested_filters": "full",
                "filter_road_types": [],
                "id": "1805336109018823561",
                "maneuvers": [],
                "route_id": "em9.n3/carrouting/1588235082.031",
                "total_distance": 15153,
                "total_duration": 2204,
                "type": "carrouting",
                "ui_total_distance": {
                    "unit": "km",
                    "value": "15"
                },
                "ui_total_duration": "36 min",
                "waypoints": [
                    {
                        "original_point": {
                            "lat": 54.94365877886301,
                            "lon": 82.93066878237848
                        },
                        "projected_point": {
                            "lat": 54.94365877886301,
                            "lon": 82.93066878237848
                        },
                        "transit": false
                    },
                    {
                        "original_point": {
                            "lat": 55.03387872014941,
                            "lon": 82.9446599530971
                        },
                        "projected_point": {
                            "lat": 55.03387872014941,
                            "lon": 82.9446599530971
                        },
                        "transit": false
                    }
                ]
            }
        ],
        "type": "string"
    }
]

  1. Fill in the application form to get your key.
  2. Learn about the request and response formats.