Trouble getting all activities

1,957 views
Skip to first unread message

Stephen Watters

unread,
Nov 20, 2014, 4:26:35 PM11/20/14
to strav...@googlegroups.com
When calling  https://www.strava.com/api/v3/athlete/activities with an after = 0, I am only getting 30 activities when I should be getting all 50 activities. Is the return being throttled? How can I get all activities returned?

Thanks!

Paul Mach

unread,
Nov 20, 2014, 6:10:28 PM11/20/14
to Stephen Watters, strava-api
the default per_page value is 30, so that's why you're getting 30 activities. You can set per_page up to 200 like so. 


That will return all 50 of your activities. 

Dr. Paul Mach
STRAVA

On Thu, Nov 20, 2014 at 1:26 PM, Stephen Watters <stephen...@gmail.com> wrote:
When calling  https://www.strava.com/api/v3/athlete/activities with an after = 0, I am only getting 30 activities when I should be getting all 50 activities. Is the return being throttled? How can I get all activities returned?

Thanks!

--
You received this message because you are subscribed to the Google Groups "Strava API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to strava-api+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Melamane Hermanus

unread,
May 25, 2016, 4:21:08 AM5/25/16
to Strava API, stephen...@gmail.com
Hi Paul,

what is the max limit per page. I am only getting 200 activities but I want to get all the activities. when I set per_page=300 or 400, the JSON error message says {"message":"Bad Request","errors":[{"resource":"Application","field":"per page","code":"limit exceeded"}]}

Thanks

Mario Menti

unread,
May 25, 2016, 5:30:56 AM5/25/16
to strav...@googlegroups.com
I think Paul's email below mentions these numbers: default is 30, max is 200. If you have to more than 200 activities to get, you'll have to page through the requests using the page parameter. See also the "Pagination" chapter at https://strava.github.io/api/

Mario.

Melamane Hermanus

unread,
May 25, 2016, 6:37:58 AM5/25/16
to Strava API
Thanks Mario. making sense now...
Reply all
Reply to author
Forward
0 new messages