Use Strava with AI Agents

Strava is a social fitness network and app designed for cyclists and runners.
๐Ÿ”— Connect and Use Strava
1. ๐Ÿ”‘ Connect your Strava account
2. โœ… Select an action
3. ๐Ÿš€ Go live with the agent
What do you want to do?

API actions for Strava for AI assitants/agents

Language
JS
PYTHON

Athletes

Get Athlete Stats

Returns the activity stats of an athlete. Only includes data from activities set to Everyone visibilty.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.STRAVA_GET_ATHLETE_STATS])

Get Authenticated Athlete

Returns the currently authenticated athlete. Tokens with profile:read_all scope will receive a detailed athlete representation; all others will receive a summary representation.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.STRAVA_GET_AUTHENTICATED_ATHLETE])

Update Athlete

Update the currently authenticated athlete. Requires profile:write scope.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.STRAVA_UPDATE_ATHLETE])

Get Zones

Returns the the authenticated athlete's heart rate and power zones. Requires profile:read_all.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.STRAVA_GET_ZONES])

Segments

Get Segment

Returns the specified segment. read_all scope required in order to retrieve athlete-specific segment information, or to retrieve private segments.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.STRAVA_GET_SEGMENT])

List Starred Segments

List of the authenticated athlete's starred segments. Private segments are filtered out unless requested by a token with read_all scope.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.STRAVA_LIST_STARRED_SEGMENTS])

Star Segment

Stars/Unstars the given segment for the authenticated athlete. Requires profile:write scope.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.STRAVA_STAR_SEGMENT])

Explore Segments

Returns the top 10 segments matching a specified query.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.STRAVA_EXPLORE_SEGMENTS])

SegmentEfforts

List Segment Efforts

Returns a set of the authenticated athlete's segment efforts for a given segment. Requires subscription.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.STRAVA_LIST_SEGMENT_EFFORTS])

Get Segment Effort

Returns a segment effort from an activity that is owned by the authenticated athlete. Requires subscription.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.STRAVA_GET_SEGMENT_EFFORT])

Activities

Create An Activity

Creates a manual activity for an athlete, requires activity:write scope.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.STRAVA_CREATE_AN_ACTIVITY])

Get Activity

Returns the given activity that is owned by the authenticated athlete. Requires activity:read for Everyone and Followers activities. Requires activity:read_all for Only Me activities.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.STRAVA_GET_ACTIVITY])

List Athlete Activities

Returns the activities of an athlete for a specific identifier. Requires activity:read. Only Me activities will be filtered out unless requested by a token with activity:read_all.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.STRAVA_LIST_ATHLETE_ACTIVITIES])

List Activity Laps

Returns the laps of an activity identified by an identifier. Requires activity:read for Everyone and Followers activities. Requires activity:read_all for Only Me activities.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.STRAVA_LIST_ACTIVITY_LAPS])

Get Activity Zones

Summit Feature. Returns the zones of a given activity. Requires activity:read for Everyone and Followers activities. Requires activity:read_all for Only Me activities.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.STRAVA_GET_ACTIVITY_ZONES])

List Activity Comments

Returns the comments on the given activity. Requires activity:read for Everyone and Followers activities. Requires activity:read_all for Only Me activities.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.STRAVA_LIST_ACTIVITY_COMMENTS])

List Activity Kudoers

Returns the athletes who kudoed an activity identified by an identifier. Requires activity:read for Everyone and Followers activities. Requires activity:read_all for Only Me activities.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.STRAVA_LIST_ACTIVITY_KUDOERS])

Clubs

Get Club

Returns a given club using its identifier.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.STRAVA_GET_CLUB])

List Club Members

Returns a list of the athletes who are members of a given club.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.STRAVA_LIST_CLUB_MEMBERS])

List Club Administrators

Returns a list of the administrators of a given club.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.STRAVA_LIST_CLUB_ADMINISTRATORS])

List Club Activities

Retrieve recent activities from members of a specific club. The authenticated athlete must belong to the requested club in order to hit this endpoint. Pagination is supported. Athlete profile
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.STRAVA_LIST_CLUB_ACTIVITIES])

List Athlete Clubs

Returns a list of the clubs whose membership includes the authenticated athlete.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.STRAVA_LIST_ATHLETE_CLUBS])

Gears

Get Equipment

Returns an equipment using its identifier.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.STRAVA_GET_EQUIPMENT])

Routes

Get Route

Returns a route using its identifier. Requires read_all scope for private routes.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.STRAVA_GET_ROUTE])

List Athlete Routes

Returns a list of the routes created by the authenticated athlete. Private routes are filtered out unless requested by a token with read_all scope.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.STRAVA_LIST_ATHLETE_ROUTES])

Export Route Gpx

Returns a GPX file of the route. Requires read_all scope for private routes.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.STRAVA_EXPORT_ROUTE_GPX])

Export Route Tcx

Returns a TCX file of the route. Requires read_all scope for private routes.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.STRAVA_EXPORT_ROUTE_TCX])

Uploads

Upload Activity

Uploads a new data file to create an activity from. Requires activity:write scope.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.STRAVA_UPLOAD_ACTIVITY])

Get Upload

Returns an upload for a given identifier. Requires activity:write scope.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.STRAVA_GET_UPLOAD])

Streams

Get Activity Streams

Returns the given activity's streams. Requires activity:read scope. Requires activity:read_all scope for Only Me activities.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.STRAVA_GET_ACTIVITY_STREAMS])

Get Segment Effort Streams

Returns a set of streams for a segment effort completed by the authenticated athlete. Requires read_all scope.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.STRAVA_GET_SEGMENT_EFFORT_STREAMS])

Get Segment Streams

Returns the given segment's streams. Requires read_all scope for private segments.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.STRAVA_GET_SEGMENT_STREAMS])

Get Route Streams

Returns the given route's streams. Requires read_all scope for private routes.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.STRAVA_GET_ROUTE_STREAMS])

Frequently asked questions

What is Composio.dev?

Composio.dev is a platform for building AI applications, designed to make the process of developing AI solutions super easy and fun! It provides a comprehensive set of tools and libraries that simplify the process of developing AI solutions, allowing you to focus on the creative aspects of your project without getting bogged down by the technical details.

How does Composio.dev support Strava?

Composio.dev seamlessly integrates with Strava, allowing you to leverage its capabilities within the Composio.dev platform. You can utilize Strava to call functions across various platforms, including Google, GitHub, and others, making it a breeze to incorporate different services into your AI applications. Additionally, it supports user authentication via OAuth2 and can work in conjunction with other popular frameworks like LangChain and CrewAI, giving you the flexibility to build truly innovative AI solutions.

What models can I use with Strava?

With Strava, you have access to a wide range of state-of-the-art language models, including GPT-4o (OpenAI), GPT-3.5 (OpenAI), GPT-4 (OpenAI), Claude (Anthropic), PaLM (Google), LLaMA and LLaMA 2 (Meta), Gemini, and many others. This flexibility allows you to choose the model that best suits your specific use case, whether you're building a chatbot, a content creation tool, or any other AI-powered application. You can experiment with different models and find the one that delivers the best performance for your project.

How can I integrate Strava into my project?

Composio.dev provides a seamless integration for Strava, making it super easy to incorporate this powerful framework into your projects. You can leverage the Composio.dev API to call functions from Strava, allowing you to tap into its capabilities with just a few lines of code. The SDK is available in Python, JavaScript, and TypeScript, so you can work with your preferred programming language and integrate Strava into your projects seamlessly.

What is the pricing for Strava?

Strava is completely free to use, with a generous free tier that allows up to 1000 requests per month. This makes it accessible for developers and organizations of all sizes to explore and experiment with this powerful tool without any upfront costs. Whether you're a student working on a personal project or a startup building the next big thing, you can get started with Strava without worrying about breaking the bank.

What kind of authentication is supported for Strava?

Strava supports OAuth2 authentication, ensuring secure and authorized access to its functionalities. You can leverage the Composio.dev API to handle authentication and call functions from Strava seamlessly. The SDK is available in Python, JavaScript, and TypeScript for your convenience, making it easy to integrate authentication into your projects and keep your users' data safe and secure.

Can I add Strava to my project?

Absolutely! You can easily incorporate Strava into your project by utilizing the Composio.dev API. This API allows you to call functions from Strava, enabling you to leverage its capabilities within your application. The SDK is available in Python, JavaScript, and TypeScript to facilitate integration, so you can work with the language you're most comfortable with and add Strava to your project with ease.

What is the accuracy of Strava?

Strava is designed to provide highly accurate and reliable results, ensuring that your AI applications perform at their best. The integration with Composio.dev ensures precise function calls, enabling you to build robust and powerful AI applications with confidence. Strava's comprehensive framework and the ability to leverage state-of-the-art models ensure reliable and accurate outcomes for your AI development needs, whether you're working on a chatbot, a content creation tool, or any other AI-powered project.

What are some common use cases for Strava?

Strava can be used for a wide range of AI applications, making it a versatile tool for developers and creators alike. Some common use cases include natural language processing, text generation, question answering, sentiment analysis, and more. It's particularly useful for building chatbots, virtual assistants, content creation tools, and other AI-powered applications that can help you automate tasks, engage with users, and create compelling content. Whether you're working on a personal project or building a product for your startup, Strava can help you bring your ideas to life.

How does Strava handle data privacy and security?

Data privacy and security are crucial considerations when working with AI systems, and Strava takes these issues seriously. It follows industry best practices and adheres to strict data protection regulations, ensuring that your data is kept safe and secure. Strava provides robust security measures, such as encryption and access controls, to ensure the confidentiality and integrity of your data. You can rest assured that your sensitive information is protected when using Strava for your AI development needs.
+ Integrate seamlessly with your agentic frameworks
Composio Works with All Shapes and SizesComposio Works with All Shapes and SizesComposio Works with All Shapes and SizesComposio Works with All Shapes and SizesComposio Works with All Shapes and Sizes
Building for AI across continents๐Ÿงช