Skip to main content

An unofficial search API for YouTube Music.

Project description

YouTube Music API

An unofficial search API for YouTube Music.

Downloads

Installation:

pip install -U YouTubeMusicAPI

Get Basic

# Import the YouTubeMusicAPI module
import YouTubeMusicAPI

# Example query
query = "alan walker faded"

# Call the search function with the query
result = YouTubeMusicAPI.search(query)

# Check if a result was found
if result:
    # Print the retrieved result
    print(result)
else:
    # Print a message if no result was found
    print("No Result Found")

Example Output:

{
    "title": "Alan Walker - Faded",
    "id": "60ItHLz5WEA",
    "url": "https://music.youtube.com/watch?v=60ItHLz5WEA",
    "artwork": "https://img.youtube.com/vi/60ItHLz5WEA/0.jpg",
    "author": {
        "name": "Alan Walker",
        "url": "https://www.youtube.com/@Alanwalkermusic"
    }
}

License

Free and open-source under MIT License.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

YouTubeMusicAPI-2.9.1-py3-none-any.whl (3.2 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