[GH-ISSUE #343] How do I add a single from album to playlist? #269

Closed
opened 2026-02-27 22:08:54 +03:00 by kerem · 2 comments
Owner

Originally created by @Praful on GitHub (Jan 8, 2023).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/343

Hello, thank you for providing this excellent API and the brilliant documentation.

I came across a track that appears as type 'Single' on resultType 'album'. There is no videoId. There is a browseId but that can't be used to add the track to a playlist. You can add this via the web interface.

How could I add this to a playlist using your API?

Thanks

Originally created by @Praful on GitHub (Jan 8, 2023). Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/343 Hello, thank you for providing this excellent API and the brilliant documentation. I came across a track that appears as `type` 'Single' on `resultType` 'album'. There is no `videoId`. There is a `browseId` but that can't be used to add the track to a playlist. You can add this via the web interface. How could I add this to a playlist using your API? Thanks
kerem 2026-02-27 22:08:54 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@sigma67 commented on GitHub (Jan 10, 2023):

You can get the audioPlaylistId using get_album and add the album to a playlist using the source_playlist parameter of add_playlist_items.

https://ytmusicapi.readthedocs.io/en/latest/reference.html

<!-- gh-comment-id:1377961798 --> @sigma67 commented on GitHub (Jan 10, 2023): You can get the `audioPlaylistId `using `get_album `and add the album to a playlist using the `source_playlist `parameter of `add_playlist_items`. https://ytmusicapi.readthedocs.io/en/latest/reference.html
Author
Owner

@Praful commented on GitHub (Jan 18, 2023):

Thanks. In case others find it useful, I have implemented your suggestion here: https://github.com/Praful/music-playlist-export-import/blob/main/src/youtube_music_import.py.

There are also scripts to export playlists from Spotify (using spotipy) and scraping playlists from the BBC website.

<!-- gh-comment-id:1386725355 --> @Praful commented on GitHub (Jan 18, 2023): Thanks. In case others find it useful, I have implemented your suggestion here: https://github.com/Praful/music-playlist-export-import/blob/main/src/youtube_music_import.py. There are also scripts to export playlists from Spotify (using spotipy) and scraping playlists from the BBC website.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ytmusicapi#269
No description provided.