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) and suggestions
get artist information and releases (songs, videos, albums, singles, related artists)
get user information (videos, playlists)
get albums
get song metadata
get watch playlists (next songs when you press play/radio/shuffle 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, podcasts, channels
add/remove library content: rate songs, albums and playlists, subscribe/unsubscribe artists
get and modify play history
create and delete playlists
modify playlists: edit metadata, add/move/remove tracks
get playlist contents
get playlist suggestions
get podcasts
get episodes
get channels
get episodes playlists
upload songs and remove them again
list uploaded songs, artists and albums
all regions are supported (see locations FAQ
16 languages are supported (see languages FAQ
If you find something missing or broken, check the FAQ or feel free to create an issue.
Requirements
Python 3.10 or higher - https://www.python.org
Setup
See the Documentation for detailed instructions
Usage
from ytmusicapi import YTMusic
yt = YTMusic('oauth.json')
playlistId = yt.create_playlist('test', 'test description')
search_results = yt.search('Oasis Wonderwall')
yt.add_playlist_items(playlistId, [search_results[0]['videoId']])
The tests are also a great source of usage examples.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ytmusicapi-1.11.5.tar.gz.
File metadata
- Download URL: ytmusicapi-1.11.5.tar.gz
- Upload date:
- Size: 413.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48f35901291c8af9934ec0aa9cd6b9fd1a19c543f843c39c9e8b396356b47801
|
|
| MD5 |
2a149d19cc110754b7a739b7ab036da8
|
|
| BLAKE2b-256 |
ac4ba44292f732903dc26a90236ad1cf284da974ed5491df388cf15713b38429
|
Provenance
The following attestation bundles were made for ytmusicapi-1.11.5.tar.gz:
Publisher:
pythonpublish.yml on sigma67/ytmusicapi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ytmusicapi-1.11.5.tar.gz -
Subject digest:
48f35901291c8af9934ec0aa9cd6b9fd1a19c543f843c39c9e8b396356b47801 - Sigstore transparency entry: 880231494
- Sigstore integration time:
-
Permalink:
sigma67/ytmusicapi@b70dcc76a9fd9c71d1772727cbd557d6573d9a9c -
Branch / Tag:
refs/tags/1.11.5 - Owner: https://github.com/sigma67
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pythonpublish.yml@b70dcc76a9fd9c71d1772727cbd557d6573d9a9c -
Trigger Event:
release
-
Statement type:
File details
Details for the file ytmusicapi-1.11.5-py3-none-any.whl.
File metadata
- Download URL: ytmusicapi-1.11.5-py3-none-any.whl
- Upload date:
- Size: 102.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f6b1e031408cce45bef207bfda449e3ecf548f7c4ff0c091c575d4a27eb21da6
|
|
| MD5 |
7c62fe0b0a4427169a60e9175c43b3ec
|
|
| BLAKE2b-256 |
aaa88feb17eaa8b2bf36b0617ba37f949a7036b6ece652672bd4517a54326f0e
|
Provenance
The following attestation bundles were made for ytmusicapi-1.11.5-py3-none-any.whl:
Publisher:
pythonpublish.yml on sigma67/ytmusicapi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ytmusicapi-1.11.5-py3-none-any.whl -
Subject digest:
f6b1e031408cce45bef207bfda449e3ecf548f7c4ff0c091c575d4a27eb21da6 - Sigstore transparency entry: 880231541
- Sigstore integration time:
-
Permalink:
sigma67/ytmusicapi@b70dcc76a9fd9c71d1772727cbd557d6573d9a9c -
Branch / Tag:
refs/tags/1.11.5 - Owner: https://github.com/sigma67
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pythonpublish.yml@b70dcc76a9fd9c71d1772727cbd557d6573d9a9c -
Trigger Event:
release
-
Statement type: