Traffic API Developer's Guide

Requesting Traffic Incident Data

The following GET request obtains traffic incident data for an area around Frankfurt, Germany .

https://traffic.ls.hereapi.com/traffic/6.3/incidents/xml/8/134/86
?apiKey={YOUR_API_KEY}
The response to the above request contains the following high-level elements:
  • a timestamp of the obtained traffic data
  • an array of <TRAFFIC_ITEM> elements that contain the incident location, time, duration, severity, description and other details
Note: This example uses a HERE API Key to authenticate your request. For information on other possible options, see Authentication Guide. For examples of how to use the other authentication options with the Traffic API, see Authentication Examples.
<?xml version="1.0" encoding="UTF-8"?>
<TRAFFICML_INCIDENTS TIMESTAMP="05/30/2018 14:06:34" VERSION="2.4" TIMESTAMP2="2018-05-30T14:06:34Z" EXTENDED_COUNTRY_CODE="E0">
   <TRAFFIC_ITEMS>
    <TRAFFIC_ITEM mid="16016752_original|1527204973573" PRODUCT="basic">
     <TRAFFIC_ITEM_ID>1144065005844396636</TRAFFIC_ITEM_ID>
     <ORIGINAL_TRAFFIC_ITEM_ID>1144065005844396636</ORIGINAL_TRAFFIC_ITEM_ID>
     <TRAFFIC_ITEM_STATUS_SHORT_DESC>ACTIVE</TRAFFIC_ITEM_STATUS_SHORT_DESC>
     <TRAFFIC_ITEM_TYPE_DESC>CONSTRUCTION</TRAFFIC_ITEM_TYPE_DESC>
     <START_TIME>04/16/2018 12:13:10</START_TIME>
     <END_TIME>12/13/2018 17:00:09</END_TIME>
     <ENTRY_TIME>05/24/2018 23:36:13</ENTRY_TIME>
     <CRITICALITY>
      <ID>2</ID>
      <DESCRIPTION>minor</DESCRIPTION>
     </CRITICALITY>
     <VERIFIED>true</VERIFIED>
     <ABBREVIATION>
      <SHORT_DESC>CONST</SHORT_DESC>
      <DESCRIPTION>construction</DESCRIPTION>
     </ABBREVIATION>
     <COMMENTS>A70, Bamberg - Bayreuth in beiden Richtungen, zwischen Anschlussstelle Schirradorf und Anschlussstelle Thurnau-Ost, Bauarbeiten, Fahrstreifen gesperrt, (km 102.8 - km 104.9), Länge: 2.1 km, Geschwindigkeitsbegrenzung: 80 km/h, bis 13.12.2018 18:00 Uhr</COMMENTS>
     <RDS-TMC_LOCATIONS>
      <RDS-TMC>
         <ORIGIN>
          <EBU_COUNTRY_CODE>D</EBU_COUNTRY_CODE>
          <TABLE_ID>1</TABLE_ID>
          <LOCATION_ID>12429</LOCATION_ID>
          <LOCATION_DESC>Stadelhofen</LOCATION_DESC>
          <RDS_DIRECTION>-</RDS_DIRECTION>
         </ORIGIN>
         <TO>
          <EBU_COUNTRY_CODE>D</EBU_COUNTRY_CODE>
          <TABLE_ID>1</TABLE_ID>
          <LOCATION_ID>12431</LOCATION_ID>
          <LOCATION_DESC>Thurnau-Ost</LOCATION_DESC>
          <RDS_DIRECTION>-</RDS_DIRECTION>
         </TO>
         <DIRECTION>+</DIRECTION>
         <ALERTC>
          <TRAFFIC_CODE>500</TRAFFIC_CODE>
          <QUANTIFIERS>0</QUANTIFIERS>
          <DESCRIPTION>Fahrstreifen gesperrt.</DESCRIPTION>
          <ALERTC_DURATION>L</ALERTC_DURATION>
          <ALERTC_DIRECTION>1</ALERTC_DIRECTION>
          <UPDATE_CLASS>5</UPDATE_CLASS>
          <PHRASE_CODE>D1</PHRASE_CODE>
          <EXTENT>2</EXTENT>
          <DURATION>0</DURATION>
         </ALERTC>
         <PRIMARY_OFFSET>0.15047</PRIMARY_OFFSET>
         <LENGTH>4.24822</LENGTH>
      </RDS-TMC>
      <RDS-TMC>
         <ORIGIN>
          <EBU_COUNTRY_CODE>D</EBU_COUNTRY_CODE>
          <TABLE_ID>1</TABLE_ID>
          <LOCATION_ID>12429</LOCATION_ID>
          <LOCATION_DESC>Stadelhofen</LOCATION_DESC>
          <RDS_DIRECTION>-</RDS_DIRECTION>
         </ORIGIN>
         <TO>
          <EBU_COUNTRY_CODE>D</EBU_COUNTRY_CODE>
          <TABLE_ID>1</TABLE_ID>
          <LOCATION_ID>12431</LOCATION_ID>
          <LOCATION_DESC>Thurnau-Ost</LOCATION_DESC>
          <RDS_DIRECTION>-</RDS_DIRECTION>
         </TO>
         <DIRECTION>+</DIRECTION>
         <ALERTC>
          <TRAFFIC_CODE>803</TRAFFIC_CODE>
          <QUANTIFIERS>0</QUANTIFIERS>
          <DESCRIPTION>Bauarbeiten auf Abschnitt.</DESCRIPTION>
          <ALERTC_DURATION>L</ALERTC_DURATION>
          <ALERTC_DIRECTION>1</ALERTC_DIRECTION>
          <UPDATE_CLASS>11</UPDATE_CLASS>
          <PHRASE_CODE>E11</PHRASE_CODE>
          <EXTENT>2</EXTENT>
          <DURATION>0</DURATION>
         </ALERTC>
         <PRIMARY_OFFSET>0.15047</PRIMARY_OFFSET>
         <LENGTH>4.24822</LENGTH>
      </RDS-TMC>
     </RDS-TMC_LOCATIONS>
     <LOCATION>
      <DEFINED>
         <ORIGIN>
          <ROADWAY ID="50164">
           <DESCRIPTION TYPE="NTCSA">A70</DESCRIPTION>
           <DESCRIPTION TYPE="RDSGN">A70</DESCRIPTION>
           <DESCRIPTION TYPE="LOCAL">A70</DESCRIPTION>
          </ROADWAY>
          <POINT ID="12429">
           <DESCRIPTION TYPE="NTCSA">Stadelhofen</DESCRIPTION>
           <DESCRIPTION TYPE="RDSGN">Stadelhofen</DESCRIPTION>
           <DESCRIPTION TYPE="LOCAL">Stadelhofen</DESCRIPTION>
           <DESCRIPTION TYPE="BNAME">A70</DESCRIPTION>
          </POINT>
          <DIRECTION ID="0">
           <DESCRIPTION TYPE="LOCAL">BAYREUTH</DESCRIPTION>
           <DESCRIPTION TYPE="NTCSA">BAYREUTH</DESCRIPTION>
           <DESCRIPTION TYPE="RDSGN">BAYREUTH</DESCRIPTION>
          </DIRECTION>
          <PROXIMITY>
           <ID>AT</ID>
           <DESCRIPTION>at</DESCRIPTION>
          </PROXIMITY>
         </ORIGIN>
         <TO>
          <ROADWAY ID="50164">
           <DESCRIPTION TYPE="NTCSA">A70</DESCRIPTION>
           <DESCRIPTION TYPE="RDSGN">A70</DESCRIPTION>
           <DESCRIPTION TYPE="LOCAL">A70</DESCRIPTION>
          </ROADWAY>
          <POINT ID="12431">
           <DESCRIPTION TYPE="NTCSA">Thurnau-Ost</DESCRIPTION>
           <DESCRIPTION TYPE="RDSGN">Thurnau-Ost</DESCRIPTION>
           <DESCRIPTION TYPE="LOCAL">Thurnau-Ost</DESCRIPTION>
           <DESCRIPTION TYPE="BNAME">A70</DESCRIPTION>
          </POINT>
          <DIRECTION ID="0">
           <DESCRIPTION TYPE="LOCAL">BAYREUTH</DESCRIPTION>
           <DESCRIPTION TYPE="NTCSA">BAYREUTH</DESCRIPTION>
           <DESCRIPTION TYPE="RDSGN">BAYREUTH</DESCRIPTION>
          </DIRECTION>
          <PROXIMITY>
           <ID>AT</ID>
           <DESCRIPTION>at</DESCRIPTION>
          </PROXIMITY>
         </TO>
      </DEFINED>
      <GEOLOC>
         <ORIGIN>
          <LATITUDE>50.011688</LATITUDE>
          <LONGITUDE>11.322033</LONGITUDE>
         </ORIGIN>
         <TO>
          <LATITUDE>50.02052</LATITUDE>
          <LONGITUDE>11.410953</LONGITUDE>
         </TO>
      </GEOLOC>
      <TPEGOpenLRBase64>CCkBEAAlJAgMriOQVwAJBQQAATwACgUEALccACPvA3UACQUEAAHDADBwMg==</TPEGOpenLRBase64>
      <NAVTECH>
         <EDGE>
          <EDGE_ID>554347745</EDGE_ID>
          <EDGE_ID>67620028</EDGE_ID>
          <EDGE_ID>924551663</EDGE_ID>
          <EDGE_ID>924551662</EDGE_ID>
          <EDGE_ID>541852539</EDGE_ID>
          <EDGE_ID>67586012</EDGE_ID>
          <EDGE_ID>774156481</EDGE_ID>
          <EDGE_ID>774156482</EDGE_ID>
          <EDGE_ID>541753241</EDGE_ID>
          <EDGE_ID>924551665</EDGE_ID>
          <EDGE_ID>924551664</EDGE_ID>
          <EDGE_ID>67620026</EDGE_ID>
          <EDGE_ID>67620021</EDGE_ID>
          <EDGE_ID>67620022</EDGE_ID>
          <EDGE_ID>924551666</EDGE_ID>
          <EDGE_ID>924551667</EDGE_ID>
          <EDGE_ID>774156484</EDGE_ID>
          <EDGE_ID>545252606</EDGE_ID>
          <EDGE_ID>924551669</EDGE_ID>
          <EDGE_ID>924551668</EDGE_ID>
         </EDGE>
         <VERSION_ID>201802</VERSION_ID>
      </NAVTECH>
      <LENGTH>4.24396</LENGTH>
     </LOCATION>
     <TRAFFIC_ITEM_DETAIL>
      <ROAD_CLOSED>false</ROAD_CLOSED>
      <EVENT>
         <EVENT_ITEM_CANCELLED>false</EVENT_ITEM_CANCELLED>
         <SCHEDULED_CONSTRUCTION_EVENT>
          <SCHEDULED_CONSTRUCTION_TYPE_DESC>CONSTRUCTION</SCHEDULED_CONSTRUCTION_TYPE_DESC>
          <SCHEDULED_CONSTRUCTION_DETAIL>construction</SCHEDULED_CONSTRUCTION_DETAIL>
         </SCHEDULED_CONSTRUCTION_EVENT>
      </EVENT>
      <ALERTC>
         <EVENT_CODE>500</EVENT_CODE>
      </ALERTC>
      <ALERTC>
         <EVENT_CODE>803</EVENT_CODE>
      </ALERTC>
     </TRAFFIC_ITEM_DETAIL>
     <TRAFFIC_ITEM_DESCRIPTION TYPE="short_desc">Zwischen Stadelhofen und Thurnau-Ost - Bauarbeiten auf Abschnitt. Fahrstreifen gesperrt.</TRAFFIC_ITEM_DESCRIPTION>
     <TRAFFIC_ITEM_DESCRIPTION TYPE="desc">Zwischen Stadelhofen und Thurnau-Ost - Bauarbeiten auf Abschnitt. Fahrstreifen gesperrt. A70, Bamberg - Bayreuth in beiden Richtungen, zwischen Anschlussstelle Schirradorf und Anschlussstelle Thurnau-Ost, Bauarbeiten, Fahrstreifen gesperrt, (km 102.8 - km 104.9), Länge: 2.1 km, Geschwindigkeitsbegrenzung: 80 km/h, bis 13.12.2018 18:00 Uhr</TRAFFIC_ITEM_DESCRIPTION>
     <TRAFFIC_ITEM_DESCRIPTION TYPE="no_exit_description">Bauarbeiten auf Abschnitt. Fahrstreifen gesperrt. A70, Bamberg - Bayreuth in beiden Richtungen, zwischen Anschlussstelle Schirradorf und Anschlussstelle Thurnau-Ost, Bauarbeiten, Fahrstreifen gesperrt, (km 102.8 - km 104.9), Länge: 2.1 km, Geschwindigkeitsbegrenzung: 80 km/h, bis 13.12.2018 18:00 Uhr</TRAFFIC_ITEM_DESCRIPTION>
    </TRAFFIC_ITEM>
    <TRAFFIC_ITEM mid="13510316">...</TRAFFIC_ITEM>
    ...
   </TRAFFIC_ITEMS>
</TRAFFICML_INCIDENTS>