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.
Metadata
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 | Actions Reset |
|---|---|---|---|---|
| YouTubeMusicAPI-2.9.1-py3-none-any.whl | Python 3 | none | any | Details for YouTubeMusicAPI-2.9.1-py3-none-any.whl |
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
|
Security for YouTubeMusicAPI 2.9.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.