v2
latestOpenAPI 3.1.02026-07-312954143.9 KBQuery Dataset
Query a dataset and return matching rows as JSON or CSV.
Pass the X-Stream: true request header to stream JSON rows directly from a Postgres server-side cursor instead of buffering the entire result set in memory first (JSON only; ignored for CSV and external datasets). In streaming mode the result-dependent X-Has-Next-Page and X-rows-in-response headers are omitted -- read pagination from the JSON meta.hasNextPage and meta.cursor fields, which are populated identically on both paths.
Path parameters
ID of the dataset to query
ID of the dataset to query
Query parameters
API key for authentication (query)
API key for authentication (query)
The order to order results by
The column to filter results by
The column to filter results by
The value to filter results by
The maximum number of rows to return across all pages
The maximum number of rows to return across all pages
The page number of results to return
The page number of results to return
The maximum number of rows to return in a single page
The maximum number of rows to return in a single page
Comma separated list of columns to return. Defaults to all columns.
The timezone to use when interpreting timezone naive timestamps, resampling to frequencies one day or more, and returning results. A value of marketcan be provided to return results in the timezone of the source ISO for the dataset. If market is specified and the dataset does not have a source ISO, the timezone will default to UTC for the query. When provided, columns in the timezone will be suffixed with _local.
The timezone to use when interpreting timezone naive timestamps, resampling to frequencies one day or more, and returning results. A value of marketcan be provided to return results in the timezone of the source ISO for the dataset. If market is specified and the dataset does not have a source ISO, the timezone will default to UTC for the query. When provided, columns in the timezone will be suffixed with _local.
The time to filter results. Cannot be used with start_time or end_time.
Possible values:
-
'latest': Fetches the most recently reported data point.
-
A specific timestamp string (ISO 8601 format): Returns records that were published at the provided timestamp.
The comparison operator to use when filtering by time.
Possible values:
-
'=': Fetches the data at the exact time.
-
'>': Fetches the earliest data after the provided time.
-
'>=': Fetches the earliest data on or after the provided time.
-
'<': Fetches the latest data before the provided time.
-
'<=': Fetches the latest data on or before the provided time.
The comparison operator to use when filtering by time.
Possible values:
-
'=': Fetches the data at the exact time.
-
'>': Fetches the earliest data after the provided time.
-
'>=': Fetches the earliest data on or after the provided time.
-
'<': Fetches the latest data before the provided time.
-
'<=': Fetches the latest data on or before the provided time.
The start time to filter results using the dataset's time_index_column. Data on or after this time will be returned. Only applies to datasets with a time_index_column
The end time to filter results using the dataset's time_index_column. Data before this time will be returned. Only applies to datasets with a time_index_column
Controls the filtering based on the dataset's publish time.
Cannot be combined with publish_time_start or publish_time_end.Note: a dataset must have a time index column to use 'latest' or 'latest_before:' options.
Possible values:
-
'latest_report': Returns records only from the most recently published report.
-
'latest': For any given timestamp, fetches the most recently reported data point associated with it.
-
A specific timestamp string (ISO 8601 format): Returns records that were published at the provided timestamp.
-
'latest_before:<offset>': Return the most recent forecast for each operating time where publish_time <= operating_time + offset (e.g., 'latest_before:-6 hours').
-
'latest_before': shorthand for 'latest_before:-0 hours'. Used to get the most recent forecast prior to each operating time. This is useful because some forecasts are published after the operating time they are forecasting for.
-
'latest_before:<offset>@HH:MM:SS': Return the latest forecast published before the specified time on the offset day (e.g., 'latest_before:-1 day@10:00:00').
-
'window':<offset>: Returns all forecasts for each operating time published between the specified offset from the operating time and the operating time. In other words, where operating_time + offset <= publish_time <= operating_time. (e.g., 'window:-6 hours').
-
'window:<offset>@HH:MM:SS': Returns all forecasts for each operating time published between the specified time on the offset day from the operating time and the operating time (e.g., 'window:-1 day@10:00:00').
-
None: No filtering based on publish time.
The start time to filter results using the dataset's publish_time_column. Data on or after this time will be returned up to the publish_time_end if provided. Only applies to datasets with a publish_time_column. Cannot be used with publish_time.
The end time to filter results using the dataset's publish_index_column. Data before this time will be returned down the publish_time_start if provided. Only applies to datasets with a publish_time_column. Cannot be used with publish_time.
The frequency to resample the data to. Must be one of:
- "1 minute"
- "5 minutes"
- "10 minutes"
- "15 minutes"
- "1 hour"
- "1 day"
- "1 week"
- "1 month"
- "1 year"
When resampling_frequency is specified, start_time and end_time values must also be provided. The only exception to this is when querying datasets that have a publish time and the publish time is specified as a specific timestamp or 'latest_report'.
Additionally, the number of days of data that can be queried is limited based on the resample frequency. The maximum number of days of data that can be queried for each resample frequency is listed below. There is no limit on days for resample frequencies not listed below.
- 1 minute: 31 days
- 5 minutes: 100 days
- 10 minutes: 120 days
- 15 minutes: 180 days
- 1 hour: 365 days
- 1 day: 1825 days
The frequency to resample the data to. Must be one of:
- "1 minute"
- "5 minutes"
- "10 minutes"
- "15 minutes"
- "1 hour"
- "1 day"
- "1 week"
- "1 month"
- "1 year"
When resampling_frequency is specified, start_time and end_time values must also be provided. The only exception to this is when querying datasets that have a publish time and the publish time is specified as a specific timestamp or 'latest_report'.
Additionally, the number of days of data that can be queried is limited based on the resample frequency. The maximum number of days of data that can be queried for each resample frequency is listed below. There is no limit on days for resample frequencies not listed below.
- 1 minute: 31 days
- 5 minutes: 100 days
- 10 minutes: 120 days
- 15 minutes: 180 days
- 1 hour: 365 days
- 1 day: 1825 days
A comma separated list of columns to group by before resampling.
-
When resampling, the data is always grouped by the time index column of the dataset.
-
If a value is provided for resample_by, the data will be grouped by the provided columns in addition to the time index column.
-
If the dataset has a subseries index and no value is provided for resample_by, the data will also be grouped by the subseries index column.
-
If the dataset has a publish time column and the publish_time parameter is not 'latest', the data will also be grouped by the publish time column.
The function to use when resampling. Defaults to "mean". Possible values are "mean", "sum", "min", "max", "count", "stddev", "variance". If resample is None, this is ignored.
The return format of the response
Whether to download the file or not
Whether to download the file or not
The json schema of the response
Headers
API key for authentication (header)
API key for authentication (header)
Response
Successful response