Search API Connector Documentation
Import Strava Data to Google Sheets
In this guide, we’ll walk through how to pull Strava data data directly into Google Sheets, using the API Connector add-on for Sheets. Strava is, of course, a well-known fitness tracker website and app.
- Before You Begin
- Part 1: Connect to the Strava API
- Part 2: Pull Data from Strava to Sheets
- Part 3: Create a Custom API Request
- Part 4: Handle Pagination
- Part 5: API Documentation
Before You Begin
Click here to install the API Connector add-on from the Google Marketplace.
Part 1: Connect to the Strava API
The easiest way to get started with the Strava API is through API Connector’s built-in integration.
- Select Strava from the drop-down list of applications
- Under Authorization, click Connect to Strava
- You will be directed to strava.com and asked to sign in, if you haven't already. You'll also be asked to authorize the connection.
- You'll then be returned to your Google Sheet, and can verify that your Strava connection is active.
Part 2: Pull Data from Strava to Sheets
Now that we’re connected, let’s pull some data into Sheets.
- Under Endpoint, choose
/athleteto get data about yourself.
- Select a destination sheet, name your request, and click Run.
Alternatively, you can create a custom request instead of using API Connector’s built-in integration, using any of the endpoints and parameters shown in the API documentation.
Here's an example request setup:
- Request URL:
Note Strava's limits on the number of records returned on a response. By default, only 30 records will be returned unless you use pagination handling as described in their documentation.
This means that to get 200 records, you’d use the 'per_page' parameter, and to return more than 200 you’d then make subsequent requests using the 'page' parameter.
With API Connector you can loop through these automatically with pagination handling, like this:
- Pagination type:
- Page parameter:
- Run until: choose when to stop fetching data
Part 5: API Documentation
To see more API endpoints and example responses, check out the Strava API playground located at https://developers.strava.com/playground/.
Also, check out this video from Scott for more ideas on using the Strava API: https://www.youtube.com/watch?v=c4kKao0hGO4