[API] User Top Tracks

Reply

[API] User Top Tracks

jhann
Casual Listener

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?

2 Replies

Re: [API] User Top Tracks

Hubo
Rock Star 16
Rock Star 16

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

HuboRock Star 16
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.

Re: [API] User Top Tracks

jhann
Casual Listener

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