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 https://atlas.microsoft.com/traffic/incident?api-version=2025-01-01&bbox={bbox}
GET https://atlas.microsoft.com/traffic/incident?api-version=2025-01-01&incidentType={incidentType}&bbox={bbox}
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
api-version
|
query | True |
string |
Version number of Azure Maps API. |
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.
bbox=-105,37,-94,45
|
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. To use Azure AD security in Azure Maps see the following articles for guidance. |
|
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 |
OK |
|
Other Status Codes |
An unexpected error occurred. |
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.
To 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.
Notes
- 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.
The Authorization URL
is specific to the Azure public cloud instance. Sovereign clouds have unique Authorization URLs and Microsoft Entra ID configurations.
*
The Azure role-based access control is configured from the Azure management plane via Azure portal, PowerShell, CLI, Azure SDKs, or REST APIs.
*
Usage of the Azure Maps Web SDK allows for configuration based setup of an application for multiple use cases.
- 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 | 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.
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.
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:
query
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.
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.
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 https://atlas.microsoft.com/traffic/incident?api-version=2025-01-01&bbox=-104,37,-103,38
Sample response
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"id": 18558549332008001,
"geometry": {
"type": "Point",
"coordinates": [
-103.5918059115,
38.0005878581
]
},
"properties": {
"startTime": "2025-09-12T09:31:37Z",
"endTime": "2025-09-12T10:21:47Z",
"description": "Accident W US Highway 50.",
"title": "W US Highway 50",
"incidentType": "Accident",
"severity": 4,
"delay": null,
"lastModifiedTime": "2025-09-12T10:21:47Z",
"endPoint": {
"type": "Point",
"coordinates": [
-103.5918059115,
38.0005878581
]
},
"isTrafficJam": false,
"isRoadClosed": false
}
},
{
"type": "Feature",
"id": 21366103288104000,
"geometry": {
"type": "Point",
"coordinates": [
-103.591850168,
37.9995820453
]
},
"properties": {
"startTime": "2025-09-12T09:42:32Z",
"endTime": "2025-09-12T10:21:47Z",
"description": "Accident Rogers Rd",
"title": "Rogers Rd",
"incidentType": "Accident",
"severity": 4,
"delay": 10,
"lastModifiedTime": "2025-09-12T10:21:47Z",
"endPoint": {
"type": "Point",
"coordinates": [
-103.5918059115,
38.0005878581
]
},
"isTrafficJam": true,
"isRoadClosed": false
}
}
]
}
Definitions
Name | Description |
---|---|
Error |
The resource management error additional info. |
Error |
The error detail. |
Error |
Error response |
Features |
Specifies the |
Feature |
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 |
Specifies the traffic incident GeoJSON feature object including the geometry and additional properties. |
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
Error response
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 |
GeoJsonPoint
A valid GeoJSON Point
geometry type. Please refer to RFC 7946 for details.
Name | Type | Description |
---|---|---|
coordinates |
number[] (double) |
A |
type |
string |
Specifies the GeoJSON type as Point. |
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 |
object |
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
Specifies the traffic incident GeoJSON feature object including the geometry and additional properties.
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 |