Query an Oura collection
oura_queryFetch complete Oura collections across any date range, automatically following pagination and handling inclusive date boundaries. Get all records without missing last-day data or truncated pages.
Instructions
Fetches a COMPLETE Oura collection over the requested range.
Follows pagination to the end: Oura returns next_token and whoever doesn't
chase it receives the first page with nothing saying so. One local day of
heartrate is 1,231 samples across 2 pages; a month, ~37,000.
The range is INCLUSIVE on both ends: equal start and end return that
day. Oura does not behave that way — some collections exclude the last day
and others don't, and workout is skewed to UTC — but that is corrected
here.
Date-range collections use YYYY-MM-DD. heartrate and ring_battery_level
use ISO 8601 with time. personal_info and ring_configuration take no
range.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| day | No | Shorthand for a single day: equivalent to start=end=day. | |
| end | No | YYYY-MM-DD, or ISO 8601 with time | |
| start | No | YYYY-MM-DD, or ISO 8601 with time | |
| fields | No | Only these fields. Oura trims on its side, so less comes down: use it on long heartrate ranges. `day` and `id` always come back. | |
| format | No | `json` (default) or `csv`. CSV for large volumes: a month of heartrate is ~37,000 records and in JSON the keys repeat 37,000 times. | json |
| latest | No | Only the most recent record. heartrate and ring_battery_level only; it needs no range. | |
| collection | Yes | Exact name. See `oura_collections` if you are unsure. |