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

Get Artist reference bug - receiving Float instead of Int

Get Artist reference bug - receiving Float instead of Int

  • Plan

Free/Premium

Country

Poland

Device

(iPhone 8, Samsung Galaxy 9, Macbook Pro late 2016)

Operating System

(iOS 10, Android Oreo, Windows 10,etc.)

 

My Question or Issue

Hi,
I'm currently creating an app that uses Spotify Web API. 
While using the "Get Artist" reference, I get JSON response that is not compatible with the Spotify Web API documentation.

In the documentation, it is said that field "followers.total" is integer, but I'm getting float. The same issue appears in fields: popularity, images.height, images.width

Example of "Get Artist" request:
curl --request GET \
--url https://api.spotify.com/v1/artists/0C8ZW7ezQVs4URX5aX7Kqx \
--header 'Authorization: Bearer ...'

Response:
 

{
"external_urls": {
"spotify": ""
},
"followers": {
"href": null,
"total": 4.7397795E7
},
"genres": [
"pop",
"post-teen pop"
],
"href": "https://api.spotify.com/v1/artists/0C8ZW7ezQVs4URX5aX7Kqx",
"id": "0C8ZW7ezQVs4URX5aX7Kqx",
"images": [
{
"url": "https://i.scdn.co/image/ab6761610000e5eb0c8eb928813cd06614c0710d",
"height": 640.0,
"width": 640.0
},
{
"url": "https://i.scdn.co/image/ab676161000051740c8eb928813cd06614c0710d",
"height": 320.0,
"width": 320.0
},
{
"url": "https://i.scdn.co/image/ab6761610000f1780c8eb928813cd06614c0710d",
"height": 160.0,
"width": 160.0
}
],
"name": "Selena Gomez",
"popularity": 82.0,
"type": "artist",
"uri": "spotify:artist:0C8ZW7ezQVs4URX5aX7Kqx"
}

 
Reply
1 Reply

Yeah same here but with the GETARTISTS endpoint, i though it was my code but i havent change it in a week (and last week it worked), examples: 1.6188865E7,1514630.0, {"artists":[{"external_urls":{"spotify":""},"followers":{"href":null,"total":1514630.0},"genres":["hip hop","pop rap","rap","underground hip hop"],"href":"https://api.spotify.com/v1/artists/6U3ybJ9UHNKEdsH7ktGBZ7","id":"6U3ybJ9UHNKEdsH7ktGBZ7","images":[{"url":"https://i.scdn.co/image/ab6761610000e5eb10781f7b76a5eb0d397e02c9","height":640.0,"width":640.0},{"url":"https://i.scdn.co/image/ab6761610000517410781f7b76a5eb0d397e02c9","height":320.0,"width":320.0},{"url":"https://i.scdn.co/image/ab6761610000f17810781f7b76a5eb0d397e02c9","height":160.0,"width":160.0}],"name":"JID","popularity":78.0,"type":"artist","uri":"spotify:artist:6U3ybJ9UHNKEdsH7ktGBZ7"},{"external_urls":{"spotify":""},"followers":{"href":null,"total":1.6188865E7},"genres":["atl hip hop","hip hop","rap"],"href":"https://api.spotify.com/v1/artists/1URnnhqYAYcrqrcwql10ft","id":"1URnnhqYAYcrqrcwql10ft","images":[{"url":"https://i.scdn.co/image/ab6761610000e5eb35ca7d2181258b51c0f2cf9e","height":640.0,"width":640.0},{"url":"https://i.scdn.co/image/ab6761610000517435ca7d2181258b51c0f2cf9e","height":320.0,"width":320.0},{"url":"https://i.scdn.co/image/ab6761610000f17835ca7d2181258b51c0f2cf9e","height":160.0,"width":160.0}],"name":"21 Savage","popularity":89.0,"type":"artist","uri":"spotify:artist:1URnnhqYAYcrqrcwql10ft"},{"external_urls":{"spotify":""},"followers":{"href":null,"total":420289.0},"genres":["trap queen"],"href":"https://api.spotify.com/v1/artists/3IJ21966TwNZI24MwZHMu4","id":"3IJ21966TwNZI24MwZHMu4","images":[{"url":"https://i.scdn.co/image/ab6761610000e5ebe7b0d119183e74ec390d7aec","height":640.0,"width":640.0},{"url":"https://i.scdn.co/image/ab67616100005174e7b0d119183e74ec390d7aec","height":320.0,"width":320.0},{"url":"https://i.scdn.co/image/ab6761610000f178e7b0d119183e74ec390d7aec","height":160.0,"width":160.0}],"name":"Baby Tate","popularity":73.0,"type":"artist","uri":"spotify:artist:3IJ21966TwNZI24MwZHMu4"}]}

Suggested posts

Type a product name