# Distance Matrix API

## Introduction

NextBillion.ai’s Distance Matrix API is a powerful tool for computing distances and ETAs between a set of origins and destinations — could be for one-to-many or many-to-many scenarios. The API call returns a matrix of ETAs and distances for each origin and destination pair.

For example, if a set has Origins {A,B} and Destinations {C,D,E} we can get the following matrix of results with distance (meters) and time (seconds) for each.

|  | C | D | E |
| --- | --- | --- | --- |
| A | A -> C | A -> D | A -> E |
| B | B -> C | B -> D | B -> E |

The Distance Matrix API offers the following features for customizing computations:

* **Scalable Computations**: Compute ETAs and distances for 1,000 x 1,000 points, with the ability to increase the limit to 5,000 x 5,000 for high-volume use cases.
* **Real-time and Historical Traffic**: Generate distance and ETA matrices based on both real-time and historical traffic conditions.
* **Customizable Route Preferences**: Choose from preferences for avoiding or excluding routes with tolls, highways, left turns, right turns, service roads. Alternatively, always calculate routes with curbside stops, or prefer routes for specific truck types.
* **Support for multiple travel modes**: Compute routes suitable for various travel modes: walk, bicycle, motorbike, car, and truck.
* **Truck-Specific Features**: Incorporate truck-specific parameters such as weight, size, axle load distribution, hazardous cargo, and emission classification.
* **Optimal Route Selection**: Choose between "fastest" and "shortest" route types to obtain corresponding ETAs and distances.

NextBillion.ai’s Distance Matrix API has 2 versions - Fast and Flexible. Each of them is designed for different types of use cases. Let’s dive-deeper into each of them in the following sections.

## Distance Matrix Flexible API

The **Distance Matrix Flexible API** offers ETAs and distances that account for real-time traffic conditions. It also supports **truck-specific features** such as truck weight, size, hazardous cargo, and emission classification. Users can set a specific departure time to simulate typical traffic conditions and **choose between** the 'fastest' or 'shortest' route type, or routes that always arrive curbside. These features prove highly beneficial in addressing business challenges requiring accuracy, customizations and support for advanced constraints across diverse industries, including NEMT, ride-hailing, logistics, and waste management.

In order to use the Distance Matrix Flexible API service, set the `option` parameter to “flexible”. The Flexible endpoint provides support for both HTTPS GET and POST methods. The parameters, request endpoint and response schema are the same for both methods.

GET

https://api.nextbillion.io/distancematrix/json?option=flexible&key={your_api_key}

> *It is recommended to use HTTPS GET method for requests with fewer than 100 total origins and destinations to avoid URL length errors. For total locations more than 100, please use the HTTP POST method for submitting the requests.*

### Request Parameters

| Name | Required | Format and Usage | Description |
|------|----------|------------------|-------------|
| `origins` | Yes | Type: `string`<br>Format: `latitude_1,longitude_1\|latitude_2,longitude_2\|...`<br>Example: `origins=41.349302,2.136480\|41.389925,2.136258\|41.357961,2.097878` | `origins` are the starting point of your route. Ensure that `origins` are routable land locations. Multiple `origins` should be separated by a pipe symbol (\|). |
| `destinations` | Yes | Type: `string`<br>Format: `latitude_1,longitude_1\| latitude_2,longitude_2\|...`<br>Example: `destinations=41.349302,2.136480\|41.389925,2.136258\|41.357961,2.097878` | `destinations` are the ending coordinates of your route. Ensure that `destinations` are routable land locations. Multiple `destinations` should be separated by a pipe symbol (\|) |
| `key` | Yes | Type: `string`<br>Format: 32 character alphanumeric string <br>Example: `key=API_KEY` | A key is a unique identifier that is required to authenticate a request to the API. |
| `mode` | No | Type: `string`<br>Default: `car`<br>Allowed values: `car`, `truck`, `motorcycle`, `bike`, `walk`<br>Example: `mode=car` | Set which driving mode the service should use to determine the `distance` and `duration` values. For example, if you use `car`, the API will return the duration and distance of a route that a car can take. Using `truck` will return the same for a route a truck can use, taking into account appropriate truck routing restrictions. When using `truck` mode, default dimensions are assumed (height: 214 cm, width: 183 cm, length: 519 cm, weight: 5000 kg) unless overridden by `truck_size` and `truck_weight`.<br> \[**Note:** Only the `car` profile is enabled by default. Please note that other profiles might not be available for all regions. Please contact your [NextBillion.ai](https://nextbillion.ai) account manager, sales representative or reach out at [support@nextbillion.ai](mailto:support@nextbillion.ai) in case you need additional profiles\] |
| `avoid` | No | Type: `string`<br>Default: `ferry`<br>Format: `value_1\|value_2\|...`; for `bbox`, use `bbox:min_latitude,min_longitude,max_latitude,max_longitude`<br>Allowed values: `toll`, `ferry`, `highway`, `service_road`, `uturn`, `sharp_turn`, `left_turn`, `right_turn`, `bbox`, `geofence_id`, `tunnel`, `none`<br>Example: `avoid=toll\|highway\|bbox:34.0635,-118.2547,34.0679,-118.2478\|geofence_id:d887f0fa-fd4b-478e-a585-23835a5acd78` | Set this parameter to find alternative routes that bypass specified objects. Use a pipe (`\|`) to separate multiple values. This is a flexible filter; if no alternative routes exist, the service will still provide a route that includes the objects. For a strict filter, consider using the `exclude` parameter.<br>**Note:**<br>*   Following objects are exceptions to the flexible filtering behavior of `avoid` parameter: `bbox` , `tunnel` and `geofence_id` . When used, the service will return a 4xx error in case there are no alternative routes available.<br>*   When using `avoid=bbox` users also need to specify the boundaries of the bounding box to be avoided. Multiple bounding boxes can be specified simultaneously. The perimeter of a bounding box can not exceed 500 kms.<br>    *   **Format:** bbox: min\_latitude,min\_longtitude,max\_latitude,max\_longitude.<br>    *   **Example:** avoid=bbox: 34.0635,-118.2547, 34.0679,-118.2478 \| bbox: 34.0478,-118.2437, 34.0521,-118.2342<br>*   When using `avoid=sharp_turn`, default range of permissible turn angles is \[120,240\] in the clockwise direction from the current road. In order to override default range, please use `turn_angle_range` parameter.<br>*   When using `avoid=geofence_id` , only the the geofences created using NextBillion.ai [Geofence API](https://docs.nextbillion.ai/docs/tracking/api/geofence) are valid.<br>*   When this parameter is not provided in the input, `ferry` routes are set to be avoided by default. When this parameter is provided, only the mentioned object(s) are avoided.<br>*   If `none` is provided along with other values, an error is returned as a valid route is not feasible. |
| `exclude` | No | Type: `string`<br>Default: `none`<br>Format: `value_1\|value_2\|...`<br>Allowed values: `toll`, `ferry`, `highway`, `service_road`, `uturn`, `sharp_turn`, `left_turn`, `right_turn`, `none`<br>Example: `exclude= highway\|toll\|uturn` | This parameter serves as a mandatory filter, ensuring the service returns only those routes that strictly avoid the object(s) indicated. Multiple values should be separated by a pipe (`\|`). If no routes can be found that exclude the specified object(s), the service will return a 4xx error. For a less strict filtering approach, consider using the `avoid` parameter.<br>**Note:**<br>*   When using `exclude=sharp_turn`, default range of permissible turn angles is \[120,240\] in the clockwise direction from the current road. In order to override default range, please use `turn_angle_range` parameter.<br>*   If `none` is provided along with other values, an error is returned as a valid route is not feasible. |
| `allow` | No | Type: `string`<br>Allowed values: `taxi`<br>Example: `allow=taxi` | Use this parameter to let the API use taxi-specific lanes/roads for calculating distances and ETAs. When not specified, the taxi specific lanes will not be used for calculations. It is effective only when `mode=car`. |
| `approaches` | No | Type: `string`<br>Default: `unrestricted`<br>Format: `approaches_1;approaches_2;...`<br>Allowed values: `unrestricted`, `curb`<br>Example: `approaches=unrestricted;curb;;unrestricted` | A semicolon-separated list indicating the side of the road from which the route will approach `destinations`. When set to `unrestricted` a route can arrive at a destination from either side of the road. When set to `curb` the route will arrive at a destination on the driving side of the region.<br> Please note the number of values provided must be equal to the number of `destinations`. However, you can skip a coordinate and show its position in the list with the `;` separator.<br> The values provided for the `approaches` parameter are effective for the `destinations` value at the same index. Example: `curb;;curb` will apply curbside restriction on the `destinations` points provided at the first and third index. |
| `option` | Yes | Type: `string`<br>Allowed values: `flexible`<br>Example: `option=flexible` | Use this option to switch to truck-specific routing or time based routing or if you want to choose between the fastest and shortest route types. |
| `departure_time` | No | Type: `integer`<br>Example: `departure_time=1563254734` | Use this parameter to set a departure time for your trip using a UNIX timestamp in seconds precision. The response will return a route based on typical traffic conditions at the given time. If no input is provided for this parameter then the traffic conditions at the time of making the request are considered. |
| `honor_restrictions` | No | Type: `boolean`<br>Default: `false` | Controls the API's behavior when any of `origins` or `destinations` fall within a restricted area:<br> * `false` **(Default)**: The API ignores active restrictions and calculates the ETA and distance for the potentially feasible route.<br> * `true`: The API enforces restrictions. If an origin-destination (OxD) pair is unreachable due to restrictions, the API returns 0 for that specific pair, while successfully calculating results for all other feasible pairs in the matrix. |
| `truck_size` | No | Type: `string`<br>Format: `height,width,length`<br>Example: `truck_size=200,210,600` | This defines the dimensions of a truck in centimeters (cm). This parameter is effective only when the `mode`=`truck`. Maximum dimensions are as follows: Height = 1000 cm Width = 5000 cm Length = 5000 cm |
| `truck_weight` | No | Type: `integer`<br>Example: `truck_weight=11770` | This parameter defines the weight of the truck including trailers and shipped goods in kilograms (kg). This parameter is effective only when `mode`=`truck`. |
| `route_type` | No | Type: `string`<br>Default: `fastest`<br>Allowed values: `fastest`, `shortest`<br>Example: `route_type=fastest` | Set the route type that needs to be returned. |
| `cross_border` | No | Type: `boolean`<br>Default: `false` | Specify if crossing an international border is expected for operations near border areas. When set to `false` (default value), the API will prohibit routes crossing the borders. When set to `true`, the service will return routes which cross the borders between countries, if required for the given set `destination` and `waypoints`.<br> In case this feature is not available in your region, please get in touch with [support@nextbillion.ai](mailto:support@nextbillion.ai) to enquire/enable it. |
| `truck_axle_load` | No | Type: `number`<br>Default: `0`<br>Example: `5.6` | Specify the total load per axle (including the weight of trailers and shipped goods) of the truck, in tonnes. When used, the service will return routes which are legally allowed to carry the load specified per axle.<br> Please note this parameter is effective only when `mode=truck`. |
| `hazmat_type` | No | Type: `string`<br>Allowed values: `explosives`, `gas`, `flammable_liquid`, `flammable_gas`, `organic`, `toxic`, `radioactive`, `corrosive`, `other`<br>Example: `hazmat_type=explosives \| corrosive` | Specify the type of hazardous material being carried and the service will avoid roads which are not suitable for the type of goods specified. Multiple values can be separated using a pipe operator `\|`.<br> Please note that this parameter is effective only when `mode=truck`. |
| `turn_angle_range` | No | Type: `integer` | Specify the turn angles that can be taken safely by the vehicle. The permissible turn angles are calculated as \[0 + turn\_angle\_range, 360 - turn\_angle\_range\]. Please note that this parameter is effective only when `avoid = sharp_turn`.<br> It is worth highlighting here that providing smaller angles might lead to 4xx errors as route engine might not be able find routes satisfying the smaller turn angle criteria for all turns in the route. |
| `route_failed_prompt` | No | Type: `boolean`<br>Default: `false` | A prompt to modify the response in case no feasible route is available for a given pair of origin and destination. When set to `true` a value of "-1" is returned for those pairs in which:<br> * either origin or the destination can not be snapped to a nearest road. Please note that if all the origins and destinations in a request can't be snapped to their nearest roads, a 4xx error is returned instead, as the entire request failed.<br>  * both origin and destination can be snapped to the nearest road but the service can't find a valid route between them.<br> However, a value of "0" is returned if both the origin and destination are snapped to the same location.<br> `false` is the default value. In this case, a "0" value is returned for all the above cases. A 4xx error is returned, in this case as well, when all origins and destinations in the request can't be snapped to their nearest road. |
| `bearings` | No | Type: `string`<br>Default: `none`<br>Format: `degree0,range0;degree1,range1;...`<br>Example: `bearings=0,180;0,180` | Limits the search to segments with given bearing in degrees towards true north in clockwise direction. Each `bearing` should be in the format of `degree,range`, where the `degree` should be a value between \[0, 360\] and `range` should be a value between \[0, 180\].<br> Please note that the number of `bearings` should be equal to the sum of the number of points in `origins` and `destinations`. If a route can approach a destination from any direction, the bearing for that point can be specified as "0,180". |
| `emission_class` | No | Type: `string`<br>Allowed values: `euro0`, `euro1`, `euro2`, `euro3`, `euro4`, `euro5`, `euro6`, `euro7`, `euro8`, `euro9`<br>Example: `emission_class=euro2 \| euro3` | Specify the emission class to which the vehicle (engine) belongs to. The service will use this setting to generate routes that are permissible for that engine class. Only the emission classifications in the EU regions are supported currently. Please reach out to [support@nextbillion.ai](mailto:support@nextbillion.ai) to enable for your region. |
| `prefer` | No | Type: `string`<br>Allowed values: `truck_route` | This configuration prioritizes truck-friendly roads when calculating routes, aiming to maximize their inclusion in the final route. It is effective only when `option=flexible` and `mode=truck`. Please note that the `truck_type` setting is ineffective without this parameter. |
| `truck_type` | No | Type: `string`<br>Allowed values: `rigid_truck`, `semi_trailer`, `b_double`, `road_train`, `generic_truck`<br>Example: `truck_type = rigid_truck\|semi_trailer` | Define the truck type. This information is used for determining permissible roads and generating an appropriate route for the given truck type. It is effective only when `prefer=truck_route`, `option=flexible` and `mode=truck`. Multiple values can be provided using a pipe separator `\|`. |

### POST Request

The parameters and their properties for the POST method of Distance Matrix Flexible API are the same as listed in the [Request Parameter](#request-parameters) section. The `key` and `option` are passed as Query Parameters and the rest of the parameters should be included in the Request Body.

POST

https://api.nextbillion.io/distancematrix/json?option=flexible&key={your_api_key}

### Response Schema

| Field | Type | Description |
|-------|------|-------------|
| `status` | string | A string indicating the state of the response. On normal responses, the value will be `Ok`. Indicative HTTP error codes are returned for different errors. See the [API Errors Codes](#api-error-codes) section below for more information. |
| `msg` | string | Displays the error message in case of a failed request or operation. Please note that this parameter is not returned in the response in case of a successful request. |
| `rows` | array of object | Container object for a response with an array of arrays structure. |
| `rows[].elements` | array of object | An array of objects. Each `elements` array corresponds to a single `origins` coordinate and contains objects with `distance` and `duration` values for each of the `destinations`. The details in the first `elements` array correspond to the first `origins` point and the first object corresponds to the first `destinations` point and so on. |
| `rows[].elements[].duration` | number | Duration of the trip from an origin to a destination, in seconds. |
| `rows[].elements[].distance` | number | Distance of the route from an origin to a destination, in meters. |

## Distance Matrix Fast API

The Distance Matrix Fast API is designed for **high-volume** calculations, prioritizing **low latency** and rapid responses. The Fast version takes into account the **usual traffic conditions** at the time of making the request to calculate the ETAs and distances. It supports **common routing capabilities** like - support for car and truck modes, avoid tolls & highways and curbside stop routing - essential for typical applications.

> *We recommend using the [Distance Matrix Flexible API](distance-matrix-flexible-api) for custom business requirements or if support for advanced routing constraints is critical.*

GET

https://api.nextbillion.io/distancematrix/json?key={your_api_key}

> *It is recommended to use HTTPS GET method for requests with fewer than 100 total origins and destinations to avoid URL length errors.*

### Request Parameters

| Name | Required | Format and Usage | Description |
|------|----------|------------------|-------------|
| `key` | Yes | Type: `string`<br>Format: `32 character alphanumeric string`<br>Example: `key=API_KEY` | A key is a unique identifier that is required to authenticate a request to the API. |
| `origins` | Yes | Type: `string`<br>Format: `latitude_1,longitude_1\|latitude_2,longitude_2\|...`<br>Example: `origins:41.349302,2.136480\|41.389925,2.136258\|41.357961,2.097878` | `origins` are the starting point of your route. Ensure that `origins` are routable land locations. Multiple `origins` should be separated by a pipe symbol (\|). |
| `destinations` | Yes | Type: `string`<br>Format: `latitude_1, longitue_1\|latitude_2, longitude_2\|...`<br>Example: `destinations=41.349302,2.136480\|41.389925,2.136258\|41.357961,2.097878` | `destinations` are the ending coordinates of your route. Ensure that `destinations` are routable land locations. Multiple `destinations` should be separated by a pipe symbol (\|). |
| `mode` | No | Type: `string`<br>Default: `car`<br>Allowed values: `car`, `truck`<br>Example: `mode=car` | Set which driving mode the service should use to determine the `distance` and `duration` values.<br> For example, if you use `car`, the API will return the duration and distance of a route that a car can take. Using `truck` will return the same for a route a truck can use, taking into account appropriate truck routing restrictions.<br> When `mode=truck`, the default truck dimensions applied are listed [here](https://docs.nextbillion.ai/routing/distance-matrix-api/synchronous#default-truck-dimensions-for-fast-api). Please use the [Distance Matrix Flexible](https://docs.nextbillion.ai/routing/distance-matrix-api/synchronous#distance-matrix-flexible-api) version if you want to use custom truck dimensions.<br> \[**Note:** Only the `car` profile is enabled by default. Please note that customized profiles (including `truck`) might not be available for all regions. Please contact your [NextBillion.ai](https://nextbillion.ai) account manager, sales representative or reach out at [support@nextbillion.ai](mailto:support@nextbillion.ai) in case you need additional profiles\] |
| `avoid` | No | Type: `string`<br>Default: `ferry`<br>Format: `value_1\|value_2\|...`<br>Allowed values: `toll`, `ferry`, `highway`, `none`<br>Example: `avoid=highway\|toll` | Setting this will ensure the route avoids ferries, tolls, highways or nothing. Multiple values should be separated by a pipe (\|). If `none` is provided along with other values, an error is returned as a valid route is not feasible.<br> Please note that when this parameter is not provided in the input, ferries are set to be avoided by default. When this parameter is provided, only the mentioned objects are avoided. |
| `bearings` | No | Type: `string`<br>Format: `degree_0,range_0;degree_1,range_1;...`<br>Example: `bearings=0,180;0,180` | Limits the search to segments with given bearing in degrees towards true north in clockwise direction. Each `bearing` should be in the format of `degree,range`, where the `degree` should be a value between \[0, 360\] and `range` should be a value between \[0, 180\].<br> Please note that the number of `bearings` should be equal to the sum of the number of points in `origins` and `destinations`. If a route can approach a destination from any direction, the bearing for that point can be specified as "0,180". |
| `approaches` | No | Type: `string`<br>Default: `unrestricted`<br>Format: `approaches_1;approaches_2;....`<br>Allowed values: `unrestricted`, `curb`<br>Example: `approaches=unrestricted;;curb` | A semicolon-separated list indicating the side of the road from which the route will approach `destinations`.<br> When set to `unrestricted` a route can arrive at a destination from either side of the road. When set to `curb` the route will arrive at a destination on the driving side of the region.<br> Please note the number of values provided must be equal to the number of `destinations`.However, you can skip a coordinate and show its position in the list with the `;` separator.<br> The values provided for the `approaches` parameter are effective for the `destinations` value at the same index. Example: `curb;;curb` will apply curbside restriction on the `destinations` points provided at the first and third index. |
| `route_failed_prompt` | No | Type: `boolean`<br>Default: `false` | A prompt to modify the response in case no feasible route is available for a given pair of origin and destination. When set to `true` a value of "-1" is returned for those pairs in which:<br>  * either origin or the destination can not be snapped to a nearest road. Please note that if all the origins and destinations in a request can't be snapped to their nearest roads, a 4xx error is returned instead, as the entire request failed.<br>  * both origin and destination can be snapped to the nearest road but the service can't find a valid route between them.<br> However, a value of "0" is returned if both the origin and destination are snapped to the same location.<br> `false` is the default value. In this case, a "0" value is returned for all the above cases. A 4xx error is returned, in this case as well, when all origins and destinations in the request can't be snapped to their nearest road. |

### POST Request

The parameters and their properties for the POST method of Distance Matrix Fast service are the same as listed in the [Request Parameter](#request-parameters-1) section. The `key` is passed as query parameters and the rest of the parameters should be included in the Request Body.

POST

https://api.nextbillion.io/distancematrix/json?key={your_api_key}

### Response Schema

| Field | Type | Description |
|-------|------|-------------|
| `status` | string | A string indicating the state of the response. On normal responses, the value will be `Ok`. Indicative HTTP error codes are returned for different errors. See the [API Errors Codes](#api-error-codes) section below for more information. |
| `msg` | string | Displays the error message in case of a failed request or operation. Please note that this parameter is not returned in the response in case of a successful request. |
| `rows` | array of object | Container object for a response with an array of arrays structure. |
| `rows[].elements` | array of object | An array of objects. Each `elements` array corresponds to a single `origins` coordinate and contains objects with `distance` and `duration` values for each of the `destinations`. The details in the first `elements` array correspond to the first `origins` point and the first object corresponds to the first `destinations` point and so on. |
| `rows[].elements[].duration` | number | Duration of the trip from an origin to a destination, in seconds. |
| `rows[].elements[].distance` | number | Distance of the route from an origin to a destination, in meters. |

### Default Truck Dimensions for Fast API

Following are the default truck dimensions used by the service to determine routes when mode=truck is used with Distance Matrix Fast API endpoint:

| Dimension/Region | Height | Width | Length | Weight | Axles | Max Weight per Axle |
| --- | --- | --- | --- | --- | --- | --- |
| North & South Americas | 13 feet, 6 inches | 96 inches | 48 feet | 80,000 pounds | 5 | 34,000 pounds |
| Europe | 4 meters | 2.5 meters | 16.5 meters | 40 tonnes | 5 | 11.5 tonnes |
| Rest of World | 2.14 meters | 1.83 meters | 5.19 meters | 5000 kg | 2 | 2.5 tonnes |

## API Query Limits

* For the Distance Matrix Fast version, NextBillion.ai allows a default limit of up to 1000x1000 Origin x Destination set. We can support up to a maximum size of 5000x5000 matrix. For higher limits please check with your NextBillion.ai account manager, sales representative or reach out at [support@nextbillion.ai](mailto:support@nextbillion.ai)
* For the Distance Matrix Flexible version, NextBillion.ai allows a default limit of up to

  1. 50x50 Origin x Destination set i.e. 2500 elements
  2. Total straight line distance of 8000km between all the points in a request.

  For higher limits please check with your NextBillion.ai account manager, sales representative or reach out at [support@nextbillion.ai](mailto:support@nextbillion.ai)
* It is not recommended to provide more than a total of 100 locations across `origins` and `destinations` inputs when using the HTTP GET method, lest the maximum URL length restrictions will cause the request to return an error. In case of huge matrix sizes, using the HTTP POST method is recommended.
* Maximum dimensions allowed for `truck_size` are 5000 cm for length, 5000 cm for width, 1000 cm for height.
* Maximum weight allowed for `truck_weight` (including the trailer and shipped goods) is 100,000 kg
* When using `avoid=bbox`, the maximum perimeter allowed for the bounding box is 500 kilometers.
* NextBillion.ai allows a maximum rate limit of 6000 queries per minute or 100 queries/second for continuous requests.
  *Note*: We can increase the quota if needed, on request. Contact [support@nextbillion.ai](mailto:support@nextbillion.ai) for more details.

## API Error Codes

| Response Code | Description | Additional Notes |
| --- | --- | --- |
| 200 | Normal success case. | Normal success case. |
| 400 | Input validation failed. | There is a missing or an invalid parameter or a parameter with an invalid value type is added to the request. |
| 401 | APIKEY not supplied or invalid. | This error occurs when the wrong API key is passed in the request or the key is missing altogether |
| 403 | APIKEY is valid but does not have access to requested resources. | You might be querying for a geographical region which is not valid for your account, or requesting a service which is not enabled for you. |
| 404 | Requested host/path not found. | This error occurs when a malformed hostname is used. |
| 413 | Request entity too large | This error is caused when the length of input request URI or the request body is too large. Please modify the request. Reach out to [support@nextbillion.ai](mailto:support@nextbillion.ai) if the issue still persists. |
| 422 | Could not process the request. | Unroutable coordinates provided in the request, please check API response for more details. |
| 429 | Too many requests. | QPM limit or distance matrix size quota reached. |
| 500 | Internal Service error. | There was an internal issue with NextBillion.ai services. You can reach out to [support@nextbillion.ai](mailto:support@nextbillion.ai) for an explanation. |
