The Trade Areas Trips API is a way to quickly query a year of trip origins and destinations over a small geographical area.
Overview
The Trade Areas Trips API returns the start and endpoints of a year of trips for a location specified by either a point-radius, a rectangular lat/long box, or a lat/long polygon. If you specify that the location is the Origin, the query returns all trips that began there. If you specify the Destination, the query returns all trips that ended there. The query area limit is 1 sq. mile.
The API returns rich trip metadata (start/end location, start/end time, device id, trip distance, trip mean speed) in json format. The query results are paginated, so full results are retrieved by calling the API multiple times with a limit of 10000 records returned with each page. Each query typically takes 1.5 seconds. A separate (and faster) Trips Count API returns the total trip count for the query, so total the number of records and pages can be known in advance.
Trip data will be updated quarterly, and the system will always contain 12 consecutive months of data. The default query returns the full 12 months of data, although custom time range queries are supported. All trip records are reported in UTC time.
Response Data
The INRIX Trade Area Trips API requests returns metadata for all the trips matching the query:
Trip ID
Anonymized Device ID
Anonymized Provider ID
Start Location (latitude and longitude)
End Location (latitude and longitude)
Start Time (UTC)
End Time (UTC)
Total Trip Distance in meters
Mean Speed of the trip in kilometers per hour
Endpoint Type indicating confidence in the start/end of the trip
Description: Finds INRIX trips that start or end within the specified region.
https://trade-areas-api.inrix.com/v1/trips
GETGets trips that either start or end within the 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'.
od
Query
String
Determines whether to search for trips by origin or destination; only one type of search can be done at a time.
Value
Description
origin
The query geometry is the origin: find trips that start inside it.
destination
The query geometry is the destination: find trips that end inside it.
either
The query geometry is either the origin or destination: find trips that start or end inside it.
geoFilterType
Query
String
Determines the query geometry (either a circle, rectangular bounding box, or a polygon)
Value
Description
circle
requires one point and a radius
bbox
requires two points: TOP LEFT, then BOTTOM RIGHT
polygon
requires at least three points listed COUNTER-CLOCKWISE
radius
Query
Double
radius is only used with the circle geoFilterType. Specify radius as a double with a unit of: km, mi, ft, m (e.g., 0.2km, 1000ft). The minimum radius is 10m and the maximum radius (set by the 1 sq mi limit) is 0.907km).
points
Query
String
One or more points are needed for every query. The format is lat|long and multiple points separated by commas: lat1|long1,lat2|long2,lat3|long3. Be sure to list bbox corners in TopLeft, Bottom Right order. Be sure to list polygon points counter-clockwise.
limit
Query
Double
Refers to page size for pagination (there is no limit on the number of results returned either by count or by trip distance). This parameter specifies the page size. The default is 1000 trips, the minimum is 10 trips, and the maximum is 10000 trips. The fast trips-count API can be used to precalculate the total number of pages needed (and it ignores this parameter).
providerType
Query
String
Limits the query to fleet or consumer trips only.
Value
Description
fleet
fleet includes private trucking fleets, for hire vehicles, local delivery fleets, field service vehicles, taxis
consumer
consumer includes only consumer vehicles
startDateTime
Query
String
Enables searches for trips that begin within a specified time range. By default the API returns all trips for a full year (12 consecutive months), but this parameter provides more fine-grained control. You may use one or two comparison operations (>,>=,<,<=) and they must be url encoded. The time is in UTC and its format is yyyy-MM-ddTHH:mm
<= (less than or equal to) Example: startDateTime=%3C%3D2016-07-01T02:31
endDateTime
Query
String
Enables searches for trips that end within a specified time range. By default the API returns all trips for a full year (12 consecutive months), but this parameter provides more fine-grained control. You may use one or two comparison operations (>,>=,<,<=) and they must be url encoded. The time is in UTC and its format is yyyy-MM-ddTHH:mm
<= (less than or equal to) Example: startDateTime=%3C%3D2016-07-01T02:31
endpointType
Query
String
Limits the query to one value of endpointType
Value
Description
3
An endpointType of 3 indicates that INRIX observed that the device was stationary at the start and end of the trip, which is the ideal case.
2
An endpointType of 2 indicates that INRIX observed that the device was stationary at the end of the trip.
1
An endpointType of 1 indicates that INRIX observed that the device was stationary at the start of the trip.
0
An endpointType of 0 indicates that INRIX did not observe that the device was stationary at either the start or the end of the trip. The trip may or may not have actually ended in this location, but no more data was available to decide.
tripDistanceMeters
Query
String
Enables searches for trips within a specified distance range in meters. By default the API returns trips with any trip distance, but this parameter provides more fine-grained control. You may use one or two comparison operations (>,>=,<,<=) and they must be url encoded.
<= (less than or equal to) Example: tripDistanceMeters=%3C%3D1000
fields
Query
String
Limits the response fields. This parameter can specify a single field, or multiple fields in a comma-separated list such as “startLoc,endLoc”. By default the API returns all the fields.
Value
Description
tripId
Unique anonymized ID for the trip
providerHash
Unique anonymized ID for the source of the trip data
startDateTime
UTC timestamp for the start of the trip
endDateTime
UTC timestamp for the end of the trip
startLoc
Latitude and Longitude of the start of the trip
endLoc
Latitude and Longitude of the end of the trip
deviceId
Unique anonymized ID for the device/vehicle that reported the trip data
tripDistanceMeters
the total trip distance in meters
tripMeanSpeedKPH
the mean speed of the trip in kilometers per hour
endpointType
indicates whether or not INRIX observed that the device was stationary at the start/end/both/neither for the trip
Requests
Example
Find trips within a polygon and limit results pages size to 1000 trips per page.