← Back to Projects

Strava API Data Extraction

Python project that connects to the Strava API to extract personal athlete data such as activity, segments, routes and club metrics using asynchronous requests to improve performance, and stores the results as CSV files for further analysis.

Problem

I needed an automated and reproducible way to extract my Strava training data for personal analytics. Strava's web dashboard provides limited export options, and manual downloads are inefficient for continuous tracking

Solution

Developed a Python script that authenticates with the Strava API using OAuth, retrieves activity details such as distance, moving time, pace, map coordinates, and elevation, and stores the data in clean files. The workflow supports paginated extraction and automatic token refresh.

Impact

Enabled consistent and automated collection of training metrics, making it easy to track performance trends, build custom dashboards, and integrate the data into external tools such as Power BI or Jupyter notebooks.

Tech Stack Used

PythonAPIOAuthAsynchronous Requests

Key Challenges & Learnings

  • Managing OAuth token refresh to ensure uninterrupted API access
  • Handling Strava API rate limits during large historical data extraction
  • Structuring activity data consistently across multiple activity types
  • Hands-on experience working with OAuth-secured APIs
  • Improved understanding of pagination and rate-limit handling in REST APIs
  • Learned how to organize raw fitness activity data for deeper analytics

Screenshots