INRIX IQ logo

INRIX Safety Alerts return information about many different type of incidents that happen on roadways that can impact people and businesses in different ways. INRIX classifies the incident types for better filtering, identifies where it is, when it is, and details such as the severity of the impact.

Overview

The main usage scenarios are:

Example Application

The following image is a screen-shot from a sample traffic application that shows incidents. When an incident is selected, details about it are dislayed.

Sample Incidents Application

Description: Retrieves traffic-related incidents in a specified region.

incident-api.inrix.com/v1/incidents

GET Get traffic related incident data in a specified region.

Parameters

  = required
Name Located In Type Description
Authorization Header String A valid bearer access token provided from the GET appToken API response. The token must be added to the request header using the format 'Authorization: Bearer xxxx.xxx.xxxx'.
box Query String “box” specifies two latitude and longitude pairs (using the WGS 84 datum) that outline a bounding box. The first lat/long pair should be the northwestern most point, and the second pair the southeastern most point. Format- [lat1]|[long1],[lat2]|[long2]. Either box or point and radius or ids parameters are required.
point Query String Used to select a region based on a point and radius. If used, other Location parameters cannot be used. Format- [lat]|[long]. Either box or point and radius or ids parameters are required.
radius Query Double Used to select a region based on a point and radius in meters. If used, other Location parameters cannot be used. Either box or point and radius or ids parameters are required. Any features that are fully or partially enclosed within the bounding area are selected. If the Units parameter is set to Metric, the radius is measured in kilometers; if Units is set to US (the default), the radius is measured in miles.
ids Query String One or more incident ids in a comma-delimited list. Either box or point and radius or ids parameters are required.
incidentoutputfields Query String The incident fields to output. Multiple fields can be specified in a comma-delimited list.
Value Description
All This option returns all of the options available including new fields added in the future. If this is requested, the requesting system should be designed in anticipation of new fields being returned in the future.
Core The core fields of an incident including ID, Version, Type, Severity and Status. Returned by default.
AlertCCode The event code of the incident. These are standard Alert-C event codes.
InrixCode The event code of the incident. These are INRIX event codes. Returned by default.
Location Location information for the incident including head, tail and last detour point if available. Returned by default.
Schedule The starting time, ending time and other schedule info related to the incident.
DelayImpact Provide the delay in minutes versus typical conditions and versus free flow conditions.
ParameterizedDescription The description separated into parameters. This can be useful for creating custom descriptions.
RDS The Radio Data System data. See the RDS element for more information.
ShortDescription Short textual description of the incident including language code. Returned by default.
FullDescription Longer textual description of the incident including language code.
TTSDescription The incident is described as if a human were reading the incident.
Additional These are additional fields relevant to the incident and are part of the premium offering.
incidenttype Query String The types of incidents to output. Multiple incident types can be specified in a comma-delimited list. The default is “Incidents,Construction,Events,Flow.”. Note, the first letter of each option can also be used. For example “I,C,E,F” also will work.
Value Description
Incidents This option returns all unusual incidents that may slow down traffic such as a car accident.
Construction This option returns only construction incidents.
Events This option returns unusual events slated for the area such as a major sporting event.
Flow This option returns reports about the slowing down of traffic on your route.
RoadWeather This option returns Road Weather incidents.
severity Query String Filters incident reports based on severity level. This value can be in the range of 0-4, with 4 indicating the highest severity. Multiple severity values can be specified in a comma-delimited list. You can specify all severity values by not including this parameter or by using an empty value.
units Query Integer Use 0 for English units, 1 for metric. Default is 0.
status Query String The status of the incident. Possible values are Active, Cleared, Inactive or All. Default is All.
advancewarning Query Boolean If the incidents returned should be limited to only ones which require advanced warning. Default if no value provided is to return both incidents which have advance working and those which do not. .
Accept Header String Format for the response. Accepts either text/json or text/xml. Default is json.
starttime Query Datetime The incidents for this future time. The default is the current time. All times should be in UTC or have the timezone offset as specified in DateTime Values and be specified using the ISO 8601 format.
minDelayFreeFlowMinutes Query Integer Filters out incidents with a FreeFlowMinutes delay less than the value set.
minFromTypicalFlowMinutes Query Integer Filters out incidents with a FreeFlowMinutes delay less than the value set.
minDelayDistance Query Integer Filters out incidents with a delayDistance value less than the value set.
roadSegmentType Query String The location reference method used for the incidents. Supported values are TMC, XDS (default) or OSM.
locale Query String The language for description text. US English is the default locale. Specifying locale=local will return the default language for this region. For further information, see Incident Locales.

Requests

Example Get Incidents request
Query
https://incident-api.inrix.com/v1/incidents?box=47.67577|-122.207249,47.743362|-122.16227&incidentType=Incidents,Flow,Construction&incidentoutputfields=all

Responses

200 Success
{
    "copyright": "Copyright INRIX Inc. 2021",
    "createdDate": "2021-05-11T16:41:30.1132701Z",
    "responseId": "44a6dda7-47f5-44c1-b4bb-d5cb11bdceef",
    "versionNumber": "v1",
    "result": {
        "incidents": [
            {
                "id": 145690648,
                "version": "1",
                "type": "1",
                "severity": "1",
                "geometry": {
                    "type": "point",
                    "coordinates": [
                        "47.716590",
                        "-122.185660"
                    ]
                },
                "status": "active",
                "messages": {
                    "alertCMessageCodes": [
                        {
                            "eventCode": "405",
                            "level": "Primary"
                        },
                        {
                            "eventCode": "703",
                            "level": "Secondary",
                            "quantifierType": "0"
                        }
                    ],
                    "inrixMessage": [
                        {
                            "inrixCode": "225",
                            "type": "Effect"
                        },
                        {
                            "inrixCode": "847",
                            "type": "Cause"
                        }
                    ]
                },
                "location": {
                    "countryCode": "1",
                    "direction": "both ways",
                    "biDirectional": "true",
                    "segments": [
                        {
                            "type": "XDS",
                            "offset": "639,640",
                            "code": "448833835"
                        },
                        {
                            "type": "XDS",
                            "offset": "0,215",
                            "code": "448833836"
                        },
                        {
                            "type": "XDS",
                            "offset": "212,427",
                            "code": "448833833"
                        }
                    ]
                },
                "schedule": {
                    "planned": "true",
                    "advanceWarning": "false",
                    "occurrenceStartTime": "2021-03-24T07:00:00Z",
                    "occurrenceEndTime": "2021-06-24T07:00:00Z",
                    "descriptions": {
                        "lang": "en-US",
                        "desc": "Starts at 3/24/2021 12:00 AM, ends at 6/24/2021 12:00 AM."
                    }
                },
                "descriptions": [
                    {
                        "type": "short",
                        "lang": "en-US",
                        "desc": "Totem Lake Blvd: no through traffic allowed between 128th St and 130th Pl"
                    },
                    {
                        "type": "long",
                        "lang": "en-US",
                        "desc": "No through traffic allowed due to utility work on Totem Lake Blvd both ways between 128th St and 130th Pl."
                    },
                    {
                        "type": "Text-to-Speech",
                        "lang": "en-US",
                        "desc": "On Totem Lake Boulevard both ways, between 128th Street, and 130th Place, no through traffic is allowed because of utility work."
                    }
                ],
                "parameterizedDescription": {
                    "eventCode": "405",
                    "eventText": "No Through Traffic Allowed, utility Work",
                    "roadName": "Totem Lake Blvd",
                    "direction": "both ways",
                    "crossroad1": "128th St / Totem Lake Blvd",
                    "crossroad2": "Totem Lake Blvd / 130th Pl",
                    "position1": "between",
                    "position2": "and"
                },
                "head": {
                    "geometry": {
                        "type": "point",
                        "coordinates": [
                            "47.716590",
                            "-122.185660"
                        ]
                    }
                },
                "tail": [
                    {
                        "geometry": {
                            "type": "point",
                            "coordinates": [
                                "47.714861",
                                "-122.184388"
                            ]
                        }
                    }
                ],
                "rds": {
                    "alertcMessage": "00C9952CCE004152AFC0000000000000000000000000000000",
                    "direction": "1",
                    "extent": "1",
                    "duration": "68289",
                    "diversion": "false",
                    "directionalityChanged": "false",
                    "eventCode": [
                        {
                            "code": "405",
                            "primary": "true"
                        },
                        {
                            "code": "703",
                            "primary": "false"
                        }
                    ]
                },
                "delayDetail": {
                    "fromTypicalMinutes": "9.0", 
                    "fromFreeFlowMinutes": "11.0", 
                    "distance": "0.24", 
                    "abnormal": "true"
                },
                "additional":{
                    "estimatedAttendance": "12000",
                    "delayTrend": "Increasing",
                    "contextText": "The accident is near to The Green Man. Photo on social media shows that there are two fire engines and a fire first response vehicle on scene."
                }
            }
        ]
    }
}

Response Elements

Property Type Description
Incidents Array A collection of Incident elements
Property Type Description
id String The unique identifier associated with the incident
version String The version of the incident report
type Unsigned byte The type of incident: 1=Construction, 2=Event, 3=Flow, 4=Incident, 5=Road Weather
severity Integer The severity of the incident. This value can be in the range of 0-4, with 4 indicating the highest severity. 0 – Minimal impact, 1 – Low impact, 2 – Moderate impact, 3 – High impact, 4 – Severe impact.
geometry Geojson point Location of the incident.
status String Whether the incident is active, cleared or inactive.
messages Array AlertC and INRIX codes describing the cause or effect of the incident.
Property Type Description
alertCMessageCodes Array AlertC codes describing the cause or effect of the incident.
Property Type Description
eventCode Integer AlertC codes describing the cause or effect of the incident.
level String “Primary”, “Secondary” or “Supplemental”
quantifierType Integer Optional AlertC quantifier. See the AlertC specifications for more details.
inrixMessage Array INRIX cause / effect incident codes of the incident.
Property Type Description
inrixcode Integer INRIX codes describing the cause or effect of the incident.
type String “Cause”, “Effect” or “Information”
quantifierType String Optional quantifier. See INRIX codes for more details.
quantifierData String Data related to the Quantifier Type.
location Array Location of the incident based on the TMC, INRIX XD segment, or OSM ID.
Property Type Description
countryCode String ISO 3166 based country code
direction String The direction of the issue (e.g. “Both ways”, “Northbound”, “Eastbound”).
biDirectional String If the issue affects both directions of the roadway. "true" or "false".
segments Array
Property Type Description
type String Either XDS, TMC or OSM
offset Integer, integer Start and end offset on the segment in meters
code String Unique identifier for the segment. The value would be the TMC code, the INRIX XD Segment ID, or the OSM ID.
schedule Array Schedule of incident including start and end times and recurring schedule if applicable.
Property Type Description
planned String “true” if this is a planned incident, or “false” if it isn’t planned.
advanceWarning String “true” for significant planned incidents and can be used for filtering in the query, otherwise false.
occurrenceStartTime String UTC time when the incident began, or when the next occurrence is expected to start.
occurrenceEndTime Array UTC time when the incident is expected to end, or when the next occurrence is expected to end.
reoccurring Array If this incident is reoccurring this element describes when it will reoccur. “DaysOfWeek” describes which days the incident will reoccur. “From” and “Until” detail the start and end times of the occurrence.
Property Type Description
daysOfWeek String which days the incident will reoccur.
from String start times of the occurrence.
until String End times of the occurrence.
startTime String UTC time when this incident first began. Only used for reoccurring incidents.
endTime String UTC time of the final incident reoccurrence. Only used for reoccurring incidents.
descriptions Array Textual description of the incident start and end(s)
Property Type Description
desc String Description of the start and end in specific language.
lang String Language code for the description
descriptions Array Textual descriptions of the incident.
Property Type Description
type String short, long or text-to-speech. The text-to-speech description is designed to be spoken to the customer. Each description is in the language specified with the Locale input parameter.
lang String Language code for the description
desc String Description of the incident in specific language for each type of description.
parameterizedDescription Array Provides information on a type of traffic event associated with an event code.
Property Type Description
eventCode Integer AlertC codes describing the cause or effect of the incident.
eventText Integer The text describing the cause or effect of the incident.
crossroad1 String Name and TMC of the crossroad where the event occurs
crossroad2 String Name and TMC of the crossroad where the event occurs
direction String Direction of travel on road for which event occurs
position1 String Positional relationship between RoadName and Crossroad1
position2 String Positional relationship between RoadName and Crossroad2
roadName String Name of the road or venue where the event occurs
head Geojson point Location of the furthest point on the road where the incident starts.
tail Geojson point Location of the furthest point on the road where the incident ends.
rds Array Radio Data System data.
Property Type Description
alertcMessage Hexadecimal Alert C encoded message that contains the incident information.
tmcLocation Integer TMC location code that represents an intersection
tmcCountry Integer Country code for the TMC. 0 indicates United States and 1 indicates United Kingdom.
tmcRegion Integer Region code for the TMC. There are multiple regions per country.
direction Integer Direction of queue growth. 0 indicates queue growth is positive, and flow growth is negative. 1 means queue growth is negative and flow growth is positive.
extent Integer Number of TMC paths affected by this incident. If 0, then just this TMC is affected; if 1, then the incident also affects the adjacent TMC paths; and so on.
duration Integer Expected remaining duration of the incident, in minutes. This value is often just an estimate. When encoded, the duration value is often set to zero, meaning unknown.
diversion Boolean Whether or not drivers are recommended to avoid the area if possible. 0 indicates avoiding is not recommended and 1 indicates avoiding is recommended.
directionalityChanged Boolean Whether the directionality is different than the default event code directionality. See Notes.
eventCode Array The list of event codes associated with this incident.
Property Type Description
code Integer AlertC codes describing the cause or effect of the incident.
primary Boolean true or false depending on whether the code is primary or not.
delayDetail Array Details of the delay for flow incidents.
Property Type Description
fromTypicalMinutes Double 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 week and time of day.
fromFreeFlowMinutes Double The increase in travel time across the road extent affected by the incident relative to the travel time under free-flowing conditions.
distance Double The length in miles of the road extent affected by the incident.
abnormal Booleanflow type and the difference between An incident is considered Abnormal if it is a current speed and typical speed is greater then 10mph at any point in the incident.
additional Array Additional data relavent to the incident. This is part of the premium offering.
Property Type Description
estimatedAttendance Double For event type incidents, the estimated attendance of the event if available.
delayTrend String For congestion type incidents, whether the congestion is currently increasing or decreasing.
contextText String Additional description of the incident which provides relevant context.