Skip to main content

Unofficial API for YouTube Music

Project description

PyPI Downloads Ask questions at https://gitter.im/sigma67/ytmusicapi Code coverage Latest release Commits since latest release

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

At this point ytmusicapi supports nearly all content interactions in the YouTube Music web app. If you find something missing or broken, feel free to create an issue

Browsing:
  • 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 (next songs when you press play/radio/shuffle in YouTube Music)

  • get song lyrics

Exploring music:
  • get moods and genres playlists

  • get latest charts (globally and per country)

Library management:
  • get library contents: playlists, songs, artists, albums and subscriptions

  • add/remove library content: rate songs, albums and playlists, subscribe/unsubscribe artists

  • get and modify play history

Playlists:
  • create and delete playlists

  • modify playlists: edit metadata, add/move/remove tracks

  • get playlist contents

  • get playlist suggestions

Uploads:
  • upload songs and remove them again

  • list uploaded songs, artists and albums

Usage

from ytmusicapi import YTMusic

yt = YTMusic('headers_auth.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.

Requirements

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

ytmusicapi-0.25.1.tar.gz (63.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ytmusicapi-0.25.1-py3-none-any.whl (62.8 kB view details)

Uploaded Python 3

File details

Details for the file ytmusicapi-0.25.1.tar.gz.

File metadata

  • Download URL: ytmusicapi-0.25.1.tar.gz
  • Upload date:
  • Size: 63.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for ytmusicapi-0.25.1.tar.gz
Algorithm Hash digest
SHA256 b9cfdf8037ad4986824737dfd12cdf6d186cdd368aadf13687aae85a4923f324
MD5 826c01c0044dffc9f6d6cdee2142bafa
BLAKE2b-256 67f4f0501b9c53dcaf69eede094341f95a9140bdc1a5ea3d0f972b203ffa39ed

See more details on using hashes here.

File details

Details for the file ytmusicapi-0.25.1-py3-none-any.whl.

File metadata

  • Download URL: ytmusicapi-0.25.1-py3-none-any.whl
  • Upload date:
  • Size: 62.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for ytmusicapi-0.25.1-py3-none-any.whl
Algorithm Hash digest
SHA256 11f3df5ac5b2ccb125bd883abf321a614ef97b5ec4b7e56cc856be299d4c8358
MD5 a0f495b9e672e46aa1b777d842f38b42
BLAKE2b-256 1d4c82bdb18140de503f5b93544e466536950ac7be775e919e6831d9d2efc89a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page