INRIX documentation logo

Description

Returns static segment data including speed limit.


Description: Send vehicle speed data and location and receive relevant speed limit info for vehicle location.

/v1/segments

GET Gets speed limit info for a segment

Parameters

  = required
Name Located In Type Description
Authorization Header String A valid access token provided from either the appToken, signIn or refreshToken api response. (Required if accessToken query not specified). Exact format 'Authorization: Bearer xxxx.xxx.xxxx'.
requestID Path String Unique number assigned by the caller and returned in the response. Can be used to match up req/resp pairs.
point Path String Latitude and longitude in WGS84 format, in the format lat|long (e.g. 44.64|-122.53).
heading Path Short Values between 0-359 are accepted.
units Path Integer Use 0 for English units, 1 for metric. Default is 0.
roadSegmentType Path Integer The Road Segment Type (Location Referencing method) to be returned. Currently only TMC is supported
outputFields Path String The data that should be returned. Multiple fields can be specified in a comma-delimited list. The default value is the segment (if there is a segment at the specified point).
Value Description
ps Posted Speed Limit data.
frc The Functional Road Classification code for each segment.
rn The road name.

Requests

Example Segments request
Query
http://segment-api.inrix.com/v1/segments?point=43.46126|-79.68372&heading=219&units=1&outputFields=ps,rn,frc&roadSegmentType=tmc&accessToken={token}
Body
<?xml version="1.0" encoding="UTF-8"?> <FcdPoints>
    <FcdPoint pointId="9776578676" timeStamp="2011-07-27T22:03:01.173" anonymousVehicleId="242515107078057" latitude="43.075000" longitude="-87.936370" heading="127" />
    <FcdPoint pointId="9776943440" timeStamp="2011-07-27T22:03:01.173" anonymousVehicleId="242515107078056" latitude="39.130300" longitude="-94.507580" heading="92" />
    <FcdPoint pointId="9778515247" timeStamp="2011-07-27T22:03:01.173" anonymousVehicleId="242515107093870" latitude="33.147600" longitude="-97.503320" heading="311" />
</FcdPoints>

Responses

200 Success
{
    "copyright": "Copyright INRIX Inc. 2017",
    "versionNumber": "v1",
    "createdDate": "2017-05-10T00:17:45.4714315Z",
    "responseID": "123ABC",
    "result": {
      "segments": {
        "snapPrecision": 1,
        "speed": {
          "postedSpeedLimit": 40,
          "unit": "KPH"
        },
        "roadInfo": {
          "code": "119+14145",
          "type": "TMC",
          "name": "E Front St",
          "frc": 3
        }
      }
    }
  }

Response Elements

Property Type Description
segments Array A container for RoadSpeedResults elements.
Property Type Description
snapPrecision Integer Value between 1 and 5 that indicates the accuracy of the TMC the road is snapped to. A value of 1 indicates a solid match
speed Array Speed limit of segment.
Property Type Description
unit String what units the posted speed is in. Either MPH or KPH
postedSpeedLimit Integer The speed limit of the segment.
roadInfo Array Defines information about the road segment of the snapped TMC
Property Type Description
frc Integer A code that indicates the size of the road.
1 - Highway
2 - Major artery
3 - Major road
4 and higher - Neighborhood street
name String Name of street
direction String Defines the direction of travel for the road
code String The segment code associated with the segment type.
type String The type of segment returned. Currently only return TMC