INRIX IQ logo

The INRIX Traffic Camera Service returns data and images about cameras that automatically capture pictures of traffic on major roads. It can be used to find traffic cameras in a specified area, to retrieve information about a specified camera, and to retrieve the image last captured by a specified camera.

Usage

Typically traffic camera images are used to verify or get more detail from the road speed data. A common application scenario is to display traffic camera icons where they are located, and then to pop up a traffic camera image if a traffic camera icon is selected. For example, you might use the following flow for an application that displayed a map with traffic cameras:

  1. Calculate the longitude and latitude that corresponds to the two corners of the display.
  2. Use GetTrafficCamerasInBox to find the position of all traffic cameras on the screen.
  3. Display icons where all the traffic cameras are located.
  4. When the user selects a camera icon, call GetTrafficCameraImage with the associated traffic camera ID.
  5. Display the returned image in a pop up.

Response Data

The INRIX Traffic Camera API requests return information about traffic cameras, such as:

The GetTrafficCameraImage request returns an image in JPEG format.

Example Application

The following image is a screen-shot from a sample traffic application that shows where traffic cameras are located. When a traffic camera icon is selected, its latest image is displayed.

Sample Traffic Camera Application

/?Action=GetTrafficCamerasInBox

GET Returns a set of unique traffic camera identifiers, within the given set of box coordinates.

Parameters

  = required
Name Located In Type Description
Token Query String A valid authorization token returned in response to a GetSecurityToken request.
Corner1 Query String The first corner of the region in which to get data. This parameter must be specified as a pair of latitude and longitude values separated by a pipe character (|), in the form Corner1=”latitude|longitude”. The latitude and longitude values are expressed using the WGS 84 datum. Northern latitudes are positive and southern latitudes are negative. Eastern hemisphere longitudes are positive and western hemisphere longitudes are negative. Longitudes in North America are negative. The corner specified by the Corner1 parameter can be any of the four corners of the bounding rectangle.
Corner2 Query String The second corner of the region in which to get data. The Corner2 parameter is the geometric opposite of Corner1.
StreamingOnly Query Boolean Specifies whether only cameras that have streaming video URLs should be returned.
Value Description
false (default) Cameras that provide still images only, and cameras that provide both still images and streaming video URLs are returned.
true Only cameras that have streaming video URLs are returned.
OutputFields Query String A comma-delimited list of the fields that should be returned in the response. If OutputFields is not specified, the default is “All.”
Value Description
Point The Point location of the camera (can be abbreviated as P).
Status The status of the traffic camera (can be abbreviated as S).
Name The name of the traffic camera (can be abbreviated as N).
License The license of the traffic camera (can be abbreviated as L).
View The description of the view of the traffic camera (can be abbreviated as V).
StreamUrl The URL of the streaming video of the traffic camera (can be abbreviated as U).
All (default) All fields are returned (can be abbreviated as A).
Count Query Integer The maximum number of cameras returned in the response.

Requests

Example GetTrafficCamerasInBox Request
Query
http://{serverPath}.INRIX.com/...?Action=GetTrafficCamerasInBox&Token={token}&Corner1=47.68288|-122.23059&Corner2=47.60237|-122.13858

Responses

200 Success
<Inrix  docType="GetTrafficCamerasInBox"
    copyright="Copyright INRIX Inc." versionNumber="3.0.0" createdDate="2009-07-22T23:50:37Z"
    statusId="0" statusText="" responseId="0e16a95f-3bb9-4c27-826e-25724bd20f16">
    <Cameras>
          <Camera id="1030">
              <Point latitude="47.67943" longitude="-122.1837" />
              <Status outOfService="false" updateFreq="297908" />
              <Name>I405: NE 85th St</Name>
              <License useWhileDrivingProhibited="false" feeToEndUserProhibited="false"
                  sublicenseProhibited="false" regionId="39">
                  <CopyrightNotice>Image © Washington State DOT www.wsdot.wa.gov</CopyrightNotice>
              </License>
              <View>North/South</View>
            </Camera>
            <Camera id="1031">
                <Point latitude="47.65539" longitude="-122.1864" />
                <Status outOfService="false" updateFreq="297908" />
                <Name>I405: NE 53rd St</Name>
                <License useWhileDrivingProhibited="false" feeToEndUserProhibited="false"
                    sublicenseProhibited="false" regionId="39">
                    <CopyrightNotice>Image © Washington State DOT www.wsdot.wa.gov</CopyrightNotice>
                </License>
                <View>North/South</View>
            </Camera>
            ...
        </Cameras>
    <InputParameters>
        <InputParameter name="action" value="gettrafficcamerasinbox" />
        <InputParameter name="token" value="{token}" />
        <InputParameter name="corner1" value="47.68288|-122.23059" />
        <InputParameter name="corner2" value="47.60237|-122.13858" />
    </InputParameters>
</Inrix>

Response Elements

Property Type Description
Cameras Array Represents a collection of traffic cameras.
Property Type Description
Camera Element Represents a traffic camera.
Property Type Description
id Attribute (string) Unique ID of the traffic camera.
Name Element (string) Name or address of the traffic camera.
View Element (string) The possible directions that the camera could be facing.
Point Element Geo location of the traffic camera.
Property Type Description
latitude Attribute (double) Latitude of point
longitude Attribute (double) Longitude of point
Status Element Current operating status of the traffic camera.
Property Type Description
updateFreq Attribute (integer) How often, in milliseconds, the camera can provide new image frames.
License Element Licensing rights and obligations of the traffic camera.
Property Type Description
useWhileDrivingProhibited Attribute (boolean) true if it is prohibited to view camera data while driving; otherwise, false.
feeToEndUserProhibited Attribute (boolean) true if it is prohibited to charge a fee to the end user; otherwise, false.
sublicenseProhibited Attribute (boolean) true if it is prohibited to sublicense the data; otherwise, false.
regionId Attribute (integer) A unique region identifier that indicates to which region the camera belongs.
CopyrightNotice Element (string) The text of the copyright notice for the traffic camera.
StreamUrl Element (string) Url for streaming feed for camera if exists.
HasStream Element (boolean) If true, then the camera as a streaming video available.
Image Element (image/jpg) The binary image of the camera.
Direction Element (string) The current direction of the traffic camera.
ClosestLane Element (string) The lane closest to the traffic camera.

/?Action=GetTrafficCamerasInRadius

GET Returns a set of unique traffic camera identifiers within the given circular region.

Parameters

  = required
Name Located In Type Description
Token Query String A valid authorization token returned in response to a GetSecurityToken request.
Center Query String The center of the region in which to get data. This parameter must be specified as a pair of latitude and longitude values separated by a pipe character (|), in the form Center=”latitude|longitude”. Northern latitudes are positive and southern latitudes are negative. Eastern hemisphere longitudes are positive and western hemisphere longitudes are negative. Longitudes in North America are negative. The latitude and longitude values are expressed using the WGS 84 datum.
Radius Query Double The radius of the circular bounding area from which to return data. 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.
Units Query Integer Use 0 for English units, 1 for metric. The default is 0.
Value Description
0 (default) US (English units)
1 Metric units
StreamingOnly Query Boolean Specifies whether only cameras that have streaming video URLs should be returned.
Value Description
false (default) Cameras that provide still images only, and cameras that provide both still images and streaming video URLs are returned.
true Only cameras that have streaming video URLs are returned.
OutputFields Query String A comma-delimited list of the fields that should be returned in the response. If OutputFields is not specified, the default is “All.”
Value Description
Point The Point location of the camera (can be abbreviated as P).
Status The status of the traffic camera (can be abbreviated as S).
Name The name of the traffic camera (can be abbreviated as N).
License The license of the traffic camera (can be abbreviated as L).
View The description of the view of the traffic camera (can be abbreviated as V).
StreamUrl The URL of the streaming video of the traffic camera (can be abbreviated as U).
All (default) All fields are returned (can be abbreviated as A).
Count Query Integer The maximum number of cameras returned in the response.

Requests

Example GetTrafficCamerasInRadius Request
Query
http://{serverPath}.INRIX.com/...?Action=GetTrafficCamerasInRadius&Token={token}&Center=47.65111|-122.24776&Radius=3.65

Responses

200 Success
<Inrix docType="GetTrafficCamerasInRadius"
  copyright="Copyright INRIX Inc." versionNumber="3.0.0" createdDate="2009-07-23T00:08:29Z"
  statusId="0" statusText="" responseId="e8ce52b4-7b76-43f5-8ad7-3c97f8ac93a2">
  <Cameras>
    <Camera id="972">
      <Point latitude="47.6794" longitude="-122.3199" />
      <Status outOfService="false" updateFreq="70121" />
      <Name>I-5 at Lake City Way</Name>
      <License useWhileDrivingProhibited="false" feeToEndUserProhibited="false"
      sublicenseProhibited="false" regionId="38">
        <CopyrightNotice>Image © City of Seattle www.seattle.gov</CopyrightNotice>
      </License>
      <View>North/South</View>
    </Camera>
    <Camera id="973">
      <Point latitude="47.6575" longitude="-122.3221" />
      <Status outOfService="false" updateFreq="70121" />
      <Name>I-5 at NE 45th Street</Name>
      <License useWhileDrivingProhibited="false" feeToEndUserProhibited="false"
      sublicenseProhibited="false" regionId="38">
        <CopyrightNotice>Image © City of Seattle www.seattle.gov</CopyrightNotice>
      </License>
      <View>North/South</View>
    </Camera>
    ...
  </Cameras>
  <InputParameters>
    <InputParameter name="action" value="gettrafficcamerasinradius" />
    <InputParameter name="token" value="{token}" />
    <InputParameter name="center" value="47.65111|-122.24776" />
    <InputParameter name="radius" value="3.65" />
  </InputParameters>
</Inrix>

Response Elements

Property Type Description
Cameras Array Represents a collection of traffic cameras.
Property Type Description
Camera Element Represents a traffic camera.
Property Type Description
id Attribute (string) Unique ID of the traffic camera.
Name Element (string) Name or address of the traffic camera.
View Element (string) The possible directions that the camera could be facing.
Point Element Geo location of the traffic camera.
Property Type Description
latitude Attribute (double) Latitude of point
longitude Attribute (double) Longitude of point
Status Element Current operating status of the traffic camera.
Property Type Description
updateFreq Attribute (integer) How often, in milliseconds, the camera can provide new image frames.
License Element Licensing rights and obligations of the traffic camera.
Property Type Description
useWhileDrivingProhibited Attribute (boolean) true if it is prohibited to view camera data while driving; otherwise, false.
feeToEndUserProhibited Attribute (boolean) true if it is prohibited to charge a fee to the end user; otherwise, false.
sublicenseProhibited Attribute (boolean) true if it is prohibited to sublicense the data; otherwise, false.
regionId Attribute (integer) A unique region identifier that indicates to which region the camera belongs.
CopyrightNotice Element (string) The text of the copyright notice for the traffic camera.
StreamUrl Element (string) Url for streaming feed for camera if exists.
HasStream Element (boolean) If true, then the camera as a streaming video available.
Image Element (image/jpg) The binary image of the camera.
Direction Element (string) The current direction of the traffic camera.
ClosestLane Element (string) The lane closest to the traffic camera.

/?Action=GetTrafficCamerasInGeography

GET Returns a set of unique traffic camera identifiers, within the the specified geography.

Parameters

  = required
Name Located In Type Description
Token Query String A valid authorization token returned in response to a GetSecurityToken request.
GeoId Query Integer The ID of the specified geography. For more information on how to obtain the ID, see Geographies.
StreamingOnly Query Boolean Specifies whether only cameras that have streaming video URLs should be returned.
Value Description
false (default) Cameras that provide still images only, and cameras that provide both still images and streaming video URLs are returned.
true Only cameras that have streaming video URLs are returned.
OutputFields Query String A comma-delimited list of the fields that should be returned in the response. If OutputFields is not specified, the default is “All.”
Value Description
Point The Point location of the camera (can be abbreviated as P).
Status The status of the traffic camera (can be abbreviated as S).
Name The name of the traffic camera (can be abbreviated as N).
License The license of the traffic camera (can be abbreviated as L).
View The description of the view of the traffic camera (can be abbreviated as V).
StreamUrl The URL of the streaming video of the traffic camera (can be abbreviated as U).
All (default) All fields are returned (can be abbreviated as A).
Count Query Integer The maximum number of cameras returned in the response.

Requests

Example GetTrafficCamerasInGeography Request
Query
http://{serverPath}.INRIX.com/...?Action=GetTrafficCamerasInGeography&Token={token}&GeoId=114

Responses

200 Success
<Inrix docType="GetTrafficCamerasInGeography" copyright="Copyright INRIX Inc."
  versionNumber="3.5.0" createdDate="2010-09-22T23:11:34Z" statusId="0" statusText=""
  responseId="5ccf65e0-ed13-4ac3-a096-bb6f4f5e122b">
  <Cameras>
    <Camera id="1800">
      <Point latitude="42.757230" longitude="-73.736220" />
      <Status outOfService="false" updateFreq="58704" />
      <Name>NY7 at Miller Rd</Name>
      <License useWhileDrivingProhibited="false" feeToEndUserProhibited="false"
        sublicenseProhibited="false">
        <CopyrightNotice>Image © New York DOT www.travelinfony.com</CopyrightNotice>
      </License>
      <View>East/West</View>
    </Camera>
    <Camera id="1801">
      <Point latitude="42.762924" longitude="-73.762350" />
      <Status outOfService="false" updateFreq="58704" />
      <Name>I-87 at Exit 7 - NY 7</Name>
      <License useWhileDrivingProhibited="false" feeToEndUserProhibited="false"
        sublicenseProhibited="false">
        <CopyrightNotice>Image © New York DOT www.travelinfony.com</CopyrightNotice>
      </License>
      <View>North/South/East/West</View>
     </Camera>
     ...
  </Cameras>
</Inrix>

Response Elements

Property Type Description
Cameras Array Represents a collection of traffic cameras.
Property Type Description
Camera Element Represents a traffic camera.
Property Type Description
id Attribute (string) Unique ID of the traffic camera.
Name Element (string) Name or address of the traffic camera.
View Element (string) The possible directions that the camera could be facing.
Point Element Geo location of the traffic camera.
Property Type Description
latitude Attribute (double) Latitude of point
longitude Attribute (double) Longitude of point
Status Element Current operating status of the traffic camera.
Property Type Description
updateFreq Attribute (integer) How often, in milliseconds, the camera can provide new image frames.
License Element Licensing rights and obligations of the traffic camera.
Property Type Description
useWhileDrivingProhibited Attribute (boolean) true if it is prohibited to view camera data while driving; otherwise, false.
feeToEndUserProhibited Attribute (boolean) true if it is prohibited to charge a fee to the end user; otherwise, false.
sublicenseProhibited Attribute (boolean) true if it is prohibited to sublicense the data; otherwise, false.
regionId Attribute (integer) A unique region identifier that indicates to which region the camera belongs.
CopyrightNotice Element (string) The text of the copyright notice for the traffic camera.
StreamUrl Element (string) Url for streaming feed for camera if exists.
HasStream Element (boolean) If true, then the camera as a streaming video available.
Image Element (image/jpg) The binary image of the camera.
Direction Element (string) The current direction of the traffic camera.
ClosestLane Element (string) The lane closest to the traffic camera.

/?Action=GetTrafficCamera

GET Takes a traffic camera ID and returns metadata information about that camera.

Parameters

  = required
Name Located In Type Description
Token Query String A valid authorization token returned in response to a GetSecurityToken request.
CameraId Query Integer The ID of the camera for which to return metadata.
DesiredWidth Query Integer The width of the image to return.
DesiredHeight Query Integer The height of the image to return.
ImageOptions Query Integer A bitmask representing the field of view to be returned.
Value Description
0 (default) Bit 1: the entire camera field of view is returned. Otherwise, only the most relevant parts of the camera field of view are returned. The image is sub-sampled (or super-sampled) to match the desired width/height in pixels. The aspect ratio of the original image data is always preserved. When necessary, the returned image will be padded with black pixels.
Bit 2: the image dynamic range is enhanced for better viewability.
OutputFields Query String A comma-delimited list of the fields that should be returned in the response. If OutputFields is not specified, the default is “All.”
Value Description
Point The Point location of the camera (can be abbreviated as P).
Status The status of the traffic camera (can be abbreviated as S).
Name The name of the traffic camera (can be abbreviated as N).
License The license of the traffic camera (can be abbreviated as L).
View The description of the view of the traffic camera (can be abbreviated as V).
StreamUrl The URL of the streaming video of the traffic camera (can be abbreviated as U).
Direction The current direction of the traffic camera (can be abbreviated as D). This can either return a specific direction like North or South or a Clockwise in the case of ring roads
Image The image for of the traffic camera in binary format (can be abbreviated as I).
ClosestLane The lane closest to the traffic camera (can be abbreviated as C). This can return either direction like Northbound or Anticlockwise in the case or ring roads
All (default) All fields are returned (can be abbreviated as A).

Requests

Example GetTrafficCamera Request
Query
http://{serverPath}.INRIX.com/...?Action=GetTrafficCamera&Token={token}&CameraID=11539&outputfields=p,s,n,v,s,d,c,l

Responses

200 Success
<Inrix  docType="GetTrafficCamera"
    copyright="Copyright INRIX Inc." versionNumber="3.0.0" createdDate="2009-07-23T00:18:27Z"
    statusId="0" statusText="" responseId="2ded8ab2-8af9-4ca1-850e-3552b8edc570">
    <Cameras>
         <Camera id="5600">
              <Point latitude="51.398450" longitude="0.204250" />
              <Status outOfService="false" updateFreq="10000" />
              <Name>M25 </Name>
              <License useWhileDrivingProhibited="false" feeToEndUserProhibited="false"
              sublicenseProhibited="false" >
                  <CopyrightNotice>Image © Highways England www.highways.gov.uk</CopyrightNotice>
              </License>
              <View/>
              <Direction>Anticlockwise </Name>
              <Closestlane>Clockwise</Name>
         </Camera>
    </Cameras>
    <InputParameters>
         <InputParameter name="action" value="gettrafficcamera" />
         <InputParameter name="token" value="{token}" />
         <InputParameter name="cameraid" value="5600" />
    </InputParameters>
</Inrix>

Response Elements

Property Type Description
Cameras Array Represents a collection of traffic cameras.
Property Type Description
Camera Element Represents a traffic camera.
Property Type Description
id Attribute (string) Unique ID of the traffic camera.
Name Element (string) Name or address of the traffic camera.
View Element (string) The possible directions that the camera could be facing.
Point Element Geo location of the traffic camera.
Property Type Description
latitude Attribute (double) Latitude of point
longitude Attribute (double) Longitude of point
Status Element Current operating status of the traffic camera.
Property Type Description
updateFreq Attribute (integer) How often, in milliseconds, the camera can provide new image frames.
License Element Licensing rights and obligations of the traffic camera.
Property Type Description
useWhileDrivingProhibited Attribute (boolean) true if it is prohibited to view camera data while driving; otherwise, false.
feeToEndUserProhibited Attribute (boolean) true if it is prohibited to charge a fee to the end user; otherwise, false.
sublicenseProhibited Attribute (boolean) true if it is prohibited to sublicense the data; otherwise, false.
regionId Attribute (integer) A unique region identifier that indicates to which region the camera belongs.
CopyrightNotice Element (string) The text of the copyright notice for the traffic camera.
StreamUrl Element (string) Url for streaming feed for camera if exists.
HasStream Element (boolean) If true, then the camera as a streaming video available.
Image Element (image/jpg) The binary image of the camera.
Direction Element (string) The current direction of the traffic camera.
ClosestLane Element (string) The lane closest to the traffic camera.

/?Action=GetTrafficCameraImage

GET Takes a traffic camera ID and returns a binary image, in JPEG format, for that camera.

Parameters

  = required
Name Located In Type Description
Token Query String A valid authorization token returned in response to a GetSecurityToken request.
CameraId Query Integer The ID of the camera for which to return metadata.
DesiredWidth Query Integer The width of the image to return.
DesiredHeight Query Integer The height of the image to return.
ImageOptions Query Integer A bitmask representing the field of view to be returned.
Value Description
0 (default) Bit 1: the entire camera field of view is returned. Otherwise, only the most relevant parts of the camera field of view are returned. The image is sub-sampled (or super-sampled) to match the desired width/height in pixels. The aspect ratio of the original image data is always preserved. When necessary, the returned image will be padded with black pixels.
Bit 2: the image dynamic range is enhanced for better viewability.

Requests

Example GetTrafficCameraImage Request
Query
http://{serverPath}.INRIX.com/...?Action=GetTrafficCameraImage&Token={token}&CameraID=5600&DesiredWidth=640&DesiredHeight=480

Responses

200 Success

Response Image
640 x 480 JPG image from CameraID 5600.

/?Action=GetTrafficCameraVideoURL

GET Takes a traffic camera ID and redirects (httpcode 302) to the streaming feed for that camera.

Parameters

  = required
Name Located In Type Description
Token Query String A valid authorization token returned in response to a GetSecurityToken request.
CameraId Query Integer The ID of the camera for which to redirect to the streaming feed.

Requests

Example GetTrafficCameraVideoURL Request
Query
http://{serverPath}.INRIX.com/...?Action=GetTrafficCameraVideoURL&Token={token}&CameraID=173811&ImageWidth=720&ImageHeight=480

Responses

302 Success
<html>
    <head><title>Object moved</title></head>
    <body>
        <h2>Object moved to <a href="rtmp%3a%2f%2f58cc2dce193dd.streamlock.net%2flive%2f11_SW_Spokane_EW.stream">here</a>.</h2>
    </body>
</html>