Skip to content

Traffic API

GET Traffic Incidents

The Traffic Incidents request returns a structured list of traffic incidents for a specified bounding box in JSON or XML formats, e.g., road construction, traffic collisions.

Resource URL

https://www.mapquestapi.com/traffic/v2/incidents

Resource Information

Response FormatsJSON, XML
AuthenticationYes (Requires Key)
Rate LimitedYes

Request Parameters

Request ParameterDescriptionRequired
keyThe API Key, which is needed to make requests to MapQuest services.yes
boundingBoxThe area in which to search for incidents.

Example:
boundingBox=39.95,-105.25,39.52,-104.71
yes
filtersA list of incident types to return.

Possible values are:
  • incidents
  • construction
  • event
  • congestion
Example:

filters=incidents,congestion
no, defaults to incidents,construction
outFormatSpecifies the format of the response. Must be one of the following, if supplied:
  • json
  • xml
Example: XML response
outFormat=xml
no, defaults to json
callbackA JavaScript function name. The JSON-formatted response will be wrapped in a call to the supplied callback function name to provide JSONP functionality. This functionality might be needed to do cross-site scripting. See the Wikipedia.org entry for JSON for more details.

Example: Callback
callback=incidentsResult
no

Response Object

latLatitude of the incident.
lngLongitude of the incident.
typeIncident type. Values are:
  • 1 = Construction
  • 2 = Event
  • 3 = Congestion/Flow
  • 4 = Incident/accident
severityThe incident severity. Values range from 0-4 with 4 indicating the highest severity.
eventCodeThe incident event code. These are standard Alert-C event codes.
impactingIndicates if the incident is impacting traffic.
startTimeThe start time (ISO 8601 Combined Date and Time format) of the incident.
endTimeThe end time (ISO 8601 Combined Date and Time format) of the incident.
shortDescA short description of the incident.
fullDescA full description of the incident.
iconURLURL for an icon to use for displaying the incident.
distanceOptional (0 if not sent from traffic provider). The length of the road extent (in miles) affected by the incident.
delayFromTypicalOptional (0 if not sent from traffic provider). The delay (minutes) from typical conditions. This is the increase in travel time across the road extent affected by the incident relative to the travel time under average conditions for the given day of the week and time.
delayFromFreeFlowOptional (0 if not sent from traffic provider). The delay (minutes) from typical conditions. This is the increase in travel time across the road extent affected by the incident relative to the travel time under free-flowing conditions.
tmcsOptional. List of Traffic Message Channel ids located at the incident.

Example Request

GET https://www.mapquestapi.com/traffic/v2/incidents?key=KEY&boundingBox=39.95,-105.25,39.52,-104.71&filters=construction,incidents

Example Response

JSON
{
  "incidents": [
    {
      "fullDesc": "One lane closed due to maintenance work on California Street Eastbound between 18th Street and 19th Street.",
      "lng": -104.9886,
      "severity": 2,
      "shortDesc": "California Street E/B : Lane closed between 18th Street and 19th Street ",
      "endTime": "2013-08-02T01:59:00",
      "type": 1,
      "id": "330627538",
      "startTime": "2013-02-04T19:00:00",
      "impacting": true,
      "tmcs": [],
      "eventCode": 0,
      "iconURL": "https://api.mqcdn.com/mqtraffic/const_mod.png",
      "lat": 39.7481
    }
  ],
  "mqURL": "https://www.mapquest.com/maps?traffic=1&latitude=39.73976&longitude=-104.9848",
  "info": {
    "copyright": {
      "text": "2023 MapQuest, Inc.",
      "imageUrl": "https://api.mqcdn.com/res/mqlogo.gif",
      "imageAltText": "2023 MapQuest, Inc."
    },
    "statuscode": 0,
    "messages": []
  }
}
XML
<IncidentsResponse>
    <Incidents>
        <Incident>
            <id>5376488</id>
            <type>4</type>
            <severity>2</severity>
            <eventCode>401</eventCode>
            <lat>39.7505</lat>
            <lng>-105.216789</lng>
            <startTime>2016-12-04T07:30:00</startTime>
            <endTime>2016-12-05T00:31:00</endTime>
            <shortDesc>
                Washington Ave: road closed from 10th St to 18th St
            </shortDesc>
            <fullDesc>
                Road closed on Washington Ave both ways from 10th St to 18th St. Golden Candle Light Walk.
            </fullDesc>
            <delayFromTypical>0.0</delayFromTypical>
            <delayFromFreeFlow>0.18000000715255737</delayFromFreeFlow>
            <distance>1.2</distance>
            <iconURL>https://api.mqcdn.com/mqtraffic/incid_mod.png</iconURL>
        </Incident>
    </Incidents>
    <info>
        <statusCode>0</statusCode>
        <messages/>
        <copyright>
            <imageUrl>https://api.mqcdn.com/res/mqlogo.gif</imageUrl>
            <imageAltText>© 2023 MapQuest, Inc.</imageAltText>
            <text>© 2023 MapQuest, Inc.</text>
        </copyright>
    </info>
</IncidentsResponse>