Reputation: 7094
I am able to view all the tracks on spotify by calling this url:
A sample response contains the artist data for each track, like:
[artists] => Array
(
[0] => stdClass Object
(
[href] => spotify:artist:38IfmizrHTCxFjd8UKhWnp
[name] => Husman
)
)
From the above response, i get the artist ID as: 38IfmizrHTCxFjd8UKhWnp.
Now, is there a way to get all the tracks of the above artist (38IfmizrHTCxFjd8UKhWnp), with an api call ?
What i am trying to do is, i would like to display the tracks for each artist in my application.
I see that we can fetch the albums of an artist, with a call like:
http://ws.spotify.com/lookup/1/?uri=spotify:artist:4YrKBkKSVeqDamzBPWVnSJ&extras=albumdetail
But i found that there is no direct way of fetching the tracks of an artist, with the api.
Upvotes: 2
Views: 8386
Reputation: 65
Since the official advanced syntax is broken right now, you can find it in the web-archive: http://web.archive.org/web/20120704131650/http://www.spotify.com/us/about/features/advanced-search-syntax/
Upvotes: 1
Reputation: 3061
AFAIK, all you can do is a name-based track search, e.g. http://ws.spotify.com/search/1/track.json?q=artist:Madonna or any other search from the Advanced Search Syntax.
The link to the Advanced Search Syntax seems to be broken at the moment, but you should be able to look at this cached version.
If you're looking to make more powerful queries, I'd really suggest you have a look at The Echonest's API. It's quite awesome, and has supports for working with Spotify URI:s. Also, it's being continuously developed, whereas the web API Spotify's provided hasn't really evolved in the past years (but maybe it will, who knows).
Upvotes: 2
Reputation: 4137
In the Spotify Developer Home i found this ( https://developer.spotify.com/technologies/web-api/ )
http://ws.spotify.com/search/1/artist?q=38IfmizrHTCxFjd8UKhWnp
Maybe help.
Upvotes: 0