The Strava connector lets your AI agent act in each user's Strava account. Each user signs in to Strava once, and Scalekit stores and refreshes their tokens, so your agent never handles credentials. It comes with 28 tools.
- Tools
- 28
- What they doRead · write · destructive
- 24 · 4 · 024 read4 write0 destructive
- Users sign in with
- OAuth
- OAuth app
- Your own Strava app
Setup
Install the SDK
Terminal window npm install @scalekit-sdk/node dotenvTerminal window pip install scalekit-sdk-python python-dotenvSet your credentials
Add your Scalekit credentials to your
.envfile. Find values in app.scalekit.com > Developers > API Credentials..env SCALEKIT_ENVIRONMENT_URL=<your-environment-url>SCALEKIT_CLIENT_ID=<your-client-id>SCALEKIT_CLIENT_SECRET=<your-client-secret>Create the Strava connection
In AgentKit > Connections, create a Strava connection and copy its redirect URI. The name you give it is the
connection_nameyour code passes. See Configure connections.Register an OAuth app
Strava connections use your own OAuth app. Register one with Strava and add the redirect URI you copied.
Then enter the app's Client ID and Client Secret on the Strava connection.
Authorize a user and make your first call
quickstart.mts import { ScalekitClient } from '@scalekit-sdk/node'import 'dotenv/config'import { createInterface } from 'node:readline/promises'const scalekit = new ScalekitClient(process.env.SCALEKIT_ENVIRONMENT_URL,process.env.SCALEKIT_CLIENT_ID,process.env.SCALEKIT_CLIENT_SECRET,)const actions = scalekit.actionsconst connector = 'strava'const identifier = 'user_123'// Generate an authorization link for the userconst { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })console.log('Authorize Strava:', link)const rl = createInterface({ input: process.stdin, output: process.stdout })await rl.question('Press Enter after authorizing...')rl.close()// Make your first callconst result = await actions.executeTool({connector,identifier,toolName: 'strava_get_athlete',toolInput: {},})console.log(result)Terminal window npx tsx quickstart.mtsquickstart.py import osfrom scalekit import ScalekitClientfrom dotenv import load_dotenvload_dotenv()scalekit_client = ScalekitClient(env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),client_id=os.getenv("SCALEKIT_CLIENT_ID"),client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),)actions = scalekit_client.actionsconnection_name = "strava"identifier = "user_123"# Generate an authorization link for the userlink_response = actions.get_authorization_link(connection_name=connection_name,identifier=identifier,)print("Authorize Strava:", link_response.link)input("Press Enter after authorizing...")# Make your first callresult = actions.execute_tool(tool_input={},tool_name="strava_get_athlete",connection_name=connection_name,identifier=identifier,)print(result)Terminal window python quickstart.pyEach user signs in once. See Authorize a user for the full flow and statuses.
Tools
Pass the exact name toexecute_toolstrava_explore_segmentsFind popular segments inside a rectangular map area.Read-onlyExplore Segments
Find popular segments inside a rectangular map area. Returns up to 10 segments with id, name, climb category, distance, grade and start and end coordinates. Use this to discover segments; use strava_get_segment for one segment's detail. Strava limits this endpoint to apps with Extended Access Tier permission.
Inputs
boundsstringrequired- Rectangle to search as four comma-separated numbers: south-west latitude, south-west longitude, north-east latitude, north-east longitude. Example: 37.821362,-122.505373,37.842038,-122.465977.
activity_typestring- Limit results to segments for this activity type. Example: running.one of
runningriding max_catinteger- Maximum climb category to include, from 0 to 5; only applies to riding. Example: 4.
min_catinteger- Minimum climb category to include, from 0 to 5; only applies to riding. Example: 1.
strava_get_activityRetrieve one activity by id.Read-onlyGet Activity
Retrieve one activity by id. Returns the detailed activity: name, sport type, distance, times, elevation, calories, gear, splits, laps and segment efforts. Use strava_list_activities to find the id. Use strava_get_activity_streams for raw time-series data. Requires activity:read, or activity:read_all for private activities.
Inputs
idintegerrequired- Numeric ID of the activity. Example: 12345678901.
include_all_effortsboolean- Set to true to include every segment effort for the activity, not only the best ones. Example: true.
strava_get_activity_streamsRetrieve raw time-series streams for an activity, such as heart rate, power, GPS and altitude.Read-onlyGet Activity Streams
Retrieve raw time-series streams for an activity, such as heart rate, power, GPS and altitude. Returns one object per requested stream type with its data array, series type and resolution. Use strava_get_activity for summary fields; use this for per-sample data. Requires activity:read, or activity:read_all for private activities.
Inputs
idintegerrequired- Numeric ID of the activity. Example: 12345678901.
keysstringrequired- Comma-separated list of stream types to return, from: time, distance, latlng, altitude, velocity_smooth, heartrate, cadence, watts, temp, moving, grade_smooth. Example: time,heartrate,watts.
strava_get_activity_zonesRetrieve heart rate and power zone distribution for an activity.Read-onlyGet Activity Zones
Retrieve heart rate and power zone distribution for an activity. Returns time spent in each zone as buckets with min, max and seconds. Use strava_get_athlete_zones for the athlete's zone boundaries instead. This is a Strava subscriber feature. Requires activity:read, or activity:read_all for private activities.
Inputs
idintegerrequired- Numeric ID of the activity. Example: 12345678901.
strava_get_athleteRetrieve the profile of the authenticated athlete.Read-onlyGet Authenticated Athlete
Retrieve the profile of the authenticated athlete. Returns id, name, location, sex, premium flag, weight, FTP and, with profile:read_all, clubs, bikes and shoes. Use this to learn the athlete id before calling strava_get_athlete_stats. Use strava_get_athlete_zones for heart rate and power zones. The profile:read_all scope returns the detailed profile; other tokens get a summary.
Inputs
This tool takes no inputs.
strava_get_athlete_statsRetrieve activity totals for an athlete: recent, year-to-date and all-time figures for runs, rides and swims.Read-onlyGet Athlete Stats
Retrieve activity totals for an athlete: recent, year-to-date and all-time figures for runs, rides and swims. Returns distance, moving time, elevation gain and counts per sport, plus biggest ride and climb distances. Use strava_get_athlete first to find the athlete id. Totals only include activities visible to Everyone.
Inputs
idintegerrequired- Numeric ID of the athlete (must be the authenticated athlete). Example: 12345678.
strava_get_athlete_zonesRetrieve the heart rate and power zones configured for the authenticated athlete.Read-onlyGet Athlete Zones
Retrieve the heart rate and power zones configured for the authenticated athlete. Returns zone boundaries (min and max) for heart rate and, when set, power. Use strava_get_activity_zones for the time spent in each zone during one activity. Requires the profile:read_all scope.
Inputs
This tool takes no inputs.
strava_get_clubRetrieve one club by id.Read-onlyGet Club
Retrieve one club by id. Returns the detailed club: name, sport type, location, member count, description and membership status of the authenticated athlete. Use strava_list_athlete_clubs to find the club ids the athlete belongs to.
Inputs
idintegerrequired- Numeric ID of the club. Example: 231407.
strava_get_gearRetrieve one piece of gear, a bike or a pair of shoes, by id.Read-onlyGet Gear
Retrieve one piece of gear, a bike or a pair of shoes, by id. Returns the detailed gear: name, brand, model, distance and primary flag. Gear ids appear on activities (gear_id) and on the athlete profile.
Inputs
idstringrequired- Numeric ID of the gear item; bikes start with b and shoes with g. Example: b12345678.
strava_get_routeRetrieve one route by id.Read-onlyGet Route
Retrieve one route by id. Returns the route: name, description, distance, elevation gain, type, sub type, map polyline and segments. Use strava_list_athlete_routes to find route ids. Requires the read_all scope for private routes.
Inputs
idintegerrequired- Numeric ID of the route. Example: 3012345678901234567.
strava_get_route_streamsRetrieve the geometry streams of a route: distance, coordinates and altitude.Read-onlyGet Route Streams
Retrieve the geometry streams of a route: distance, coordinates and altitude. Returns the route's stream set with data arrays, series type and resolution. Use strava_get_route for route summary fields. Requires the read_all scope for private routes.
Inputs
idintegerrequired- Numeric ID of the route. Example: 3012345678901234567.
strava_get_segmentRetrieve one segment by id.Read-onlyGet Segment
Retrieve one segment by id. Returns the detailed segment: name, activity type, distance, grade, elevation, location, effort count and star count. Use strava_explore_segments to find segments in an area; use strava_list_segment_efforts for the athlete's efforts on it. The read_all scope is required for private segments and athlete-specific fields.
Inputs
idintegerrequired- Numeric ID of the segment. Example: 229781.
strava_get_segment_effortRetrieve one segment effort by id.Read-onlyGet Segment Effort
Retrieve one segment effort by id. Returns the detailed effort: segment, activity, elapsed and moving time, start date, heart rate, power and achievements. Use strava_list_segment_efforts to find effort ids. Requires a Strava subscription.
Inputs
idintegerrequired- Numeric ID of the segment effort. Example: 67890123456.
strava_get_segment_effort_streamsRetrieve raw time-series streams for one segment effort.Read-onlyGet Segment Effort Streams
Retrieve raw time-series streams for one segment effort. Returns one object per requested stream type with its data array, series type and resolution. Use strava_get_segment_streams for the segment's own geometry instead. Requires the read_all scope.
Inputs
idintegerrequired- Numeric ID of the segment effort. Example: 67890123456.
keysstringrequired- Comma-separated list of stream types to return, from: time, distance, latlng, altitude, velocity_smooth, heartrate, cadence, watts, temp, moving, grade_smooth. Example: time,heartrate.
strava_get_segment_streamsRetrieve the geometry streams of a segment: distance, coordinates and altitude.Read-onlyGet Segment Streams
Retrieve the geometry streams of a segment: distance, coordinates and altitude. Returns one object per requested stream type with its data array, series type and resolution. Use strava_get_segment_effort_streams for an athlete's effort data instead. Requires the read_all scope for private segments.
Inputs
idintegerrequired- Numeric ID of the segment. Example: 229781.
keysstringrequired- Comma-separated list of stream types to return, from: distance, latlng, altitude. Example: distance,latlng,altitude.
strava_get_uploadCheck the processing status of an activity file upload.Read-onlyGet Upload Status
Check the processing status of an activity file upload. Returns upload id, status text, error text and the resulting activity id once processing finishes. Use this to poll an upload started outside this connector; it cannot start uploads itself. Requires the activity:write scope.
Inputs
idintegerrequired- Numeric ID of the upload. Example: 1234567890.
strava_list_activitiesList activities of the authenticated athlete, newest first, optionally limited to a time window.Read-onlyList Athlete Activities
List activities of the authenticated athlete, newest first, optionally limited to a time window. Returns summary activities with id, name, sport type, distance, moving time, elevation gain and start date. Use this to find activity ids; use strava_get_activity for full detail on one activity. Requires activity:read, or activity:read_all to include private activities.
Inputs
afterinteger- Only return activities that started after this Unix epoch timestamp in seconds. Example: 1704067200.
beforeinteger- Only return activities that started before this Unix epoch timestamp in seconds. Example: 1735689600.
pageinteger- Page number to fetch, starting at 1. Combine with per_page to walk through results. Example: 2.
per_pageinteger- Number of items to return per page. Strava defaults to 30. Example: 50.
strava_list_activity_commentsList comments on an activity.Read-onlyList Activity Comments
List comments on an activity. Returns each comment with id, text, author and timestamp, plus a cursor for the next page when more exist. Use strava_list_activity_kudos to see who gave kudos. Requires activity:read, or activity:read_all for private activities.
Inputs
idintegerrequired- Numeric ID of the activity. Example: 12345678901.
after_cursorstring- Cursor of the last comment on the previous page; omit to fetch the first page. Example: eyJpZCI6MTIzfQ.
page_sizeinteger- Number of comments to return per page. Strava defaults to 30. Example: 30.
strava_list_activity_kudosList the athletes who gave kudos to an activity.Read-onlyList Activity Kudoers
List the athletes who gave kudos to an activity. Returns summary athletes with id, first name, last name and profile fields. Use strava_list_activity_comments for comments instead. Requires activity:read, or activity:read_all for private activities.
Inputs
idintegerrequired- Numeric ID of the activity. Example: 12345678901.
pageinteger- Page number to fetch, starting at 1. Combine with per_page to walk through results. Example: 2.
per_pageinteger- Number of items to return per page. Strava defaults to 30. Example: 50.
strava_list_activity_lapsList the laps recorded for an activity.Read-onlyList Activity Laps
List the laps recorded for an activity. Returns each lap with name, elapsed and moving time, distance, start index and speed. Use strava_get_activity for the whole activity; use this for per-lap splits. Requires activity:read, or activity:read_all for private activities.
Inputs
idintegerrequired- Numeric ID of the activity. Example: 12345678901.
strava_list_athlete_clubsList the clubs the authenticated athlete belongs to.Read-onlyList Athlete Clubs
List the clubs the authenticated athlete belongs to. Returns summary clubs with id, name, sport type, member count and location. Use strava_get_club for one club's full detail.
Inputs
pageinteger- Page number to fetch, starting at 1. Combine with per_page to walk through results. Example: 2.
per_pageinteger- Number of items to return per page. Strava defaults to 30. Example: 50.
strava_list_athlete_routesList routes created by an athlete.Read-onlyList Athlete Routes
List routes created by an athlete. Returns routes with id, name, distance, elevation gain, type and map summary. Use strava_get_route for one route's full detail. Strava lists routes of the authenticated athlete; private routes need the read_all scope.
Inputs
idintegerrequired- Numeric ID of the athlete (must be the authenticated athlete). Example: 12345678.
pageinteger- Page number to fetch, starting at 1. Combine with per_page to walk through results. Example: 2.
per_pageinteger- Number of items to return per page. Strava defaults to 30. Example: 50.
strava_list_segment_effortsList the authenticated athlete's efforts on one segment, optionally within a date range.Read-onlyList Segment Efforts
List the authenticated athlete's efforts on one segment, optionally within a date range. Returns each effort with id, elapsed time, moving time, start date, activity id and rank fields. Use strava_get_segment_effort for one effort's detail. Requires a Strava subscription.
Inputs
segment_idintegerrequired- Numeric ID of the segment to list efforts for. Example: 229781.
end_date_localstring- Only return efforts on or before this ISO 8601 date-time. Example: 2025-12-31T23:59:59Z.
per_pageinteger- Number of items to return per page. Strava defaults to 30. Example: 50.
start_date_localstring- Only return efforts on or after this ISO 8601 date-time. Example: 2025-01-01T00:00:00Z.
strava_list_starred_segmentsList segments starred by the authenticated athlete.Read-onlyList Starred Segments
List segments starred by the authenticated athlete. Returns summary segments with id, name, distance, grade and location. Use strava_star_segment to star or unstar one. Requires the read scope, or read_all for private segments.
Inputs
pageinteger- Page number to fetch, starting at 1. Combine with per_page to walk through results. Example: 2.
per_pageinteger- Number of items to return per page. Strava defaults to 30. Example: 50.
strava_create_activityCreate a manual activity for the authenticated athlete.WriteCreate Manual Activity
Create a manual activity for the authenticated athlete. Returns the created activity with its id. Use this to log an activity by hand; it cannot attach GPS files. Requires the activity:write scope.
Inputs
elapsed_timeintegerrequired- Duration of the activity in seconds. Example: 1800.
namestringrequired- Title of the activity. Example: Morning Run.
sport_typestringrequired- Sport type of the activity, using Strava's sport type names such as Run, Ride, Swim, Walk, Hike or Workout. Example: Run.one of
AlpineSkiBackcountrySkiBadmintonBasketballCanoeingCricketCrossfitDanceEBikeRideEllipticalEMountainBikeRideGolfGravelRideHandcycleHighIntensityIntervalTrainingHikeIceSkateInlineSkateKayakingKitesurfMountainBikeRideNordicSkiPadelPhysicalTherapyPickleballPilatesRacquetballRideRockClimbingRollerSkiRowingRunSailSkateboardSnowboardSnowshoeSoccerSquashStairStepperStandUpPaddlingSurfingSwimTableTennisTennisTrailRunVelomobileVirtualRideVirtualRowVirtualRunVolleyballWalkWeightTrainingWheelchairWindsurfWorkoutYoga start_date_localstringrequired- Start time of the activity as an ISO 8601 date-time in the athlete's local time. Example: 2025-06-15T07:30:00Z.
commuteinteger- Set to 1 to mark the activity as a commute. Example: 1.one of
01 descriptionstring- Free-text description of the activity. Example: Easy run along the river.
distancenumber- Distance covered in meters. Example: 5000.
trainerinteger- Set to 1 to mark the activity as done on a trainer or treadmill. Example: 1.one of
01
strava_star_segmentStar or unstar a segment for the authenticated athlete.WriteStar Segment
Star or unstar a segment for the authenticated athlete. Returns the updated detailed segment. Use strava_list_starred_segments to see the current stars. Requires the profile:write scope.
- Idempotent
Inputs
idintegerrequired- Numeric ID of the segment to star or unstar. Example: 229781.
starredbooleanrequired- True to star the segment, false to remove the star. Example: true.
strava_update_activityUpdate fields of an existing activity owned by the authenticated athlete.WriteUpdate Activity
Update fields of an existing activity owned by the authenticated athlete. Returns the updated detailed activity. Use this to rename, re-describe, change sport type, set gear or toggle commute, trainer and hidden flags. Requires the activity:write scope.
- Idempotent
Inputs
idintegerrequired- Numeric ID of the activity to update. Example: 12345678901.
commuteboolean- Whether the activity is a commute. Example: true.
descriptionstring- New description for the activity. Example: Windy but fun.
gear_idstring- ID of the bike or shoes to attach, for example b12345678. Use none to clear the gear. Example: b12345678.
hide_from_homeboolean- Whether to mute the activity so it does not appear in followers' home feeds. Example: true.
namestring- New title for the activity. Example: Evening Ride.
sport_typestring- New sport type, using Strava's sport type names. Example: GravelRide.one of
AlpineSkiBackcountrySkiBadmintonBasketballCanoeingCricketCrossfitDanceEBikeRideEllipticalEMountainBikeRideGolfGravelRideHandcycleHighIntensityIntervalTrainingHikeIceSkateInlineSkateKayakingKitesurfMountainBikeRideNordicSkiPadelPhysicalTherapyPickleballPilatesRacquetballRideRockClimbingRollerSkiRowingRunSailSkateboardSnowboardSnowshoeSoccerSquashStairStepperStandUpPaddlingSurfingSwimTableTennisTennisTrailRunVelomobileVirtualRideVirtualRowVirtualRunVolleyballWalkWeightTrainingWheelchairWindsurfWorkoutYoga trainerboolean- Whether the activity was recorded on a trainer. Example: false.
strava_update_athleteUpdate the weight of the authenticated athlete.WriteUpdate Athlete Weight
Update the weight of the authenticated athlete. Returns the updated athlete profile. Use this only to change weight; Strava exposes no other editable profile field here. Requires the profile:write scope.
- Idempotent
Inputs
weightnumberrequired- New weight of the athlete in kilograms. Example: 72.5.
No tools match.