Uploads

YTMusic.get_library_upload_songs(limit: int | None = 25, order: Literal['a_to_z', 'z_to_a', 'recently_added'] | None = None) list[dict]

Returns a list of uploaded songs

Parameters:
  • limit – How many songs to return. None retrieves them all. Default: 25

  • order – Order of songs to return. Allowed values: a_to_z, z_to_a, recently_added. Default: Default order.

Returns:

List of uploaded songs.

Each item is in the following format:

{
  "entityId": "t_po_CICr2crg7OWpchDpjPjrBA",
  "videoId": "Uise6RPKoek",
  "artists": [{
    'name': 'Coldplay',
    'id': 'FEmusic_library_privately_owned_artist_detaila_po_CICr2crg7OWpchIIY29sZHBsYXk',
  }],
  "title": "A Sky Full Of Stars",
  "album": "Ghost Stories",
  "likeStatus": "LIKE",
  "thumbnails": [...]
}
YTMusic.get_library_upload_artists(limit: int | None = 25, order: Literal['a_to_z', 'z_to_a', 'recently_added'] | None = None) list[dict]

Gets the artists of uploaded songs in the user’s library.

Parameters:
  • limit – Number of artists to return. None retrieves them all. Default: 25

  • order – Order of artists to return. Allowed values: a_to_z, z_to_a, recently_added. Default: Default order.

Returns:

List of artists as returned by get_library_artists()

YTMusic.get_library_upload_albums(limit: int | None = 25, order: Literal['a_to_z', 'z_to_a', 'recently_added'] | None = None) list[dict]

Gets the albums of uploaded songs in the user’s library.

Parameters:
  • limit – Number of albums to return. None retrives them all. Default: 25

  • order – Order of albums to return. Allowed values: a_to_z, z_to_a, recently_added. Default: Default order.

Returns:

List of albums as returned by get_library_albums()

YTMusic.get_library_upload_artist(browseId: str, limit: int = 25) list[dict]

Returns a list of uploaded tracks for the artist.

Parameters:
  • browseId – Browse id of the upload artist, i.e. from get_library_upload_songs()

  • limit – Number of songs to return (increments of 25).

Returns:

List of uploaded songs.

Example List:

[
  {
    "entityId": "t_po_CICr2crg7OWpchDKwoakAQ",
    "videoId": "Dtffhy8WJgw",
    "title": "Hold Me (Original Mix)",
    "artists": [
      {
        "name": "Jakko",
        "id": "FEmusic_library_privately_owned_artist_detaila_po_CICr2crg7OWpchIFamFra28"
      }
    ],
    "album": null,
    "likeStatus": "LIKE",
    "thumbnails": [...]
  }
]
YTMusic.get_library_upload_album(browseId: str) dict

Get information and tracks of an album associated with uploaded tracks

Parameters:

browseId – Browse id of the upload album, i.e. from i.e. from get_library_upload_songs()

Returns:

Dictionary with title, description, artist and tracks.

Example album:

{
  "title": "18 Months",
  "type": "Album",
  "thumbnails": [...],
  "trackCount": 7,
  "duration": "24 minutes",
  "audioPlaylistId": "MLPRb_po_55chars",
  "tracks": [
    {
      "entityId": "t_po_22chars",
      "videoId": "FVo-UZoPygI",
      "title": "Feel So Close",
      "duration": "4:15",
      "duration_seconds": 255,
      "artists": None,
      "album": {
        "name": "18 Months",
        "id": "FEmusic_library_privately_owned_release_detailb_po_55chars"
      },
      "likeStatus": "INDIFFERENT",
      "thumbnails": None
    },
YTMusic.upload_song(filepath: str) ResponseStatus | Response

Uploads a song to YouTube Music

Parameters:

filepath – Path to the music file (mp3, m4a, wma, flac or ogg)

Returns:

Status String or full response

YTMusic.delete_upload_entity(entityId: str) str | dict

Deletes a previously uploaded song or album

Parameters:

entityId – The entity id of the uploaded song or album, e.g. retrieved from get_library_upload_songs()

Returns:

Status String or error