Search activities
const url = 'http://localhost:8080/api/v1/activities';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url http://localhost:8080/api/v1/activities \ --header 'Authorization: Bearer <token>'Returns activities newest first. All filters are optional
GET /api/v1/activities?filters[from]=2023-09-04&filters[to]=2023-09-04&pagination[size]=50
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”object
Only activities that started on this day or later
Only activities that started on this day or earlier
One sport type, or several separated by commas
object
Responses
Section titled “Responses”A page of activities, newest first.
object
object
Strava’s sport type vocabulary.
object
Lowercased ISO 3166-1 alpha-2.
Lowercased ISO 3166-1 alpha-2 codes, empty when not reverse geocoded.
The starting point as [latitude, longitude], null without GPS data.
Whether GET /api/v1/activities/{activityId}/gpx will return a file for this activity.
object
Where the image is served. With demo mode enabled, visitors who are not logged in get a placeholder photo instead.
object
Example
{ "activities": [ { "id": "activity-9756441741", "name": "Evening Ride", "sportType": "Ride", "worldType": "realWorld", "importSource": "stravaApi", "startDateLocal": "2023-09-04T21:05:38", "gearId": "gear-b12659861", "location": { "countryCode": "be", "state": "West-Vlaanderen", "city": "Brugge" }, "passedThroughCountries": [ "be", "nl" ], "startLatLng": [ 51.2, 3.18 ], "images": [ { "id": "activityImage-0a8cdfbb-63b4-4f0f-a09d-faedd5a00753", "url": "https://dreeve.example.com/files/activities/0a8cdfbb-63b4-4f0f-a09d-faedd5a00753.jpg" } ] } ]}Every error uses this shape.
object
A stable, machine readable code.
Examples
{ "error": "bad_request", "message": "\"filters[sportType]\" contains an unknown sport type."}The Authorization header was missing, malformed, or did not match the configured key.
Every error uses this shape.
object
A stable, machine readable code.
Examples
{ "error": "invalid_token", "message": "A valid API token is required. Send it in the Authorization header as a Bearer token."}