INRIX IQ logo

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:

The fields in each weekly csv file (in the report-level downloads list) are as follows:


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

  = 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'.
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
Query
https://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
Property Type Description
fileName Name of the file to download
fileURL A link to the file download
startDate The start date for the data contained in the file (inclusive)
endDate The end date for the data contained in the file (inclusive)