开发者

Spotify API get Related Artists

Is there a way to get a list of related artists through the spotify api. Like the small li开发者_如何学编程st that displays in the actual program?

Would be very useful if so, but I am not so sure

Cheers


Yes, it's available through libspotify. There's a SPArtistBrowse class that contains a lot of metadata, including the related artists. Check out the

CocoaLibSpotify comes with a documentation package, where you can find more details on what's included: https://github.com/spotify/cocoalibspotify.

Do note that it's currently extremely slow to load an entire SPArtistBrowse object. I'm assuming it's got something to do with libspotify loading it all in one chunk and on the main thread (?). From what I know, Spotify are suppose to remedy that in an upcoming version of libspotify, though.


Get an artist's related artists is now available through the Spotify Web API.

GET https://api.spotify.com/v1/artists/{id}/related-artists is the format.

https://api.spotify.com/v1/artists/43ZHCT0cAZBISjO8DG9PnE/related-artists is an example request.

For more information, see the API documentation.

There is also a JSFiddle demo app.


Definitely! All you need is the "artist_id" and the SpotifyPublicAPI can return a list of the related artists. You don't need an access_token at all.

You can easily test the API call here on RapidAPI. I've specifically linked you to the getArtistsRelatedArtists endpoint. Rapid will provide you with a code snippet you can copy and paste directly into your code to make the call.

Here is an example testing the API call using Beyonce's artist_id:

Spotify API get Related Artists

Here is a sample code snippet provided by RapidAPI wth Beyonce's artist_id passed as a parameter:

Spotify API get Related Artists

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜