Bing Maps Get Traffic Incidents API is deprecated and will be retired. Free (Basic) account customers can continue to use Bing Maps Get Traffic Incidents API until June 30th, 2025. Enterprise account customers can continue to use Bing Maps Get Traffic Incidents API until June 30th, 2028. To avoid service disruptions, all implementations using Bing Maps Get Traffic Incidents API will need to be updated to use Azure Maps Get Traffic Incident Detail API by the retirement date that applies to your Bing Maps for Enterprise account type. For detailed migration guidance, see Migrate Bing Maps Get Traffic Incidents API.
Azure Maps is Microsoft's next-generation maps and geospatial services for developers. Azure Maps has many of the same features as Bing Maps for Enterprise, and more. To get started with Azure Maps, create a free Azure subscription and an Azure Maps account. For more information about azure Maps, see Azure Maps Documentation. For migration guidance, see Bing Maps Migration Overview.
Use the following URL template to request traffic incident information. A collection of traffic incidents is returned in the response.
For more information about the traffic incident data that is returned in the response, see Traffic Incident Data. You can also view the example URL and response values in the Examples section below. For an overview of how traffic incident information is returned by Bing Maps REST Services, see Getting Traffic Incident Data.
When an alias is provided, you can use the alias to shorten the length of the query parameter. For example, severity=6,9 can be shortened to s=6,9.
Parameter values are not case-sensitive.
Parameter
Alias
Description
Values
mapArea
Required. Specifies the area to search for traffic incident information.
A rectangular area specified as a bounding box. The height or width of the area bounding box should not exceed 500km. If either the width or height of the bounding box exceeds 500km the request may time out. Note that a maximum limit of 30 degrees for either width or height is enforced, requests with such bounding boxes will fail with HTTP status code 400.
A bounding box defines an area by specifying SouthLatitude, WestLongitude, NorthLatitude, and EastLongitude values. For more information, see Location and Area Types.
Example: 45.219,-122.325,47.610,-122.107
includeLocationCodes
Deprecated. This parameter is ignored.
Specifies whether to include traffic location codes in the response. Traffic location codes provide traffic incident information for pre-defined road segments. A subscription is typically required to be able to interpret these codes for a geographical area or country/region.
One of the following values:
- true - false [default]
If you want to use the default value, you can omit this parameter from the URL request.
severity
s
Optional. Specifies severity level of traffic incidents to return.
Optional. Specifices if the response should include abnormal traffic conditions that result in delays.
One of the following values: - true - false [default]
Response
A collection of TrafficIncident resources is returned when you make a request with the URL above. For more information about the TrafficIncident resource, see Traffic Incident Data. For more information about the common response syntax for the Bing Maps REST Services, see Common Response Description.
These URLs support JSON (application/json) and XML (application/xml) response formats. A JSON response is provided by default, unless you request XML output by setting the output (o) parameter. For more information, see Output Parameters.
JSON and XML responses are provided for the URL examples in the following section.
Examples
Get all traffic incidents in a specified area.
The following example shows how to request all traffic incident for an area defined as a bounding box (South Latitude, West Longitude, North Latitude, East Longitude). For more information about defining a bounding box, see Location and Area Types. Note that the includeLocationCodes parameter is not specified in this example.
This URL returns a response with the following format that includes a list of traffic incidents as traffic incident resources. For more information on the fields returned for a traffic incident resource, see Traffic Incident Data.
This Azure Incident Readiness module focuses on preparedness and proactive measures for managing Azure incidents. It provides guidance on getting notified and staying informed, building secure and resilient applications, understanding the incident process including information relating to our post incident reviews (PIRs), and when to engage support. Additionally, customers with support contracts will receive information on building their Major Incident Response Plan with their Microsoft account team.
This article describes the Traffic Incident Data contained in TrafficIncident resources, returned by a Traffic URL, in a table that describes each field. Both JSON and XML formats are shown.