Get User's Top Tracks
TopListTopTracksPageResponse Me.Top.ListTopTracks(TopListTopTracksParams?parameters, CancellationTokencancellationToken = default)
GET/me/top/tracks
Get the current user's top tracks based on calculated affinity.
Parameters
Returns
Get User's Top Tracks
TopListTopTracksParams parameters = new();
var page = await client.Me.Top.ListTopTracks(parameters);
await foreach (var item in page.Paginate())
{
Console.WriteLine(item);
}{
"href": "https://api.spotify.com/v1/me/shows?offset=0&limit=20\n",
"limit": 20,
"next": "https://api.spotify.com/v1/me/shows?offset=1&limit=1",
"offset": 0,
"previous": "https://api.spotify.com/v1/me/shows?offset=1&limit=1",
"total": 4,
"items": [
{
"id": "id",
"album": {
"id": "2up3OPMp9Tb4dAKM2erWXQ",
"album_type": "compilation",
"artists": [
{
"id": "id",
"external_urls": {
"published": true,
"spotify": "spotify"
},
"href": "href",
"name": "name",
"published": true,
"type": "artist",
"uri": "uri"
}
],
"available_markets": [
"CA",
"BR",
"IT"
],
"external_urls": {
"published": true,
"spotify": "spotify"
},
"href": "href",
"images": [
{
"height": 300,
"url": "https://i.scdn.co/image/ab67616d00001e02ff9ca10b55ce82ae553c8228\n",
"width": 300,
"published": true
}
],
"name": "name",
"release_date": "1981-12",
"release_date_precision": "year",
"total_tracks": 9,
"type": "album",
"uri": "spotify:album:2up3OPMp9Tb4dAKM2erWXQ",
"published": true,
"restrictions": {
"published": true,
"reason": "market"
}
},
"artists": [
{
"id": "id",
"external_urls": {
"published": true,
"spotify": "spotify"
},
"href": "href",
"name": "name",
"published": true,
"type": "artist",
"uri": "uri"
}
],
"available_markets": [
"string"
],
"disc_number": 0,
"duration_ms": 0,
"explicit": true,
"external_ids": {
"ean": "ean",
"isrc": "isrc",
"published": true,
"upc": "upc"
},
"external_urls": {
"published": true,
"spotify": "spotify"
},
"href": "href",
"is_local": true,
"is_playable": true,
"linked_from": {
"id": "id",
"external_urls": {
"published": true,
"spotify": "spotify"
},
"href": "href",
"published": true,
"type": "type",
"uri": "uri"
},
"name": "name",
"popularity": 0,
"preview_url": "preview_url",
"published": true,
"restrictions": {
"published": true,
"reason": "reason"
},
"track_number": 0,
"type": "track",
"uri": "uri"
}
],
"published": true
}Returns Examples
{
"href": "https://api.spotify.com/v1/me/shows?offset=0&limit=20\n",
"limit": 20,
"next": "https://api.spotify.com/v1/me/shows?offset=1&limit=1",
"offset": 0,
"previous": "https://api.spotify.com/v1/me/shows?offset=1&limit=1",
"total": 4,
"items": [
{
"id": "id",
"album": {
"id": "2up3OPMp9Tb4dAKM2erWXQ",
"album_type": "compilation",
"artists": [
{
"id": "id",
"external_urls": {
"published": true,
"spotify": "spotify"
},
"href": "href",
"name": "name",
"published": true,
"type": "artist",
"uri": "uri"
}
],
"available_markets": [
"CA",
"BR",
"IT"
],
"external_urls": {
"published": true,
"spotify": "spotify"
},
"href": "href",
"images": [
{
"height": 300,
"url": "https://i.scdn.co/image/ab67616d00001e02ff9ca10b55ce82ae553c8228\n",
"width": 300,
"published": true
}
],
"name": "name",
"release_date": "1981-12",
"release_date_precision": "year",
"total_tracks": 9,
"type": "album",
"uri": "spotify:album:2up3OPMp9Tb4dAKM2erWXQ",
"published": true,
"restrictions": {
"published": true,
"reason": "market"
}
},
"artists": [
{
"id": "id",
"external_urls": {
"published": true,
"spotify": "spotify"
},
"href": "href",
"name": "name",
"published": true,
"type": "artist",
"uri": "uri"
}
],
"available_markets": [
"string"
],
"disc_number": 0,
"duration_ms": 0,
"explicit": true,
"external_ids": {
"ean": "ean",
"isrc": "isrc",
"published": true,
"upc": "upc"
},
"external_urls": {
"published": true,
"spotify": "spotify"
},
"href": "href",
"is_local": true,
"is_playable": true,
"linked_from": {
"id": "id",
"external_urls": {
"published": true,
"spotify": "spotify"
},
"href": "href",
"published": true,
"type": "type",
"uri": "uri"
},
"name": "name",
"popularity": 0,
"preview_url": "preview_url",
"published": true,
"restrictions": {
"published": true,
"reason": "reason"
},
"track_number": 0,
"type": "track",
"uri": "uri"
}
],
"published": true
}