目前还没有办法检索使用Spotify的网络API的封面图案。 是否有计划来实现这些或任何变通办法?
Answer 1:
2014年6月17日:
今天的Spotify发布了一个新的Web API 。
现在可以方便地检索封面图案,因为所有端点包括阵列images
的每一个item
。
搜索示例:
curl -X GET "https://api.spotify.com/v1/search?q=tania%20bowra&type=artist"
{
"artists" : {
...
"items" : [ {
...
"images" : [ {
"height" : 640,
"url" : "https://d3rt1990lpmkn.cloudfront.net/original/f2798ddab0c7b76dc2d270b65c4f67ddef7f6718",
"width" : 640
}, {
"height" : 300,
"url" : "https://d3rt1990lpmkn.cloudfront.net/original/b414091165ea0f4172089c2fc67bb35aa37cfc55",
"width" : 300
}, {
"height" : 64,
"url" : "https://d3rt1990lpmkn.cloudfront.net/original/8522fc78be4bf4e83fea8e67bb742e7d3dfe21b4",
"width" : 64
...
} ],
...
}
}
老答案:
你可以通过调用Spotify的服务透过oEmbed得到的URL封面:
https://embed.spotify.com/oembed/?url=spotify:track:6bc5scNUVa3h76T9nvpGIH
https://embed.spotify.com/oembed/?url=spotify:album:5NCz8TTIiax2h1XTnImAQ2
https://embed.spotify.com/oembed/?url=spotify:artist:7ae4vgLLhir2MCjyhgbGOQ
随着JSONP:
https://embed.spotify.com/oembed/?url=spotify:artist:7ae4vgLLhir2MCjyhgbGOQ&callback=callme
http://open.spotify.com/
网址以及工作:
https://embed.spotify.com/oembed/?url=http://open.spotify.com/track/6bc5scNUVa3h76T9nvpGIH
{
"provider_url": "https:\/\/www.spotify.com",
"version": "1.0",
"thumbnail_width": 300,
"height": 380,
"thumbnail_height": 300,
"title": "Gusgus - Within You",
"width": 300,
"thumbnail_url": "https:\/\/d3rt1990lpmkn.cloudfront.net\/cover\/f15552e72e1fcf02484d94553a7e7cd98049361a",
"provider_name": "Spotify",
"type": "rich",
"html": "<iframe src=\"https:\/\/embed.spotify.com\/?uri=spotify:track:6bc5scNUVa3h76T9nvpGIH\" width=\"300\" height=\"380\" frameborder=\"0\" allowtransparency=\"true\"><\/iframe>"
}
注意thumbnail_url
:
https://d3rt1990lpmkn.cloudfront.net/cover/f15552e72e1fcf02484d94553a7e7cd98049361a
/cover/
代表缩略图的大小。
可用的尺寸: 60
, 85
, 120
, 140
, 160
, 165
, 230
, 300
, 320
,和640
。
例如: https://d3rt1990lpmkn.cloudfront.net/640/f15552e72e1fcf02484d94553a7e7cd98049361a
Answer 2:
有计划地实现它,如,我们希望它是存在的,但没有人在努力。 这主要是与使用方面法律问题。
从技术上讲,这当然是可能的推测,并访问相同的图像,例如open.spotify.com使用由解析HTML。 这是不允许的,当然,但并没有什么技术上是结束访问。
(我在Spotify的工作)
Answer 3:
在iTunes和的Deezer API也是有用:
http://www.apple.com/itunes/affiliates/resources/documentation/itunes-store-web-service-search-api.html
http://developers.deezer.com/api/search