Get activity time series
garmin_get_activity_streamsRetrieve second-by-second Garmin activity stream data, downsampled for context, to analyze heart rate, power, speed, cadence, altitude, or location over a chosen time window.
Instructions
Get second-by-second data from one activity's FIT file, downsampled to fit in context.
Returns per field min/avg/max over the window, plus columnar series: t (seconds from the start of the activity, or of the leg for a multisport leg) and one array per field. Units: heart_rate bpm, power W, speed m/s, cadence steps/min (running) or rpm (cycling) or strokes/min, altitude m, distance m (cumulative), temperature °C, respiration_rate breaths/min, performance_condition (Garmin's -20..+20 score), vertical_oscillation mm, stance_time ms. Cadence averages leave out zeros.
Defaults to heart_rate, power, speed, cadence, altitude (whichever the activity has) at 10 s resolution, at most 500 points; the resolution coarsens automatically for long activities. Zoom in with start_s/end_s (e.g. one interval from garmin_get_activity_laps' start offsets) and a smaller resolution_s.
"position" adds GPS latitude/longitude and reveals where the user was: only request it when the user asks for location or route analysis. Developer fields (e.g. running power from a Connect IQ app) can be requested by the name listed in available_fields, like "dev_RP_Power".
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end_s | No | Window end, seconds from the start | |
| fields | No | Fields to return: heart_rate, power, speed, cadence, altitude, distance, temperature, respiration_rate, performance_condition, vertical_oscillation, stance_time, position, or a dev_* field | |
| start_s | No | Window start, seconds from the start | |
| max_points | No | Upper bound on points returned | |
| activity_id | Yes | Garmin activity ID from garmin_list_activities | |
| resolution_s | No | Seconds per point (minimum) | |
| response_format | No | 'json' (default) for the full series, 'markdown' for stats and a short preview table | json |