Announcements

Help Wizard

Step 1

NEXT STEP

"Get User's Top Items" returns tracks with no available_markets and incorrect popularity

"Get User's Top Items" returns tracks with no available_markets and incorrect popularity

Hello,

 

I made a popular website that a lot of Spotify users visit to see stats especially related to the "popularity" attribute that artists & tracks have.

 

I noticed that when hitting the https://api.spotify.com/v1/me/top/tracks endpoint, I got some tracks that had "popularity" ratings that were not accurate at all. For example, this Head and The Heart song "Lost in My Mind" shows a popularity of 1. This is incorrect, and I believe it's because the "available_markets" array is empty. 

 

"available_markets": [],
      "href": "https://api.spotify.com/v1/tracks/77hI6DJ12C9WohWk8XUhto",
      "id": "77hI6DJ12C9WohWk8XUhto",
      "name": "Lost in My Mind",
      "popularity": 1,

 However if you visit the Spotify app and search for this song and get the ID of the track, it's entirely different. This is not a case of two different tracks with the same title, both these IDs reference the same track.

 

"available_markets": [
    "AG",
    "AU",
    ...
    "US",
    "VC"
  ],
  "href": "https://api.spotify.com/v1/tracks/2A4eOWCeNZHFQnLEEJKuZX",
  "id": "2A4eOWCeNZHFQnLEEJKuZX",
  "name": "Lost in My Mind",
  "popularity": 60, 

These are two separate IDs that reference the same song, one has "available_markets" and one doesn't.

 

How come the https://api.spotify.com/v1/me/top/tracks endpoint returns the track with the wrong information instead of the correct one?

Reply
1 Reply

Suggested posts