YouTube Music API
An unofficial search API for YouTube Music.
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.
Release files for YouTubeMusicAPI 2.9.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| YouTubeMusicAPI-2.9.1-py3-none-any.whl | Python 3 | none | any | Details |
Release files / YouTubeMusicAPI-2.9.1-py3-none-any.whl
| Download URL | YouTubeMusicAPI-2.9.1-py3-none-any.whl |
|---|---|
| Size | 3.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5a8c5df0d5815b56cfeca2832ef8e535a6ee832010e69a06cc1778514d50e638
|
|
BLAKE2b-256 checksum How to use checksums |
0bfde1bc4db88c37d1368fa1bb858a80f418bd583aeb9a5f2f4a00b73a09e808
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.3
|