Unofficial API for YouTube Music
Project description
ytmusicapi is a Python 3 library to send requests to the YouTube Music API. It emulates YouTube Music web client requests using the user’s cookie data for authentication.
Features
search (including all filters)
get artist information and releases (songs, videos, albums, singles, related artists)
get user information (videos, playlists)
get albums
get song metadata
get watch playlists (playlist that appears when you press play in YouTube Music)
get song lyrics
get moods and genres playlists
get latest charts (globally and per country)
get library contents: playlists, songs, artists, albums and subscriptions
add/remove library content: rate songs, albums and playlists, subscribe/unsubscribe artists
create and delete playlists
modify playlists: edit metadata, add/move/remove tracks
get playlist contents
Upload songs and remove them again
List uploaded songs, artists and albums
Usage
from ytmusicapi import YTMusic
ytmusic = YTMusic('headers_auth.json')
playlistId = ytmusic.create_playlist('test', 'test description')
search_results = ytmusic.search('Oasis Wonderwall')
ytmusic.add_playlist_items(playlistId, [search_results[0]['videoId']])
The tests are also a great source of usage examples.
Requirements
Python 3.6 or higher - https://www.python.org
Setup and Usage
See the Documentation for detailed instructions
Contributing
Pull requests are welcome. There are still some features that are not yet implemented. Please, refer to CONTRIBUTING.rst for guidance.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for ytmusicapi-0.21.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29d8d44e1911458041882a453b05c37021ff850757c648f93a45d1775dddbae2 |
|
MD5 | 9bb6bdbe655d9a55c7c04328d4d5a79a |
|
BLAKE2b-256 | cb58834a6445479c72544d9285badce0a58650520c8ba5adfae7b98e61d133bb |