Traffic Incident Tiles API
The Traffic Incident Tiles API offers real-time data on traffic incidents and delays for integration into web and map applications. It delivers comprehensive details, including start and end locations, road names, delay types, delay duration (in time), significance, and distance.
The service responds with traffic incidents data packaged in a vector representation of squared sections called vector tiles. These tiles include a pre-defined collection of road shapes with traffic incidents data. The format of a tile is formally described using the protobuf schema.
The traffic data is mapped to protobuf layers called "Traffic incidents flow" and "Traffic incidents POI". Besides the protobuf layers, the protobuf tags are also used to further describe the traffic. The protobuf tags are split into two categories: default and on-demand.
- The default tags are used unless they are filtered out by the
tags
request parameter. - The on-demand tags are used only if they were added by the
tags
request parameter. - Read more about these tags and valid values here.
Use the following endpoint for retrieving Traffic Vector Incident Tiles:
Path Parameters
Name | Required | Format & Usage | Description |
---|---|---|---|
version_number | Yes | Type: integer Allowed Values: 4 | Specify the version of the API service to be called. The current value is 4. |
z | Yes | Type: integer Minimum Value: 0 Maximum Value: 22 | Zoom level of the tile to be rendered. The values should be in the range of [0,22]. |
x | Yes | Type: integer Maximum Value: 2z-1 | Specify the x-coordinate of the tile or the tile’s column on the zoom grid z . The maximum value should be less than 2z. |
y | Yes | Type: integer Maximum Value: 2z-1 | Specify the y-coordinate of the tile or the tile’s row on the zoom grid z . The maximum value should be less than 2z. |
format | Yes | Type: string Allowed Values: pbf | The format of the response. |
Request Parameters
Sample Request
API Query Limits
- 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 [email protected] 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. |
422 | Could not process the request | A feasible solution could not be generated for the given set of locations or parameter configuration. |
429 | Too many requests | QPM reached or API request count quota reached. |
500 | Internal Service error. | There was an internal issue with NextBillion.ai services. You can reach out to [email protected] for an explanation. |