Type in your question below and we'll check to see what answers we can find...
Loading article...
Submitting...
If you couldn't find any answers in the previous step then we need to post your question in the community and wait for someone to respond. You'll be notified when that happens.
Simply add some detail to your question and refine the title if needed, choose the relevant category, then post.
Before we can post your question we need you to quickly make an account (or sign in if you already have one).
Don't worry - it's quick and painless! Just click below, and once you're logged in we'll bring you right back here and post your question. We'll remember what you've already typed in so you won't have to do it again.
Please see below the most popular frequently asked questions.
Loading article...
Loading faqs...
Please see below the current ongoing issues which are under investigation.
Loading issue...
Loading ongoing issues...
Hi all, I've found the following inconsistency in API endpoint response format:
when I request the endpoint Get Track, I get the response formatted pretty and all integer values are presented like the should be (without any floating points):
$ curl -s --request GET \
--url "https://api.spotify.com/v1/tracks/11dFghVXANMlKmJXsNCbNl" \
--header "Authorization: Bearer $TOKEN"
{
"album" : {
"album_type" : "single",
"artists" : [ {
"external_urls" : {
"spotify" : "https://open.spotify.com/artist/6sFIWsNpZYqfjUpaCgueju"
},
"href" : "https://api.spotify.com/v1/artists/6sFIWsNpZYqfjUpaCgueju",
"id" : "6sFIWsNpZYqfjUpaCgueju",
"name" : "Carly Rae Jepsen",
"type" : "artist",
"uri" : "spotify:artist:6sFIWsNpZYqfjUpaCgueju"
} ],
"available_markets" : [ ],
"external_urls" : {
"spotify" : "https://open.spotify.com/album/0tGPJ0bkWOUmH7MEOR77qc"
},
"href" : "https://api.spotify.com/v1/albums/0tGPJ0bkWOUmH7MEOR77qc",
"id" : "0tGPJ0bkWOUmH7MEOR77qc",
"images" : [ {
"height" : 640,
"url" : "https://i.scdn.co/image/ab67616d0000b2737359994525d219f64872d3b1",
"width" : 640
}, {
"height" : 300,
"url" : "https://i.scdn.co/image/ab67616d00001e027359994525d219f64872d3b1",
"width" : 300
}, {
"height" : 64,
"url" : "https://i.scdn.co/image/ab67616d000048517359994525d219f64872d3b1",
"width" : 64
} ],
"name" : "Cut To The Feeling",
"release_date" : "2017-05-26",
"release_date_precision" : "day",
"total_tracks" : 1,
"type" : "album",
"uri" : "spotify:album:0tGPJ0bkWOUmH7MEOR77qc"
},
"artists" : [ {
"external_urls" : {
"spotify" : "https://open.spotify.com/artist/6sFIWsNpZYqfjUpaCgueju"
},
"href" : "https://api.spotify.com/v1/artists/6sFIWsNpZYqfjUpaCgueju",
"id" : "6sFIWsNpZYqfjUpaCgueju",
"name" : "Carly Rae Jepsen",
"type" : "artist",
"uri" : "spotify:artist:6sFIWsNpZYqfjUpaCgueju"
} ],
"available_markets" : [ ],
"disc_number" : 1,
"duration_ms" : 207959,
"explicit" : false,
"external_ids" : {
"isrc" : "USUM71703861"
},
"external_urls" : {
"spotify" : "https://open.spotify.com/track/11dFghVXANMlKmJXsNCbNl"
},
"href" : "https://api.spotify.com/v1/tracks/11dFghVXANMlKmJXsNCbNl",
"id" : "11dFghVXANMlKmJXsNCbNl",
"is_local" : false,
"name" : "Cut To The Feeling",
"popularity" : 0,
"preview_url" : null,
"track_number" : 1,
"type" : "track",
"uri" : "spotify:track:11dFghVXANMlKmJXsNCbNl"
}%
Same with the other API endpoints and this is OK.
But when I request Get Artist endpoint, then I get the response in a kind of raw form (not formatted with new line characters and extra spaces) where integer values are presented like float point numbers:
$ curl -s --request GET \
--url "https://api.spotify.com/v1/artists?ids=5K4W6rqBFWDnAN6FQUkS6x" \
--header "Authorization: Bearer $TOKEN"
{"artists":[{"external_urls":{"spotify":"https://open.spotify.com/artist/5K4W6rqBFWDnAN6FQUkS6x"},"followers":{"href":null,"total":2.3015237E7},"genres":["chicago rap","hip hop","rap"],"href":"https://api.spotify.com/v1/artists/5K4W6rqBFWDnAN6FQUkS6x","id":"5K4W6rqBFWDnAN6FQUkS6x","images":[{"url":"https://i.scdn.co/image/ab6761610000e5eb867008a971fae0f4d913f63a","height":640.0,"width":640.0},{"url":"https://i.scdn.co/image/ab67616100005174867008a971fae0f4d913f63a","height":320.0,"width":320.0},{"url":"https://i.scdn.co/image/ab6761610000f178867008a971fae0f4d913f63a","height":160.0,"width":160.0}],"name":"Kanye West","popularity":91.0,"type":"artist","uri":"spotify:artist:5K4W6rqBFWDnAN6FQUkS6x"}]}%
This is probably an inconsistency in the API endpoints behaviour - please pay some attention.
Plan
Premium
Country
Poland
The correct curl to get an art is:
$ curl -s --request GET \
--url "https://api.spotify.com/v1/artists/5K4W6rqBFWDnAN6FQUkS6x" \
--header "Authorization: Bearer $TOKEN"
you don't need to have an `ids` param
You can use the both paths (api.spotify.com/v1/artists/<artist_id> or api.spotify.com/v1/artists?ids=<artist_ids>) - it doesn't matter in this case as the format inconsistency in the responses is still there.
There seems to be a problem with the Get Artist(s) endpoint. Different users are reporting problems about it returning floats instead of integers.
Yeah im having the same problem and spotify doesnt address it or comment on it!
Well, they did have 3 massive layoffs this year.
Add a `ME TOO` to the issue
I am getting this issue too on the https://api.spotify.com/v1/artists endpoint.
Me too
I am also having this issue where the integer values become floating point.
I am using the Get Track endpoint.
The fields include: image width and height, album disc number, duration ms, track number and popularity
Im getting a :
'name': artist_response['name'],
~~~~~~~~~~~~~~~^^^^^^^^
KeyError: 'name'
error. i dont really understand why since it was working for a while before, but since this morning I tried to figure out the issuse and nothing I could do so far. If anyone knows a way to fix this let me know I would appreciate it. I am using django and react.
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…