Announcements

Help Wizard

Step 1

NEXT STEP

FAQs

Please see below the most popular frequently asked questions.

Loading article...

Loading faqs...

VIEW ALL

Ongoing Issues

Please see below the current ongoing issues which are under investigation.

Loading issue...

Loading ongoing issues...

VIEW ALL

[API] User Top Tracks

[API] User Top Tracks

Hi, I'm currently using the web API to build a stat display for user listening habits. In the docs it claims:

 

 

For each time range, the top 50 tracks and artists are available for each user. In the future, it is likely that this restriction will be relaxed. This data is typically updated once each day for each user

 

 

 

Is there a way to bypass this restriction, or otherwise a time-frame on when it will be lifted? 50 tracks is hardly a good sample size to work with for providing comprehensive statistics. The way authentication is set up it should be possible to provide this to certain apps after they've been registered in the developer site.

 

The docs also claim that these numbers are calculated based on "Affinity" which is:

 

 

A measure of the expected preference a user has for a particular track or artist.  It is based on user behavior, including play history, but does not include actions made while in incognito mode.

 

 

 

Is there any more comprehensive documentation on how that is actually calculated? The weight of times skipped vs times played etc?

Reply
2 Replies

Hey @jhann, thanks for reaching out here!

 

Hmm, I'm afraid there's no timeframe for this.  If this is something you'd like to see, I recommend creating a new idea on the Spotify Community. That way, Spotify can keep track of it.

 

Affinity is a number calculated based on the play history. It is used to determine the expected preference for a track or artist.

 

Let me know if you have any questions.

 

Happy coding,

Hubo

HuboSpotify Star
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.

Thanks for your response! Is there any way you could be more specific than the play history? I'm working under the assumption that this is a weighted score based on factors such as times played, times skipped, length of track, and possibly other metrics but I'd like to have a little more insight on how the determination is made as Im deciding how best to represent user preferences. Or is it literally calculated based on the users play count for a track alone?

Its been quite difficult to find detailed documentation on this, thanks for the help!

Suggested posts