Get a User's Top Artists and Tracks
GET
/me/top/{type}
category-personalization
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://api.spotify.com/me/top/' \
--header 'Authorization;'
响应示例响应示例
200 - 示例 1
{
"href": "string",
"items": [
{
"external_urls": {
"spotify": "string"
},
"followers": {
"href": "string",
"total": 0
},
"genres": [
"string"
],
"href": "string",
"id": "string",
"images": [
{
"height": 0,
"url": "string",
"width": 0
}
],
"name": "string",
"popularity": 0,
"type": "string",
"uri": "string"
}
],
"limit": 0,
"next": "string",
"offset": 0,
"previous": "string",
"total": 0
}
请求参数
Path 参数
type
必需
artists
or tracks
Query 参数
time_range
可选
long_term
(calculated from several years of data and including all new data as it becomes available), medium_term
(approximately last 6 months), short_term
(approximately last 4 weeks). Default: medium_term
limit
可选
limit=2
offset
可选
Header 参数
Authorization
必需
Getting details of a user's top artists and tracks requires authorization of the
user-top-read
scope. See Using Scopes.返回响应
修改于 2021-08-02 10:49:34