get_best_efforts
Calculate peak average power, heart rate, or speed over chosen durations or distances for one activity; returns timing and sample indices to locate each effort.
Instructions
Use for the peak efforts of one activity: best average power, HR or speed over durations (s) or distances (m), e.g. peak 5 s to 20 min power or the fastest km of a run (velocity_smooth with distances).
Returns per effort the average (W, bpm or m/s with pace) and its position as elapsed h:mm:ss and sample indices (usable as start_index / end_index); windows spanning a recording pause are flagged. Default durations 5 s to 60 min; longer than the activity = not available. Read-only; one API call per duration or distance plus 1-2. Several activities: compare_best_efforts; period bests: get_athlete_power_curves. Method: intervals://methods/comparisons (get_guide).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | Non-overlapping best efforts per duration or distance, 1-20 | |
| stream | No | Stream, e.g. watts, heartrate, velocity_smooth (speed), cadence | watts |
| distances | No | Comma-separated metres, e.g. "1000,5000" (added to durations) | |
| durations | No | Comma-separated seconds; "" for distances only | 5,30,60,300,1200,3600 |
| end_index | No | Sample index to stop before | |
| activity_id | Yes | Activity id, e.g. i123456789 | |
| start_index | No | First sample index searched | |
| output_format | No | json = machine-readable, all fields | text |
| exclude_intervals | No | Ignore samples inside detected intervals |