Skip to main content

Unofficial API for YouTube Music

Project description

PyPI Downloads Code coverage Latest release Commits since latest release

A work-in-progress API that emulates web requests from the YouTube Music web client.

Currently you need to extract your authentication data from your web browser and provide it through a file for it to work.

Features

Browsing:
  • search (including all filters)

  • get artist information and releases (songs, videos, albums, singles)

  • get user information (videos, playlists)

  • get albums

  • get song metadata

  • get watch playlists (playlist that appears when you press play in YouTube Music)

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

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

Playlists:
  • create and delete playlists

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

  • get playlist contents

Uploads:
  • 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

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.12.1.tar.gz (28.9 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.12.1-py3-none-any.whl (38.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ytmusicapi-0.12.1.tar.gz
  • Upload date:
  • Size: 28.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for ytmusicapi-0.12.1.tar.gz
Algorithm Hash digest
SHA256 f07e163f99f6ff7266644a4f19d2c1f9212b166185070d23b847f0f3030855b4
MD5 5634610d907dd25b9029341647fadd86
BLAKE2b-256 ff43b129ba3e6daf22ec4bfe350a455510a1014ad6dbbba8416cffd3ece1739b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ytmusicapi-0.12.1-py3-none-any.whl
  • Upload date:
  • Size: 38.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for ytmusicapi-0.12.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e2a5841a69cd3deeb8731eb5148387d20e9dab87b7fd2f7234fd2e4aceb59ced
MD5 bafb4615ef856801023bc79e7dc8b1ed
BLAKE2b-256 54d24b4beec3d92bf1b43e10957cfa5f1514e00c5838f22f810e44ca32b7fbf7

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