Skip to main content

An unofficial YouTube Music API For Python Programming Language.

Project description

YouTubeMusicAPI

What's new in version 2.1?

  • Stable release.
  • Updated Code Format.

About

An unofficial YouTube Music API For Python Programming Language.
A Python library which Quickly gather the metadata of a Song, Playlist, Artist existing on YouTube or YouTube Music.

Basic GET usage:

from YouTubeMusicAPI import YouTubeMusicAPI

# type == search type

# available search types >>> ['artist', 'playlist', 'track']

artist = YouTubeMusicAPI("marshmello", type="artist")
track = YouTubeMusicAPI("marshmello", type="track")
playlist = YouTubeMusicAPI("marshmello", type="playlist")

print(artist, track, playlist)
  • output
{
    'artist': 'Marshmello', 
    'artist_url': 'https://music.youtube.com/channel/UCEdvpU2pFRCVqU6yIPyTpMQ', 
    'artist_id': 'UCEdvpU2pFRCVqU6yIPyTpMQ', 
    'artist_image': 'https://yt3.ggpht.com/3kmvsf3NNYy4XLy3hKc2ZVF8O-XkSaahtwUr3KW-YzJKMJsy-g2HePIayrh-JnXWbilYQ6n_=s900-c-k-c0x00ffffff-no-rj'
} 

{
    'track_name': 'Marshmello Live at Lollapalooza 2021 [Full DJ Set]', 
    'datePublished': '2021-08-04', 
    'track_Id': '8eXFvzMEldk', 
    'track_url': 'https://music.youtube.com/watch?v=8eXFvzMEldk', 
    'track_image': 'https://i.ytimg.com/vi/8eXFvzMEldk/hqdefault.jpg'
}

{
    'playlist_name': 'Marshmallow Playlist', 
    'playlist_url': 'https://music.youtube.com/playlist?list=PL4FB1JvhTLrGNSL4odYt72EqjDPJfjSdp', 
    'playlist_id': 'PL4FB1JvhTLrGNSL4odYt72EqjDPJfjSdp'
}

Contributing

  • Pull requests are welcome. For major changes or improvement, please open an issue first to discuss what you would like to change or add.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

YouTubeMusicAPI-2.1.tar.gz (4.4 kB view hashes)

Uploaded Source

Built Distribution

YouTubeMusicAPI-2.1-py3-none-any.whl (4.3 kB view hashes)

Uploaded Python 3

Supported by

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