Athletes

Athletes are Strava users, Strava users are athletes. The object is returned in detailed, summary or meta representations.

Detailed representation attributes  

id: integer
resource_state: integer
indicates level of detail. Possible values: 1 -> ‘meta’, 2 -> ‘summary’, 3 -> ‘detail’
firstname: string
lastname: string
profile_medium: string
URL to a 62x62 pixel profile picture
profile: string
URL to a 124x124 pixel profile picture
city: string
state: string
country: string
sex: string
‘M’, ‘F’ or null
friend: string
‘pending’, ‘accepted’, ‘blocked’ or ‘null’
the authenticated athlete’s following status of this athlete
follower: string
‘pending’, ‘accepted’, ‘blocked’ or ‘null’
this athlete’s following status of the authenticated athlete
premium: boolean
created_at: time string
updated_at: time string
follower_count: integer
friend_count: integer
mutual_friend_count: integer
athlete_type: integer
athlete’s default sport type: 0=cyclist, 1=runner
date_preference: string
measurement_preference: string
‘feet’ or ‘meters’
email: string
ftp: integer
weight: float
kilograms
clubs: array of object
array of summary representations of the athlete’s clubs
bikes: array of object
array of summary representations of the athlete’s bikes
shoes: array of object
array of summary representations of the athlete’s shoes


Summary representation attributes  

id: integer
resource_state: integer
firstname: string
lastname: string
profile_medium: string
URL to a 62x62 pixel profile picture
profile: string
URL to a 124x124 pixel profile picture
city: string
state: string
country: string
sex: string
‘M’, ‘F’ or null
friend: string
‘pending’, ‘accepted’, ‘blocked’ or ‘null’
the authenticated athlete’s following status of this athlete
follower: string
‘pending’, ‘accepted’, ‘blocked’ or ‘null’
this athlete’s following status of the authenticated athlete
premium: boolean
email: string
created_at: time string
updated_at: time string


Meta representation attributes  

id: integer
resource_state: integer

Example athlete

{
  "id": 227615,
  "resource_state": 3,
  "firstname": "John",
  "lastname": "Applestrava",
  "profile_medium": "http://pics.com/227615/medium.jpg",
  "profile": "http://pics.com/227615/large.jpg",
  "city": "San Francisco",
  "state": "California",
  "country": "United States",
  "sex": "M",
  "friend": null,
  "follower": null,
  "premium": true,
  "created_at": "2008-01-01T17:44:00Z",
  "updated_at": "2013-09-04T20:00:50Z",
  "follower_count": 273,
  "friend_count": 19,
  "mutual_friend_count": 0,
  "athlete_type": 0,
  "date_preference": "%m/%d/%Y",
  "measurement_preference": "feet",
  "email": "john@applestrava.com",
  "ftp": 280,
  "weight": 68.7,
  "clubs": [
    {
      "id": 1,
      "resource_state": 2,
      "name": "Team Strava Cycling",
      "profile_medium": "http://pics.com/clubs/1/medium.jpg",
      "profile": "http://pics.com/clubs/1/large.jpg",
      "cover_photo": "http://pics.com/clubs/1/cover/large.jpg",
      "cover_photo_small": "http://pics.com/clubs/1/cover/small.jpg",
      "sport_type": "cycling",
      "city": "San Francisco",
      "state": "California",
      "country": "United States",
      "private": true,
      "member_count": 23,
      "featured": false,
      "url": "strava-cycling"
    }
  ],
  "bikes": [
    {
      "id": "b105763",
      "primary": false,
      "name": "Cannondale TT",
      "distance": 476612.9,
      "resource_state": 2
    },
    {
      "id": "b105762",
      "primary": true,
      "name": "Masi",
      "distance": 9000578.2,
      "resource_state": 2
    }
  ],
  "shoes": [
    {
      "id": "g1",
      "primary": true,
      "name": "Running Shoes",
      "distance": 67492.9,
      "resource_state": 2
    }
  ]
}

 

Retrieve current athlete

This request is used to retrieve information about the currently authenticated athlete.

Returns a detailed representation of the athlete.

Definition

GET https://www.strava.com/api/v3/athlete

Example request

$ curl -G https://www.strava.com/api/v3/athlete \
    -H "Authorization: Bearer 83ebeabdec09f6670863766f792ead24d61fe3f9"

 

Update current athlete

Requires write permissions, as requested during the authorization process.

Parameters

city: string
state: string
country: string
sex: string
‘M’ or ‘F’, any other value will set to null and displayed as “rather not say”
weight: float
kilograms

Returns a detailed representation of the updated athlete.

Definition

PUT https://www.strava.com/api/v3/athlete

Example request

$ curl -X PUT https://www.strava.com/api/v3/athlete \
    -H "Authorization: Bearer 83ebeabdec09f6670863766f792ead24d61fe3f9" \
    -F weight=62.8

 

Zones

Returns the heart rate and power zones of the requesting athlete. The min for Zone 1 is always 0 and the max for Zone 5 is always -1.

Heart rate

custom_zones: boolean
true if athlete has set their own custom heart rate zones
zones: array
array of athlete’s heart rate zones

Power

Premium members who have set a functional threshold power (ftp) will see their power zones. Power zones are a Premium-only feature. Free members will not see the power part of this endpoint.

zones: array
array of athlete’s power zones

Definition

GET https://www.strava.com/api/v3/athlete/zones

Example request

$ curl -G https://www.strava.com/api/v3/athlete/zones \
    -H "Authorization: Bearer 83ebeabdec09f6670863766f792ead24d61fe3f9"

Example response

{
  "heart_rate": {
    "custom_zones": false,
    "zones": [
      { "min": 0, "max": 115 },
      { "min": 115, "max": 152 },
      { "min": 152, "max": 171 },
      { "min": 171, "max": 190 },
      { "min": 190,  "max": -1 }
    ]
  },
  "power": {
      "zones": [
        { "min": 0, "max": 180 },
        { "min": 181, "max": 246 },
        { "min": 247, "max": 295 },
        { "min": 296, "max": 344 },
        { "min": 345, "max": 393 },
        { "min": 394, "max": 492 },
        { "min": 493,  "max": -1 }
      ]
    }
}

 

Totals and stats

Returns recent (last 4 weeks), year to date and all time stats for a given athlete. Only available for the authenticated athlete. This is the recommended endpoint when polling for athlete upload events.

Parameters

id: integer required
must match the authenticated athlete

Returns an object similar to the example at left. Values are in seconds and meters.

Definition

GET https://www.strava.com/api/v3/athletes/:id/stats

Example request

$ curl -G https://www.strava.com/api/v3/athletes/227615/stats \
    -H "Authorization: Bearer 83ebeabdec09f6670863766f792ead24d61fe3f9"

Example response

{
  "biggest_ride_distance": 175454.0,
  "biggest_climb_elevation_gain": 1882.6999999999998,
  "recent_ride_totals": {
    "count": 3,
    "distance": 12054.900146484375,
    "moving_time": 2190,
    "elapsed_time": 2331,
    "elevation_gain": 36.0,
    "achievement_count": 0
  },
  "recent_run_totals": {
    "count": 23,
    "distance": 195948.40002441406,
    "moving_time": 65513,
    "elapsed_time": 75232,
    "elevation_gain": 2934.3999996185303,
    "achievement_count": 46
  },
  "recent_swim_totals": {
    "count": 2,
    "distance": 1117.2000122070312,
    "moving_time": 1744,
    "elapsed_time": 1942,
    "elevation_gain": 0.0,
    "achievement_count": 0
  },
  "ytd_ride_totals": {
    "count": 134,
    "distance": 4927252,
    "moving_time": 659982,
    "elapsed_time": 892644,
    "elevation_gain": 49940
  },
  "ytd_run_totals": {
    "count": 111,
    "distance": 917100,
    "moving_time": 272501,
    "elapsed_time": 328059,
    "elevation_gain": 7558
  },
  "ytd_swim_totals": {
    "count": 8,
    "distance": 10372,
    "moving_time": 8784,
    "elapsed_time": 11123,
    "elevation_gain": 0
  },
  "all_ride_totals": {
    "count": 375,
    "distance": 15760015,
    "moving_time": 2155741,
    "elapsed_time": 2684286,
    "elevation_gain": 189238
  },
  "all_run_totals": {
    "count": 272,
    "distance": 2269557,
    "moving_time": 673678,
    "elapsed_time": 812095,
    "elevation_gain": 23780
  },
  "all_swim_totals": {
    "count": 8,
    "distance": 10372,
    "moving_time": 8784,
    "elapsed_time": 11123,
    "elevation_gain": 0
  }
}

 

List athlete K/QOMs/CRs

Returns an array of segment efforts representing Overall KOMs/QOMs and course records held by the given athlete. Yearly KOMs are not included. Results are sorted by date, newest first. Pagination is supported.

Parameters

id: integer required
page: integer optional
per_page: integer optional

Returns an array of segment effort summary representations.

Definition

GET https://www.strava.com/api/v3/athletes/:id/koms

Example request

$ curl -G https://www.strava.com/api/v3/athletes/227615/koms \
    -H "Authorization: Bearer 83ebeabdec09f6670863766f792ead24d61fe3f9"