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
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 | |||||||||||||||
|