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

Spotify Web API

Spotify Web API

Title: How to get track listener stats via Web API?

 

Hi all,

I'm starting a project where I need to display song info, including the track name, artist, and cover art, which I can see how to get from the track object in the API.

 

My main question is about listener stats. Is there an endpoint or method available that provides data on a song's live listener count or total streams? I've looked through the documentation but haven't been able to locate a clear way to access this kind of information.

 

Any help or direction would be greatly appreciated.

Thanks!

Reply
1 Reply

Hi @YukselirEC 

Thank you for posting in the Spotify Community, and Welcome!

 

This is an interesting project idea!

To  track someone's listening streams, you can make use of the Get Currently Playing Track and the Get Recently Played Tracks endpoints. To prevent hitting a rate limit to quickly, you can send a request to the Currently Play endpoint every 30 seconds when the page is viewed, and the Recently Played endpoint every 25 minutes (and also directly when the page is visited).

Because an Access Token is only valid for 1 hour, the backend server should also store the Refresh Token that can be used to get a new Access Token.

 

If you need more explanation, feel free to ask!

Note: it is not possible anymore to get a quota extension. As a result, only successful companies can make apps publicly available. As an individual, you can still add up to 25 accounts to the whitelist of your app. There is more information on this page.

XimzendSpotify 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.

Suggested posts

Staff
Let's introduce ourselves!

Hey there you,   Yeah, you! ๐Ÿ˜   Welcome - we're glad you joined the Spotify Community!   While you here, let's have a fun game and getโ€ฆ

Staff
ModeratorStaff / Moderator/ 3 years ago  in Social & Random

Type a product name