Skip to content

GET /state ​

This endpoint gets the current state of the player.

Response ​

FieldTypeSince Version
playerplayer object2.0.0
videovideo object | null2.0.0
playlistIdstring | null2.0.0

Example ​

json
{
  "player": {
    "trackState": 1,
    "videoProgress": 112.149331,
    "volume": 100,
    "muted": false,
    "adPlaying": false,
    "queue": {
      "autoplay": true,
      "items": [
        {
          "thumbnails": [
            {
              "url": "https://example.com/thumbnail.png",
              "width": 60,
              "height": 60
            }
          ],
          "title": "Example Title",
          "author": "Example Author",
          "duration": "3:32",
          "selected": true,
          "videoId": "dQw4w9WgXcQ",
          "counterparts": null
        }
      ],
      "automixItems": [
        {
          "thumbnails": [
            {
              "url": "https://example.com/thumbnail.png",
              "width": 60,
              "height": 60
            }
          ],
          "title": "Example Title",
          "author": "Example Author",
          "duration": "3:32",
          "selected": false,
          "videoId": "dQw4w9WgXcQ",
          "counterparts": [
            {
              "thumbnails": [
                {
                  "url": "https://example.com/thumbnail.png",
                  "width": 400,
                  "height": 225
                }
              ],
              "title": "Example Title",
              "author": "Example Author",
              "duration": "3:32",
              "selected": true,
              "videoId": "dQw4w9WgXcQ",
              "counterparts": null
            }
          ]
        }
      ],
      "isGenerating": false,
      "isInfinite": false,
      "repeatMode": 0,
      "selectedItemIndex": 0,
      "shuffleEnabled": false
    }
  },
  "video": {
    "author": "Example Author",
    "channelId": "UCuAXFkgsw1L7xaCfnd5JJOw",
    "title": "Example Title",
    "album": "Example Album",
    "albumId": "MPREexample",
    "likeStatus": 1,
    "thumbnails": [
      {
        "url": "https://example.com/thumbnail.png",
        "width": 60,
        "height": 60
      }
    ],
    "durationSeconds": 199,
    "id": "dQw4w9WgXcQ",
    "isLive": false,
    "videoType": 0,
    "metadataFilled": true
  },
  "playlistId": null
}

Player Object ​

FieldTypeSince Version
trackStatetrack state enum2.0.0
videoProgressfloat2.0.0
volumestring2.0.0
mutedboolean2.0.1
adPlayingboolean2.0.0
queuequeue object | null2.0.0

Track State Enum ​

ValueDescription
-1Unknown
0Paused
1Playing
2Buffering

Queue Object ​

FieldTypeSince Version
autoplayboolean2.0.0
itemsqueue item object2.0.0
autoMixItemsqueue item object2.0.0
isGeneratingboolean2.0.0
isInfiniteboolean2.0.0
repeatModerepeat mode enum2.0.0
selectedItemIndexinteger2.0.0
shuffleEnabledboolean2.0.0

Queue Item Object ​

FieldTypeSince Version
thumbnailsarray of thumbnail object2.0.0
titlestring2.0.0
authorstring2.0.0
durationstring2.0.0
selectedboolean2.0.0
videoIdstring2.0.0
counterpartsarray of queue item object | null2.0.0

Video Object ​

FieldTypeSince Version
authorstring2.0.0
channelIdstring2.0.0
titlestring2.0.0
albumstring | null2.0.0
albumIdstring | null2.0.0
likeStatuslike status enum | null2.0.0
thumbnailsarray of thumbnail object2.0.0
durationSecondsinteger2.0.0
idstring2.0.0
isLiveboolean2.0.6
videoTypevideo type enum2.0.6
metadataFilledboolean2.0.6

Like Status Enum ​

ValueDescription
-1Unknown
0Dislike
1Indifferent
2Like

Video Type Enum ​

ValueDescription
-1Unknown
0Audio
1Video
2Uploaded
3Podcast

Thumbnail Object ​

FieldTypeSince Version
urlstring2.0.0
widthinteger2.0.0
heightinteger2.0.0