Plan
Premium
Country
India
Device
(Poco F1/M6 pro, macbook m1 pro)
Operating System
(Android, Mac os)
My Question or Issue
Hi All, I've been trying to use spotify's recently played web api endpoint to keep personal stats of songs and artists that I listen to, but I think there have been a few bugs in the response
BUG 1: Wrong songs in the response and possibly wrong value in played_at field
Below is the filtered response (played_at, and track.name) of an API call, I did not play the song 'L.S.F' even once but the API response suggests that I played it 3 times
Also note how played_at time of all the songs has seconds that end with 4(mostly 54 or 24), this also seems like a bug, as the length of all those songs can't be multiple of 30 seconds
I should also mention that the sound capsule section in the app shows the correct data, i.e. it does not show that L.S.F was played 3 times(if it was it would be in my top 5 songs of the month so far, but it is not)
Filtered Response:
2025-07-06T06:38:54.411Z Club Foot (Kasabian)
2025-07-06T06:37:54.485Z L.S.F. (Kasabian)
2025-07-06T06:37:24.668Z L.S.F. (Kasabian)
2025-07-06T06:36:54.276Z L.S.F. (Kasabian)
2025-07-06T06:34:54.369Z Figure It Out (Royal Blood)
2025-07-06T06:31:54.365Z Out of the Black (Royal Blood)
2025-07-06T06:27:54.381Z Out of the Black (Royal Blood)
2025-07-06T06:23:54.416Z Chasing Cars (Snow Patrol)
2025-07-06T06:19:34.690Z Navigating (Twenty One Pilots)
2025-07-06T06:15:54.425Z Undisclosed Desires (Muse)
2025-07-06T06:10:24.561Z Zombie (YUNGBLUD)
2025-07-06T06:06:24.513Z Ocean Avenue (Yellowcard)
2025-07-06T06:02:54.573Z Top 10 staTues tHat CriEd bloOd (Bring Me The Horizon)
2025-07-06T05:58:54.923Z Drown (Bring Me The Horizon)
2025-07-06T05:55:25.350Z The Pretender (Foo Fighters)
2025-07-06T05:50:54.437Z n/A (Bring Me The Horizon)
2025-07-06T05:47:24.551Z Swing, Swing (The All-American Rejects)
2025-07-06T05:43:24.351Z Coming Back to Life (Pink Floyd)
2025-07-06T05:37:24.400Z Coming Back to Life (Pink Floyd)
BUG 2: Extra plays of the song:
This bug is more common, here is an example in the response:
2025-07-02T05:36:42.888Z What The Water Gave Me (Florence + The Machine)
2025-07-02T02:14:57.677Z What The Water Gave Me (Florence + The Machine)
2025-07-02T01:01:55.325Z What The Water Gave Me (Florence + The Machine)
2025-07-02T00:56:25.379Z What The Water Gave Me (Florence + The Machine)
2025-07-02T00:50:55.299Z What The Water Gave Me (Florence + The Machine)
I did listen to this song on repeat but I did it 4 times and not 5, (note that played_at of the 5th play is 3 hours after the 4th play, I'm very sure I did take a 3 hour break to listen to it one more time)
This bug is more common and happens quite often(but not always) with the song I stop at. e.g if a song is on repeat and I stop playback and close the app after a few plays, I might get an extra play of that song in the API response, also it can happen even if I'm not listening to a song on repeat but I stop on a song which has just started, say it is played for a 1-2 seconds and then I stop it and close the app, that 1-2 seconds played song sometimes is also returned in the response.
Also just like BUG 1, the sound capsule section shows the correct data, i.e. in this case it shows 'What the water gave me' was played 4 times and not 5.
Are these known bug, is there anything I can do to avoid these wrong entries in the response.