Segment Leaderboards currently don't deliver athlete_id or effort_id (/segments/{id}/leaderboard)

2,490 views
Skip to first unread message

Benjamin Gniza

unread,
Jan 18, 2018, 5:31:16 AM1/18/18
to Strava API
I'm currently facing the problem, that the segment-leaderboard endpoint does not provide data according to the docs.
{
 
"effort_count": 53,
 
"entry_count": 53,
 
"kom_type": "kom",
 
"entries": [
   
{
     
"athlete_name": "Tobi C.",
     
"elapsed_time": 30,
     
"moving_time": 30,
     
"start_date": "2016-11-25T06:19:16Z",
     
"start_date_local": "2016-11-25T07:19:16Z",
     
"rank": 1
    },
   
{
     
"athlete_name": "Alice W.",
...]}

As you can see the athlete_name is shortened and there are many fields missing which are mentioned here: https://developers.strava.com/docs/reference/#api-Segments-getLeaderboardBySegmentId

Is this a privacy change or a bug?!

Best regards
Benjamin

Brendan Asselstine

unread,
Jan 18, 2018, 11:37:16 AM1/18/18
to Strava API
I'm encountering the same problem.  Please advise Strava!

Craig Jarratt

unread,
Jan 18, 2018, 11:47:47 AM1/18/18
to Strava API
Just coincided with me deleting code, troubleshooting nightmare.

Leszek Jezierski

unread,
Jan 18, 2018, 3:06:24 PM1/18/18
to Strava API

Same here, sent last 2hrs debugging...athleteId returs 0, AthleteName shortened etc. Not happy at all!

Benjamin Gniza

unread,
Jan 19, 2018, 1:13:16 AM1/19/18
to Strava API
There is a new entry in the changelog:

January 17, 2018
Athlete-specific data requires authentication.

Sounds like they changed some privacy stuff. Let's hope our problem is just a bug and not intentional.. 
Message has been deleted

Benjamin Gniza

unread,
Jan 19, 2018, 1:26:45 AM1/19/18
to Strava API
Oh snap, they even changed the documentation :(
As you can see, our required fields are no longer present in the API.

Thanks Strava, now my app is completely broken..

Brendan Asselstine

unread,
Jan 19, 2018, 2:02:23 AM1/19/18
to Strava API
Wow.  Three months of work on an iOS app and now this.

What's unfortunate is that the data is plainly visible on the Strava dashboard; the API receives an altered, second-tier subset of the data.  As a user I would wonder why it can't see the same data...the user doesn't have to authenticate on behalf of the other athletes, why should the API?

I'm really disappointed.  What a waste of time.

Leszek Jezierski

unread,
Jan 19, 2018, 3:00:00 AM1/19/18
to Strava API
I hop its just a joke...6 months on dev on and off and now this? I still see old Segment leaderboard here, though:

Hobson

unread,
Jan 19, 2018, 3:50:29 AM1/19/18
to Strava API
Yay, this change has completely broken core functionality of my app. While all I need is just association between leaderboard entry and athlete, I am somewhat able to do this based on 'public name' property, but this will be really, really sloppy as it's probably not unique and very prone to collisions :(

Sorry to say that, but this change and the way it was announced (not!) has completely just taken away all my will to develop any StravaAPI app any further :( There is so many things that went wrong here, starting with announcment, to marking API as deprecated for us to change, to probably broken design itself,  to staff's reaction to the 'incident'... :(


It's just not how you introduce changes to public API :)



Best Regards,
    Maciek

Tomas Buxton

unread,
Jan 19, 2018, 5:52:42 AM1/19/18
to Strava API

This has also broken my app. I may be able to work round it, but annoyed it was not communicated earlier (or at all) giving us a chance to find a fix before the data was just taken away 

Also I really want to understand for this particular case why the athlete's name, athelete_id and effort_id have been removed when they are, as you say, plainly visible on the Strava dashboard.

Benjamin Gniza

unread,
Jan 19, 2018, 3:58:50 PM1/19/18
to Strava API
I submitted an incident to the Strava support. Elle from the Support Team will forward it to the dev-Team. She also included part of an internal post from the dev-Team:
Hi Support. A little later this afternoon I will turn on a feature that restricts access to unauthenticated athletes' data via the API. All affected application owners have received an email with a head's up about this change, but there will undoubtedly be some folks who are unprepared for it. Please forward any tickets about changes to the API to devel...@strava.com, and we'll make sure they're handled appropriately.
 
This is the change mentioned by the quote:

Hello Developer,
We’ve made some changes to the Strava API that may affect your app. Please check our developer page for more info. 

Thank you for being a part of the Strava developer community. 

Strava API Team


I would not expect such a change by reading the news. Especially since it sounds like just unauthenticated requests are limited.

Let's keep our fingers crossed that this is an unwanted side effect. 

Brendan Asselstine

unread,
Jan 19, 2018, 4:08:31 PM1/19/18
to Strava API
You got a response?  Excellent.  I've sent emails before that have never received a response. 

Thanks for posting the exchange Benjamin, please keep us informed.

Leszek Jezierski

unread,
Jan 20, 2018, 9:36:26 AM1/20/18
to Strava API
Great, thanks for that! 

Chris Bell

unread,
Jan 21, 2018, 5:15:04 AM1/21/18
to Strava API
Somewhat annoying. I got an email saying the API was changing but frankly it wasn't clear exactly what was changing. Fortunately it's not critical to my app but it does make it less useful. But if this was done for privacy reasons, anyone wanting to get hold of this data for nefarious reasons can just screen scrape the Strava website so it seems fairly ineffective

Volodymyr Lavrynovych

unread,
Jan 21, 2018, 2:35:45 PM1/21/18
to Strava API
Hello, I also facing same problem.

This change is more like V4, but not a minor change for V3. Strava Developers, it's a serious change! It completely breaks the logic of my application. Why authorized user cannot see full leaderboard information? And please explain to me how can I match my user with record in the leaderboard to highlight him? Especially when we have the following list:
  • John Doe
  • John Drake
  • John Drew
In a result we will heve this:
  • John D.
  • John D.
  • John D.

Very informative! And where are thumbnails?
I want to remind that my user is already authenticated and he can see all this information using Strava. Why should we write our own applications for Strava if we cannot calculate and show to user any new information?

Really disappointed. ((

Tor L

unread,
Jan 22, 2018, 2:33:06 AM1/22/18
to Strava API
@Strava

When can we trust your documentation?

Flo

unread,
Jan 28, 2018, 2:55:44 PM1/28/18
to Strava API
Same problem for me.... The fact that the athlete_id is not filled anymore by Strava, leaderboards entries are unusable....
So disappointed, 6 months that I was working on an app and now everithing is broken.
And it seems thats strava don't care anymore to this API, the documentation is completely obsolete.....
Please Strava Team, restore a functionnal leaderboard api!!

Nuno Borges

unread,
Jan 29, 2018, 9:05:41 AM1/29/18
to Strava API
Well, i just started my app, and i guess my reaction to the return JSON on this call was 'surprise'. I caught myself doing string comparisons just to isolate the user in my club. Fortunately, i don't have users with the identical form of "<first name> <last initial>.", but i can see how this will create thousands of collisions for the wider athlete base. Now i understand that we had far more information in the past, and it's a shame it was taken away.

As long as i have this data publicly available (athlete_id & activity_id), the API should expose the same content availability.
https://www.strava.com/segments/16730888 (example: mike fay has a secured profile "must request to follow")
1. hover over his user name to see his athlete_id
2. click his dated ride to get access to his activity_id

In my case, im just trying to create leaderboards for club athletes, who have all given authorization to post activities in the club feed. I feel that the API is unnecessarily constraining here.

Nuno 

Nick Baker

unread,
Jan 31, 2018, 11:37:01 AM1/31/18
to Strava API
I've also noticed that the /segments/<id>/leaderboard endpoint now returns occasional duplicates, e.g. for:

/segments/2226706/leaderboard returns the following duplicates:

Duncan M.,86,86,2016-08-28T07:42:34Z,2016-08-28T08:42:34Z,574 (2 duplicates)

Jason E.,141,2022,2016-07-10T09:22:28Z,2016-07-10T10:22:28Z,2261 (2 duplicates)

Alec K.,144,3515,2016-09-24T09:50:30Z,2016-09-24T10:50:30Z,2665 (2 duplicates)

At least one of these is within a single response / 'page' so I don't think it's a paging problem on our side...

Volodymyr Lavrynovych

unread,
Feb 2, 2018, 10:29:41 AM2/2/18
to Strava API
Excellent! No response from Strava and no ability to switch back to the previous version. I am sad.

Limitless86

unread,
Feb 5, 2018, 5:14:56 AM2/5/18
to Strava API
I would take an educated guess that athlete_id has been removed from segment leaderboard requests for GDPR compliance. 

At a minimum it would be useful to have a way to search athletes based on the display name, right now you can't perform an athlete request without explicitly defining the athlete_id.

Cameron Clamp

unread,
Feb 5, 2018, 5:57:48 PM2/5/18
to Strava API
I doubt that it is due to GDPR compliance, all the information and more is easily collected clicking through their user web interface. Developers are better off running Web scraping methods than using the API now.

Jerry Perullo

unread,
Feb 8, 2018, 8:22:21 PM2/8/18
to Strava API
It could be GDPR, believe it or not.  When it comes to global regs people often panic, misinterpret, and in general manifest results in the worst way possible.  If they were really spooked by GDPR, it would have been very cool of them to use the billing address of each athlete to only redact the info for those in the EU, to spur some grassroots understanding of what these regs do.
But I digress.  Back to the thread, another vote/hand in the air here - app totally depth-charged/destroyed by the lack of athlete_id in leaderboard.  If you aren't familiar with my app, it's sranks.com, last code change Nov 2 2014, humming along every since then through Jan 17.  Now pretty destroyed.  That said, I'm not going to pile on and belly ache about notification and "how could they do this" and all that - we were always having a laugh at their mercy and it was always understood it could/would blow up at a moment's notice.  Alas.  I wrote them just to take a flyer - who knows if maybe they will do something with it.

Nic Bathgate

unread,
Feb 11, 2018, 4:54:09 AM2/11/18
to Strava API
I'm in the same boat as everyone else. 3 months app development in the trash due to this very poorly communicated and sudden API change. This could be a result of the backlash Strava has had from the US Govt over their heatmap revealing military base locations...

@Jerry Perullo your app is awesome, I hadn't seen it till now, but my project is very similar, but shows a map with all segments in the city drawn on and labeled by KOM/CR holder, with the leaderboard for the city filterable by club, so you can see how you compare to your club mates in your city. Have you had many requests over the years to add more cities to your site? One problem I hadn't solved was discovering and caching up to date leader boards for new cities required a huge number of API requests.

Useful segment discovery and ranking apps are seriously lacking due to the already poor segment APIs (segment explorer), this latest change will only make the situation worse :(

Jerry Perullo

unread,
Feb 11, 2018, 10:48:42 AM2/11/18
to Nic Bathgate, Strava API
Thanks Nic!
Yeah - I had the same challenges. While the core interactive app after oauth etc is PHP against MySQL (and some RDS), loading the segments in is quite... draconian. I have a PERL program running on cron daily for each city. Strava and I discussed the notion of having a call that would return all segments based on coordinate (and maybe some filter) but that never came through. So instead I have this draconian algorithm that queries hundreds of decreasing radius overlapping squares. 


--
You received this message because you are subscribed to a topic in the Google Groups "Strava API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/strava-api/SsL2ytxtZng/unsubscribe.
To unsubscribe from this group and all its topics, send an email to strava-api+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Nic Bathgate

unread,
Feb 12, 2018, 3:54:16 AM2/12/18
to Strava API
That's unfortunate Strava never followed through with the get all segments near a coordinate call, that would have saved me a lot of time writing an algorithm probably nearly the same as your Perl one using the segment explorer API!

Alas, need to think of a new project to work on now, thinking I had better avoid the Strava API this time though :(

Mark Stubbs

unread,
Mar 11, 2018, 1:45:37 AM3/11/18
to Strava API

Hi Nick,

I noticed the same thing, it appears that what is happening with leaderboards is that for every page requested there are 5 extra entries, one being the authenticated user's PR entry and the others being the two either side. for example, my position on a certain segment leaderboard is 2159, if I request the leaderboard with the per_page parameter set to 10, it returns the top 10 from the leaderboard plus the entries that are at position 2157, 2158, 2159(mine), 2160, 2161. Therefore requesting multiple pages of the same leaderboard returns these 5 extras once for each page requested.  Fortunately, these 5 extra entries per page come at the ends of the pages, so you can create a function to ignore them.  

Sergey Minaev

unread,
Mar 31, 2018, 7:51:37 PM3/31/18
to Strava API
I'm facing this problem and it sucks. I can't get activity ID and athlete ID from club activities. This means I can't identify an activity. For example athlete can rename an activity and crop it a bit and there's no more way to see that this is the same activity.

Naaman Campbell

unread,
May 8, 2018, 7:56:02 AM5/8/18
to Strava API
By setting context_entries and per_page to 0, I'm able to return the segment leaderboard entry for the authenticated user (and only the authenticated user):

Reply all
Reply to author
Forward
0 new messages