I’m having trouble getting the correct follower count from Spotify playlists through their API. Most of the time it just shows zero followers, but if I open the playlist manually first, then the API returns the right number.
Is there a way to make the playlist load properly through code so it shows the real follower count? I tried using different methods but nothing seems to work.
Yeah, this is a known Spotify API quirk. It’s not a caching issue - the API just doesn’t prioritize follower data when fetching playlist info. When you open the playlist manually in Spotify, it forces a full refresh and grabs all the metrics, which is why the numbers show up correctly then.
I hit this same problem building a music app. What worked for me was hitting the playlist tracks endpoint first, then immediately calling the main playlist endpoint. The extra API activity seems to kick it into loading everything properly.
One more thing - Spotify’s API will sometimes hide follower counts entirely if they’re below certain thresholds. So if you’re testing with smaller playlists, that might explain why you’re getting zeros across the board.
Try hitting the API multiple times instead of using watchers. I usually call the playlist endpoint twice with a short delay - first call primes it, second gets the real data. Works way better than sitting around waiting with long timeouts.
Had this exact issue building a playlist analytics tool last year. It’s not really caching - the follower count loads async after the initial playlist object comes back. Your setTimeout’s on the right track but 8 seconds might not cut it for bigger playlists. I kept polling the follower count until it wasn’t zero or undefined anymore. Large playlists can take 15+ seconds sometimes. I’d check every 2-3 seconds with a 30 second max timeout so you don’t get stuck in a loop. Also heads up - private playlists or ones with restricted visibility always return zero followers through the API, even when they actually have followers. Test with public playlists that show follower counts in the Spotify client.
Yeah, Spotify’s API is annoying with cached data. I’ve hit this building music dashboards too.
This is super common - follower counts get cached and don’t update live. Delays or watchers won’t fix it.
Don’t fight the API directly. Automate it instead. Set up something that polls regularly, handles the caching automatically, and gives you clean counts when you need them.
I use Latenode for this exact thing. Create a workflow that grabs playlist data on schedule, stores results, and handles retries when the API serves stale data. Way cleaner than debugging timing issues.
Set it once and you’re done. No more manual playlist opening or weird delays.
yeah, sounds like the API might be caching the follower count. maybe try adding a force refresh parameter, if there’s one. also, check if there’s a dedicated endpoint for follower stats instead of querying the whole playlist.
Good point API caching can definitely cause follower counts to appear outdated. While working around this, it’s also handy to keep your playlists backed up or transferred across platforms. Tools like MusConvtool can move your playlists from Spotify to Apple Music, YouTube, Tidal, and more, so you don’t lose track of your data while troubleshooting API quirks