Strava

App · Health & Fitness · 6 actions

Track and manage workouts and activities via Strava.

Actions

ActionWhat it does
Create activityCreate a new activity in Strava.
Create reportBuild a summary report from the connected athlete's recent activities, with total distance, moving time, elevation, and a per-sport breakdown.
Get activityRetrieve detailed information about a specific activity.
Get athlete profileGet the connected athlete's profile details, including name, city, and follower counts.
Get athlete statsGet activity statistics for the connected athlete.
List athlete activitiesList the connected athlete's recent activities.

Create activity

Create a new activity in Strava.

Inputs

NamenametextRequired
Activity name.
Sport typesport_typetextRequired
The activity's sport type.One of: AlpineSki (Alpine Ski), BackcountrySki (Backcountry Ski), Badminton, Canoeing, Crossfit, EBikeRide (E Bike Ride), Elliptical, EMountainBikeRide (E Mountain Bike Ride), Golf, GravelRide (Gravel Ride), and 40 more.
Start date and timestart_date_localdate and timeRequired
When the activity started.
Elapsed timeelapsed_timenumberRequired
Elapsed time in seconds.
Distancedistancenumber
Distance in meters.
Descriptiondescriptiontext
Activity description.

Outputs

Response envelope; the payload is in the "activity" field.

activityobject
Example output
{
  "activity": {
    "id": "123456789"
  }
}

Create report

Build a summary report from the connected athlete's recent activities, with total distance, moving time, elevation, and a per-sport breakdown.

Inputs

Number of activitiesactivity_countnumber
How many of the most recent activities to include in the report (1-200). Defaults to 30.From 1 to 200.

Outputs

activities_by_typeobject
Count of activities by sport type.
activity_countnumber
Number of activities summarized.
summarytext
A human-readable summary of the report.
total_distance_kmnumber
Total distance in kilometers.
total_distance_metersnumber
Total distance in meters.
total_elapsed_time_secondsnumber
Total elapsed time in seconds.
total_elevation_gain_metersnumber
Total elevation gain in meters.
total_moving_time_secondsnumber
Total moving time in seconds.
Example output
{
  "activities_by_type": {
    "Ride": 4,
    "Run": 8
  },
  "activity_count": 12,
  "summary": "Activity report for the 12 most recent activities: 84.21 km over 6.0 h moving time, 1240 m of elevation gain. Breakdown: Ride: 4, Run: 8.",
  "total_distance_km": 84.21,
  "total_distance_meters": 84213.0,
  "total_elapsed_time_seconds": 23400,
  "total_elevation_gain_meters": 1240.0,
  "total_moving_time_seconds": 21600
}

Get activity

Retrieve detailed information about a specific activity.

Inputs

Activity IDactivity_idnumberRequired
Activity ID to retrieve.

Outputs

Response envelope; the payload is in the "activity" field.

activityobject
Example output
{
  "activity": {
    "distance": 5000,
    "elapsed_time": 1600,
    "id": "987654321",
    "moving_time": 1500,
    "name": "Morning Run",
    "start_date": "2024-01-15T06:30:00Z",
    "type": "Run"
  }
}

Get athlete profile

Get the connected athlete's profile details, including name, city, and follower counts.

Inputs

None.

Outputs

Response envelope; the payload is in the "profile" field.

profileobject
Example output
{
  "profile": {
    "city": "San Francisco",
    "country": "USA",
    "firstname": "Jordan",
    "follower_count": 250,
    "friend_count": 180,
    "id": "123456",
    "lastname": "Smith",
    "username": "rider123"
  }
}

Get athlete stats

Get activity statistics for the connected athlete.

Inputs

Athlete IDathlete_idnumberRequired
Athlete ID.

Outputs

Response envelope; the payload is in the "stats" field.

statsobject
Example output
{
  "stats": {
    "recent_ride_totals": {},
    "recent_run_totals": {},
    "ytd_ride_totals": {},
    "ytd_run_totals": {}
  }
}

List athlete activities

List the connected athlete's recent activities.

Inputs

Pagepagenumber
Which page of results to return. Defaults to 1.
Activities per pageper_pagenumber
How many activities to return per page. Defaults to 30.

Outputs

Response envelope; the payload is in the "activities" field.

activitieslist
Example output
{
  "activities": [
    {
      "distance": 5000,
      "id": "987654321",
      "moving_time": 1500,
      "name": "Morning Run",
      "start_date": "2024-01-15T06:30:00Z",
      "type": "Run"
    }
  ]
}

On this page