The Trip Trends Reports API is a fast and simple way to programmatically access up-to-date bulk Trip Trends data files and report metadata.
Overview
The Trip Trends Reports API returns report-level metadata and (optionally) a set of links to downloadable, weekly data files covering a specified date range. If no date range is specified, the API returns all reports files that the requestor is authorized to access. If a date range is specified that does not contain any authorized Trip Trends data, only report metadata will be returned.
The response body is a Json list of report objects containing report metadata and a list of file links and associated file metadata. Metadata describing each report includes the Trip Trends report name and date range (as start/end date) covered by the report. File metadata includes file name, and the date range (as start/end date) that is covered by each file. The response is paginated, with a user-specified number of report objects per page.
Each file described in the API response is a zipped CSV file containing the all Trip Trends data for a single report, week, and year. Links are pre-signed and expire within four hours of being generated. Depending on which reports a user has access to, there may be some duplication across reports. There will be no duplication across weekly files for a single report.
Response Data
The Reports API requests returns both report and file level metadata including:
- Report Name
- Start Date (report)
- Start Date (file)
- End Date (report)
- End Date (file)
- File name
The fields in each weekly csv file (in the report-level downloads list) are as follows:
- Market Type: the geography type or administrative level, may include “Country”, “State”, “Market” (city or metro), “County” and “Zipcode”
- Report Region: Deprecated, defaults to country or report name
- Parent Geography: Name of the parent geography, i.e. the larger geography that contains the geography described by the current row.
- Market: the name of the geography
- Vehicle Type: vehicle type, may include “Passenger”, “Long-Haul Trucks”, “Local Fleets” or “Fleet”
- Date: Date described by the current row
- Day of Week: Day of week associated with the Data field
- Time of Day: Time of day bin, may include “All”, “Morning Peak”, “Evening Peak”, and “Off-Peak”
- Normalized Trip Count: Total number of trips associated with a single vehicle type, geography, date, and time of day bin, scaled to baseline time period
- Normalized VMT: Total distance traveled by a single vehicle type in a given geography, date, and time of day bin, scaled to baseline time period
- Normalized Trip Duration: Total time spent traveling by a single vehicle type in a given geography, date, and time of day bin, scaled to baseline time period
- Normalized Avg. Trip Distance: Average per-trip distance traveled by a single vehicle type in a given geography, date, and time of day bin, scaled to baseline time period
- Adj. Normalized Trip Count: seasonally adjusted Normalized Trip Count
- Adj. Normalized VMT: Seasonally adjusted Normalized VMT
- Adj. Normalized Trip Duration: Seasonally adjusted Normalized Trip Duration
- Adj. Normalized Avg. Trip Distance: Seasonally adjusted Normalized Avg. Trip Distance
Description: Retrieve report metadata and download links for Trip Trends
https://triptrends-api.inrix.com/v1/reports
GET Gets report metadata and (optionally) download links for specified time period
Parameters
= requiredName | 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'. |
startDate | Query | String | The start date for the request in format YYYY-MM-DD, i.e. the earliest date for which to include report downloads. |
endDate | Query | String | The end date for the request in format YYYY-MM-DD, i.e. the latest date for which to include report downloads. |
outputFields | Query | String | Output fields to include as a comma separated list. Current options are “startDate”, “endDate”, “downloads”, and “all”. |
offset | Query | Integer | Record offset for results pagination. |
page | Query | Integer | Page number for results pagination. |
limit | Query | Integer | Maximum number of records/reports per page. |
Requests
Example Retrieve report metadata and download links for Trip Trends, include all files that overlap the date range 2021-03-01 through 2021-03-30
Queryhttps://triptrends-api.inrix.com/v1/reports?startDate=2021-03-01&endDate=2021-03-30&outputFields=all
Responses
200 Success
{
"data": [
{
"reportName": "International - Key Metros",
"startDate": "2020-01-01",
"endDate": "2021-05-14",
"downloads": [
{
"fileName": "International - Key Metros_2021-03-01_2021-03-07.zip",
"fileUrl": "https://analytics-trip-trends.s3.amazonaws.com/International%20-%20Key%20Metros/International%20-%20Key%20Metros_2021-03-01_2021-03-07.zip?AWSAccessKeyId=abc&Expires=1621304671",
"startDate": "2021-03-01",
"endDate": "2021-03-07"
},
{
"fileName": "International - Key Metros_2021-03-08_2021-03-14.zip",
"fileUrl": "https://analytics-trip-trends.s3.amazonaws.com/International%20-%20Key%20Metros/International%20-%20Key%20Metros_2021-03-08_2021-03-14.zip?AWSAccessKeyId=abc&Expires=1621304671",
"startDate": "2021-03-08",
"endDate": "2021-03-14"
},
{
"fileName": "International - Key Metros_2021-03-15_2021-03-21.zip",
"fileUrl": "https://analytics-trip-trends.s3.amazonaws.com/International%20-%20Key%20Metros/International%20-%20Key%20Metros_2021-03-15_2021-03-21.zip?AWSAccessKeyId=abc&Expires=1621304671",
"startDate": "2021-03-15",
"endDate": "2021-03-21"
},
{
"fileName": "International - Key Metros_2021-03-22_2021-03-28.zip",
"fileUrl": "https://analytics-trip-trends.s3.amazonaws.com/International%20-%20Key%20Metros/International%20-%20Key%20Metros_2021-03-22_2021-03-28.zip?AWSAccessKeyId=abc&Expires=1621304671",
"startDate": "2021-03-22",
"endDate": "2021-03-28"
},
{
"fileName": "International - Key Metros_2021-03-29_2021-04-04.zip",
"fileUrl": "https://analytics-trip-trends.s3.amazonaws.com/International%20-%20Key%20Metros/International%20-%20Key%20Metros_2021-03-29_2021-04-04.zip?AWSAccessKeyId=abc&Expires=1621304671",
"startDate": "2021-03-29",
"endDate": "2021-04-04"
}
]
},
{
"reportName": "Marketing Combined",
"startDate": "2020-01-01",
"endDate": "2021-05-14",
"downloads": [
{
"fileName": "Marketing Combined_2021-03-01_2021-03-07.zip",
"fileUrl": "https://analytics-trip-trends.s3.amazonaws.com/Marketing%20Combined/Marketing%20Combined_2021-03-01_2021-03-07.zip?AWSAccessKeyId=abc&Expires=1621304671",
"startDate": "2021-03-01",
"endDate": "2021-03-07"
},
{
"fileName": "Marketing Combined_2021-03-08_2021-03-14.zip",
"fileUrl": "https://analytics-trip-trends.s3.amazonaws.com/Marketing%20Combined/Marketing%20Combined_2021-03-08_2021-03-14.zip?AWSAccessKeyId=abc&Expires=1621304671",
"startDate": "2021-03-08",
"endDate": "2021-03-14"
},
{
"fileName": "Marketing Combined_2021-03-15_2021-03-21.zip",
"fileUrl": "https://analytics-trip-trends.s3.amazonaws.com/Marketing%20Combined/Marketing%20Combined_2021-03-15_2021-03-21.zip?AWSAccessKeyId=abc&Expires=1621304671",
"startDate": "2021-03-15",
"endDate": "2021-03-21"
},
{
"fileName": "Marketing Combined_2021-03-22_2021-03-28.zip",
"fileUrl": "https://analytics-trip-trends.s3.amazonaws.com/Marketing%20Combined/Marketing%20Combined_2021-03-22_2021-03-28.zip?AWSAccessKeyId=abc&Expires=1621304671",
"startDate": "2021-03-22",
"endDate": "2021-03-28"
},
{
"fileName": "Marketing Combined_2021-03-29_2021-04-04.zip",
"fileUrl": "https://analytics-trip-trends.s3.amazonaws.com/Marketing%20Combined/Marketing%20Combined_2021-03-29_2021-04-04.zip?AWSAccessKeyId=abc&Expires=1621304671",
"startDate": "2021-03-29",
"endDate": "2021-04-04"
}
]
}
],
"meta": {
"offset": 0,
"total_count": 60,
"total_pages": 6
}
}
Response Elements
Property | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
reportName | String | Name of the Trip Trends report | |||||||||||||||
startDate | String | Start date for the report | |||||||||||||||
endDate | String | End date for the report | |||||||||||||||
downloads | List | List of file metadata and download links | |||||||||||||||
|