Traffic - Get Traffic Incident
The Traffic Incident API provides traffic incidents like construction, traffic
congestion and accidents, etc. within a bounding box. It also provides traffic
metadata for detailed information about each incident.
The API provides a GeoJSON feature collection of traffic incidents. Each
incident includes two point features: the location where you encounter the
incident and the end location of a traffic incident like the end of a
construction zone. For traffic incident coverage by country/region, see
traffic
coverage.
GET {endpoint}/traffic/incident?api-version=2025-01-01&bbox={bbox}
GET {endpoint}/traffic/incident?api-version=2025-01-01&incidentType={incidentType}&bbox={bbox}
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
endpoint
|
path | True |
string |
|
|
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
|
bbox
|
query | True |
number[] |
Defines a rectangular area of interest on the Earth's surface. The sides of the rectangle are specified by longitude and latitude values and must adhere to the GeoJSON format: [minLon, minLat, maxLon, maxLat]. For more information, see RFC 7946, Section 5.
|
|
incident
|
query |
Specifies the type of traffic incident to be returned. Multiple incident types within a single request are supported. If not specified, the results will include all incident types within the provided bounding box. Example, '&incidentType=Accident' or '&incidentType=Accident,Construction'. |
Request Header
| Name | Required | Type | Description |
|---|---|---|---|
| x-ms-client-id |
string |
Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. For more information on using Microsoft Entra ID security in Azure Maps, see Manage authentication in Azure Maps. |
|
| Accept-Language |
string |
Language in which traffic incident results should be returned. For more information, see Supported Languages for reference. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
The request has succeeded. |
|
| Other Status Codes |
An unexpected error response. |
Security
AadToken
These are the Microsoft Entra OAuth 2.0 Flows. When paired with Azure role-based access control it can be used to control access to Azure Maps REST APIs. Azure role-based access controls are used to designate access to one or more Azure Maps resource account or sub-resources. Any user, group, or service principal can be granted access via a built-in role or a custom role composed of one or more permissions to Azure Maps REST APIs.\n\nTo implement scenarios, we recommend viewing authentication concepts. In summary, this security definition provides a solution for modeling application(s) via objects capable of access control on specific APIs and scopes.\n\n#### Notes\n* This security definition requires the use of the x-ms-client-id header to indicate which Azure Maps resource the application is requesting access to. This can be acquired from the Maps management API.\n* \nThe Authorization URL is specific to the Azure public cloud instance. Sovereign clouds have unique Authorization URLs and Microsoft Entra ID configurations. \n* \nThe Azure role-based access control is configured from the Azure management plane via Azure portal, PowerShell, CLI, Azure SDKs, or REST APIs.\n* \nUsage of the Azure Maps Web SDK allows for configuration based setup of an application for multiple use cases.\n* For more information on Microsoft identity platform, see Microsoft identity platform overview.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
| Name | Description |
|---|---|
| https://atlas.microsoft.com/.default |
subscription-key
This is a shared key that is provisioned when you Create an Azure Maps account in the Azure portal or using PowerShell, CLI, Azure SDKs, or REST API.\n\n With this key, any application can access all REST API. In other words, this key can be used as a master key in the account that they are issued in.\n\n For publicly exposed applications, our recommendation is to use the confidential client applications approach to access Azure Maps REST APIs so your key can be securely stored.
Type:
apiKey
In:
header
SAS Token
This is a shared access signature token is created from the List SAS operation on the Azure Maps resource through the Azure management plane via Azure portal, PowerShell, CLI, Azure SDKs, or REST APIs.\n\n With this token, any application is authorized to access with Azure role-based access controls and fine-grain control to the expiration, rate, and region(s) of use for the particular token. In other words, the SAS Token can be used to allow applications to control access in a more secured way than the shared key.\n\n For publicly exposed applications, our recommendation is to configure a specific list of allowed origins on the Map account resource to limit rendering abuse and regularly renew the SAS Token.
Type:
apiKey
In:
header
Examples
Request information about a traffic incident
Sample request
GET {endpoint}/traffic/incident?api-version=2025-01-01&bbox=-122.22,47.44,-122.19,47.61
Sample response
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-122.20148,
47.609058
]
},
"id": 125193835200120000,
"properties": {
"description": "Stationary traffic on Bellevue Way SE from SE 3rd St to Bellevue Way NE / Main St.",
"delay": 125,
"endPoint": {
"type": "Point",
"coordinates": [
-122.202707,
47.610156
]
},
"endTime": "2025-05-01T20:50:41.3340000Z",
"incidentType": "Congestion",
"isRoadClosed": false,
"isTrafficJam": true,
"lastModifiedTime": "2025-05-01T18:50:41.3340000Z",
"severity": 1,
"startTime": "2025-05-01T18:47:00.0000000Z",
"title": "Bellevue Way SE"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-122.195563,
47.499877
]
},
"id": 125453508966320000,
"properties": {
"description": "Slow traffic on I-405 N from Sunset Blvd NE exit [5] to exit [7].",
"delay": 141,
"endPoint": {
"type": "Point",
"coordinates": [
-122.196893,
47.531893
]
},
"endTime": "2025-05-01T19:19:00.0000000Z",
"incidentType": "Congestion",
"isRoadClosed": false,
"isTrafficJam": true,
"lastModifiedTime": "2025-05-01T18:50:41.3340000Z",
"severity": 1,
"startTime": "2025-05-01T18:47:00.0000000Z",
"title": "I-405 N"
}
}
]
}
Definitions
| Name | Description |
|---|---|
|
Error |
The resource management error additional info. |
|
Error |
The error detail. |
|
Error |
Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). |
|
Features |
Specifies the |
|
Feature |
Specifies the |
|
Geo |
Specifies the |
|
Geo |
A valid |
|
Incident |
Specifies the type of traffic incident. This can be used to request and differentiate between various types of incidents. |
|
Traffic |
Specifies detailed information about the traffic incidents. |
|
Traffic |
GeoJSON feature object that contains Geometry object and additional properties of traffic incidents. |
|
Traffic |
A GeoJSON feature collection object that contains a list of traffic incidents features. |
ErrorAdditionalInfo
The resource management error additional info.
| Name | Type | Description |
|---|---|---|
| info |
object |
The additional info. |
| type |
string |
The additional info type. |
ErrorDetail
The error detail.
| Name | Type | Description |
|---|---|---|
| additionalInfo |
The error additional info. |
|
| code |
string |
The error code. |
| details |
The error details. |
|
| message |
string |
The error message. |
| target |
string |
The error target. |
ErrorResponse
Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).
| Name | Type | Description |
|---|---|---|
| error |
The error object. |
FeaturesItemTypeEnum
Specifies the GeoJSON type. The only supported object type is Feature. For
more information, see RFC 7946.
| Value | Description |
|---|---|
| Feature |
Specifies the |
FeatureTypeEnum
Specifies the GeoJSON type. The only supported object type is
FeatureCollection. For more information, see RFC
7946.
| Value | Description |
|---|---|
| FeatureCollection |
Specifies the |
GeoJsonObjectType
Specifies the GeoJSON type. Must be one of the nine valid GeoJSON object
types - Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon,
GeometryCollection, Feature and FeatureCollection.
| Value | Description |
|---|---|
| Point |
|
| MultiPoint |
|
| LineString |
|
| MultiLineString |
|
| Polygon |
|
| MultiPolygon |
|
| GeometryCollection |
|
| Feature |
|
| FeatureCollection |
|
GeoJsonPoint
A valid GeoJSON Point geometry type. Please refer to RFC
7946 for details.
| Name | Type | Description |
|---|---|---|
| bbox |
number[] (double) |
Bounding box. Projection used - EPSG:3857. Please refer to RFC 7946 for details. |
| coordinates |
number[] (double) |
A |
| type |
string:
Point |
Specifies the |
IncidentType
Specifies the type of traffic incident. This can be used to request and differentiate between various types of incidents.
| Value | Description |
|---|---|
| Accident |
Accident |
| Congestion |
Congestion |
| DisabledVehicle |
DisabledVehicle |
| Miscellaneous |
Miscellaneous |
| RoadHazard |
RoadHazard |
| Construction |
Construction |
| Weather |
Weather |
TrafficIncidentFeatureProperties
Specifies detailed information about the traffic incidents.
| Name | Type | Description |
|---|---|---|
| delay |
number (double) |
The delay caused by the incident in seconds. If no delay or not applicable, it returns zero. |
| description |
string |
A description of the incident that includes the road name and the event impacting the traffic flow. Examples: • W 95th St between Switzer Rd and Bluejacket Dr - construction • WB Johnson Dr at I-435 - bridge repair |
| endPoint |
|
A GeoJson Point object that specified the end location of a traffic incident such as end of a construction zone. This location is part of the incident properties object and by default, cannot be interpreted by parsers for display on the map. |
| endTime |
string |
The date and time in UTC when the traffic incident will end, formatted as a dateTime value as defined in RFC 3339, section 5.6. |
| incidentType |
Specifies the type of traffic incident. This can be used to request and differentiate between various types of incidents. |
|
| isRoadClosed |
boolean |
A value of |
| isTrafficJam |
boolean |
A value of |
| lastModifiedTime |
string |
The date and time in UTC when the incident information was last updated, formatted as a dateTime value as defined in RFC 3339, section 5.6. |
| severity |
integer (int32) |
Specifies the level of importance of the incident.
|
| startTime |
string |
The date and time in UTC when the incident occurred, formatted as a dateTime value as defined in RFC 3339, section 5.6. |
| title |
string |
Specifies the road names and direction of affected roads. |
TrafficIncidentFeaturesItem
GeoJSON feature object that contains Geometry object and additional properties of traffic incidents.
| Name | Type | Description |
|---|---|---|
| geometry |
A valid |
|
| id |
integer (int64) |
A unique ID for the incident. |
| properties |
Specifies detailed information about the traffic incidents. |
|
| type |
Specifies the |
TrafficIncidentResponse
A GeoJSON feature collection object that contains a list of traffic incidents features.
| Name | Type | Description |
|---|---|---|
| features |
|
|
| type |
Specifies the |