Skip to content
This repository has been archived by the owner on Jul 8, 2022. It is now read-only.

Artist.GetTrack(string artistId, string page, string pageSize)

KirMozor edited this page May 7, 2022 · 2 revisions

Allows you to get artist tracks by their id in YandexMusic

Example:

using System;
using YandexMusicApi;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine(Artist.GetTrack("675068")); //Aritst: Imagine Dragons
        }
    }
}

Output:

{
  "invocationInfo": {
    "req-id": "5436j34734j3568j568j5398j35j35j8935678j35j63ytu356u2",
    "hostname": "music-stable-back-sas-37.sas.yp-c.yandex.net",
    "exec-duration-millis": 14
  },
  "result": {
    "pager": {
      "page": 0,
      "perPage": 20,
      "total": 108
    },
    "tracks": [
      {
        "id": "94074268",
        "realId": "94074268",
        "title": "Enemy",
        "version": "from the series Arcane League of Legends",
        "major": {
          "id": 1,
          "name": "UNIVERSAL_MUSIC"
        },
        "available": true,
        "availableForPremiumUsers": true,
        "availableFullWithoutPermission": false,
        "storageDir": "",
        "durationMs": 173380,
        "fileSize": 0,
        "r128": {
          "i": -8.17,
          "tp": 1.99
        },
        "previewDurationMs": 30000,
        "artists": [
          {
            "id": 675068,
            "name": "Imagine Dragons",
            "various": false,
            "composer": false,
            "cover": {
              "type": "from-artist-photos",
              "uri": "avatars.yandex.net/get-music-content/5236179/b00cf194.p.675068/%%",
              "prefix": "b00cf194.p.675068/"
            },
            "genres": []
          },
          {
            "id": 4549362,
            "name": "J.I.D",
            "various": false,
            "composer": false,
            "cover": {
              "type": "from-album-cover",
              "uri": "avatars.yandex.net/get-music-content/5708920/3988dc60.a.20517809-1/%%",
              "prefix": "3988dc60.a.20517809-1"
            },
            "genres": []
          },
          {
            "id": 13812912,
            "name": "Arcane",
            "various": false,
            "composer": false,
            "cover": {
              "type": "from-album-cover",
              "uri": "avatars.yandex.net/get-music-content/5099136/4672da30.a.19237280-1/%%",
              "prefix": "4672da30.a.19237280-1"
            },
            "genres": []
          },
          {
            "id": 3416858,
            "name": "League of Legends",
            "various": false,
            "composer": false,
            "cover": {
              "type": "from-album-cover",
              "uri": "avatars.yandex.net/get-music-content/95061/017c7c11.a.7791074-1/%%",
              "prefix": "017c7c11.a.7791074-1"
            },
            "genres": []
          }
        ],
        "albums": [
          {
            "id": 21002416,
            "title": "Mercury - Act 1",
            "metaType": "music",
            "version": "Additional Track Version",
            "year": 2021,
            "releaseDate": "2021-09-03T03:00:00+06:00",
            "coverUri": "avatars.yandex.net/get-music-content/5531900/c62fdddc.a.21002416-1/%%",
            "ogImage": "avatars.yandex.net/get-music-content/5531900/c62fdddc.a.21002416-1/%%",
            "genre": "rock",
            "buy": [],
            "trackCount": 14,
            "likesCount": 667,
            "recent": false,
            "veryImportant": false,
            "artists": [
              {
                "id": 675068,
                "name": "Imagine Dragons",
                "various": false,
                "composer": false,
                "cover": {
                  "type": "from-artist-photos",
                  "uri": "avatars.yandex.net/get-music-content/5236179/b00cf194.p.675068/%%",
                  "prefix": "b00cf194.p.675068/"
                },
                "genres": []
              }
            ],
            "labels": [
              {
                "id": 449526,
                "name": "KIDinaKORNER"
              },
              {
                "id": 2004,
                "name": "Interscope"
              }
            ],
            "available": true,
            "availableForPremiumUsers": true,
            "availableForMobile": true,
            "availablePartially": false,
            "bests": [
              79177545,
              94074268,
              86416030
            ],
            "trackPosition": {
              "volume": 1,
              "index": 1
            }
          }
        ],
        "coverUri": "avatars.yandex.net/get-music-content/5531900/c62fdddc.a.21002416-1/%%",
        "ogImage": "avatars.yandex.net/get-music-content/5531900/c62fdddc.a.21002416-1/%%",
        "lyricsAvailable": true,
        "type": "music",
        "rememberPosition": false,
        "backgroundVideoUri": "https://strm.yandex.ru/vh-music-videoshots-converted/vod-content/6639982272613685798/mp4/mp4/360x640p.mp4",
        "trackSharingFlag": "VIDEO_ALLOWED",
        "playerId": "vkkx7-CMogEc",
        "lyricsInfo": {
          "hasAvailableSyncLyrics": true,
          "hasAvailableTextLyrics": true
        },
        "trackSource": "OWN"
      },
      {
Clone this wiki locally