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

duration_ms suddenly returning float instead of int

Solved!

duration_ms suddenly returning float instead of int

Suddenly, the api.spotify.com/v1/tracks/{id} endpoint has started giving me track duration_ms as a float e.g.

"duration_ms": 2345.0,

The endpoint always used to return an int, which matches the documentation. Weirdly the response from the "try it" response sample still returns an int, but I think all that shows is how useless that thing is.

 

Reply
23 Replies

I tested the tracks endpoint using Postman, and everything seems to be back to normal. 

Thanks, it's looking back to normal now. I also appreciate the explanation. Considering this already happened once before (on a different endpoint, links in previous posts), can you please suggest they implement something to prevent/catch it next time?
Thanks again.

Thanks LambertSpot!

 

I’m wondering if this other issue is caused by the same thing. Seems likely. 

https://community.spotify.com/t5/Spotify-for-Developers/The-playlist-creation-endpoint-is-frequently...

This issue is fixed for me (using spotipy Python API framework).

Suggested posts

Type a product name