get_activity_fit_data
Downloads and parses a Garmin activity FIT file to expose advanced cycling metrics like shifting, power balance, climb analysis, and heart rate drift.
Instructions
Download and parse FIT file for an activity to expose advanced cycling data.
Returns data not available through the standard REST API, including:
DI2 / electronic shifting events with cadence at time of shift, grade at shift, gear combinations, shift quality classification, and terrain-grouped shift analysis
Cycling dynamics per session and lap: platform center offset (PCO), left/right power balance, torque effectiveness, pedal smoothness
Variability Index (NP / avg_power) per session and lap
Climb detection with VAM (vertical ascent rate), avg power/cadence/HR per climb, and W/kg per climb (using auto-fetched body weight from Garmin)
Grade-correlated stats: avg power, cadence, HR broken down by terrain steepness
HR drift / cardiac drift coefficient (aerobic decoupling for rides ≥60 min)
Temperature correlation: avg HR/power in hottest vs. coolest portions of ride
Power Duration Curve: best mean maximal power at 5s, 30s, 1min, 5min, 10min, 20min, 60min
Optional full per-second time series when include_records=True
Shift quality:
proactive: shifted at 70-100 rpm (ideal cadence range)
reactive: shifted below 70 rpm (already grinding before shifting)
coasting: shifted at 0 rpm (mid-stop or freewheeling)
spun_out: shifted above 100 rpm (waited too long in easy gear)
Note: DI2 data requires Shimano Di2 / SRAM eTap. Cycling dynamics require a compatible power meter (e.g., Garmin Rally, Favero Assioma, PowerTap P1 pedals).
Args: activity_id: Garmin activity ID include_records: Include full per-second time series (default False). Warning: adds significant data volume for long rides.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| activity_id | Yes | ||
| include_records | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |