Documentation
API Reference
Complete reference for all Strava API v3 endpoints. All requests require authentication and are made to https://www.strava.com/api/v3.
https://www.strava.com/api/v3Activities
Activities are the core of Strava. These endpoints let you create, read, update, and analyze activities.
| Endpoint |
|---|
POST /activitiesCreate Activity Creates a manual activity for an athlete |
GET /activities/{id}Get Activity Returns the given activity |
PUT /activities/{id}Update Activity Updates the given activity |
GET /athlete/activitiesList Athlete Activities Returns the activities of the authenticated athlete |
GET /activities/{id}/commentsList Activity Comments Returns the comments on the given activity |
GET /activities/{id}/kudosList Activity Kudoers Returns the athletes who kudosed an activity |
GET /activities/{id}/lapsList Activity Laps Returns the laps of an activity |
GET /activities/{id}/zonesGet Activity Zones Returns heart rate and power zones (Summit) |
GET /activities/{id}/streamsGet Activity Streams Returns the given activity's streams |
Example: Get Athlete Activities
curl -X GET "https://www.strava.com/api/v3/athlete/activities?per_page=30" \
-H "Authorization: Bearer ACCESS_TOKEN"Use before and after params (epoch timestamps) to filter by date.
Athletes
Access athlete profiles, statistics, and zones.
| Endpoint |
|---|
GET /athleteGet Authenticated Athlete Returns the currently authenticated athlete |
PUT /athleteUpdate Athlete Update the currently authenticated athlete |
GET /athlete/zonesGet Athlete Zones Returns the heart rate and power zones |
GET /athletes/{id}/statsGet Athlete Stats Returns the activity stats of an athlete |
Example: Get Athlete Stats
// Response includes totals for rides, runs, and swims
{
"all_ride_totals": {
"count": 250,
"distance": 15000000, // meters
"moving_time": 180000, // seconds
"elapsed_time": 200000,
"elevation_gain": 150000 // meters
},
"all_run_totals": { ... },
"all_swim_totals": { ... },
"ytd_ride_totals": { ... },
"recent_ride_totals": { ... }
}Clubs
Access club information, members, and activities. The authenticated athlete must be a member to access club activities.
| Endpoint |
|---|
GET /clubs/{id}Get Club Returns a given club |
GET /clubs/{id}/membersList Club Members Returns a list of club members |
GET /clubs/{id}/adminsList Club Admins Returns a list of club admins |
GET /clubs/{id}/activitiesList Club Activities Returns a list of recent club activities |
GET /athlete/clubsList Athlete Clubs Returns a list of clubs the athlete is a member of |
Gear
Retrieve information about bikes, shoes, and other equipment.
| Endpoint |
|---|
GET /gear/{id}Get Equipment Returns an equipment (bike or shoe) |
Routes
Access routes, including export to GPX/TCX formats for navigation devices.
| Endpoint |
|---|
GET /routes/{id}Get Route Returns a route |
GET /athletes/{id}/routesList Athlete Routes Returns a list of routes created by the athlete |
GET /routes/{id}/export_gpxExport Route GPX Returns a GPX file of the route |
GET /routes/{id}/export_tcxExport Route TCX Returns a TCX file of the route |
GET /routes/{id}/streamsGet Route Streams Returns the given route's streams |
Segments
Segments are specific sections of road or trail where athletes can compare times. Explore segments by location or access starred segments.
| Endpoint |
|---|
GET /segments/{id}Get Segment Returns a segment |
GET /segments/starredList Starred Segments Returns a list of starred segments |
PUT /segments/{id}/starredStar Segment Stars/unstars a segment |
GET /segments/exploreExplore Segments Returns segments in a given region |
GET /segments/{id}/streamsGet Segment Streams Returns the given segment's streams |
Example: Explore Segments by Location
// bounds format: sw_lat,sw_lng,ne_lat,ne_lng
curl -X GET "https://www.strava.com/api/v3/segments/explore?bounds=37.7,-122.5,37.8,-122.4&activity_type=riding" \
-H "Authorization: Bearer ACCESS_TOKEN"Segment Efforts
Segment efforts represent an athlete's attempt on a segment during an activity.
| Endpoint |
|---|
GET /segment_efforts/{id}Get Segment Effort Returns a segment effort |
GET /segment_effortsList Segment Efforts Returns segment efforts for a given segment and athlete |
GET /segment_efforts/{id}/streamsGet Segment Effort Streams Returns streams for a segment effort |
Uploads
Upload activity files in FIT, TCX, or GPX format. The upload is processed asynchronously.
| Endpoint |
|---|
POST /uploadsUpload Activity Uploads a new activity data file |
GET /uploads/{uploadId}Get Upload Returns the status of an upload |
Example: Upload Activity File
curl -X POST "https://www.strava.com/api/v3/uploads" \
-H "Authorization: Bearer ACCESS_TOKEN" \
-F file=@activity.fit \
-F data_type=fit \
-F name="Morning Ride" \
-F description="Great weather today!"Check upload status with GET /uploads/{uploadId} until activity_id is returned.
Activity Streams
Streams are detailed time-series data for activities, including GPS coordinates, elevation, heart rate, power, and more.
| Stream Type | Description |
|---|---|
| time | Time in seconds |
| distance | Distance in meters |
| latlng | GPS coordinates [lat, lng] |
| altitude | Elevation in meters |
| velocity_smooth | Speed in meters/second |
| heartrate | Heart rate in BPM |
| cadence | Cadence in RPM |
| watts | Power in watts |
| temp | Temperature in Celsius |
| grade_smooth | Grade/gradient percentage |
Example: Get Activity Streams
curl -X GET "https://www.strava.com/api/v3/activities/12345/streams?keys=time,distance,latlng,altitude,heartrate,watts&key_by_type=true" \
-H "Authorization: Bearer ACCESS_TOKEN"Official API Playground
Test API endpoints interactively with the Strava API Playground.