🎵 Amazon Music API – Unofficial
A FastAPI REST API for Amazon Music offering metadata, playback, search, and lookups for tracks, albums, artists, playlists, and podcasts. Includes streaming URL extraction and Widevine DRM key retrieval.
API Docs · Report Bug · Request Feature
⚠️ The API is still in development. For issues or suggestions: contact support. Also This API requires a premium Amazon Music account. If you find it useful and have a premium account you'd like to donate, it would be greatly appreciated. Donations help keep the API running and support multi-region access.
📦 Installation
pip install amazon-music
🖥️ CLI Usage
The command-line interface provides easy access to Amazon Music content:
Basic Commands
amz [URL_OR_ID] [OPTIONS]
Examples
# Download an track
amz https://music.amazon.com/albums/B077FLX9ZQ?trackAsin=B077F6QG2S
# Download an album
amz https://music.amazon.com/albums/B077FLX9ZQ
# Download a playlist with high quality
amz https://music.amazon.com/playlists/B0FBL3CC8M -q High
# Download a track by ID
amz B077F6QG2S -t track
CLI Options
positional arguments:
url_or_id Amazon Music URL or ID
options:
-h, --help show this help message and exit
--config Interactive configuration setup
-q, --quality {Max,Master,High,Normal,Medium,Low,Free}
Audio quality preference (default: Normal)
-t, --type {auto,track,album,playlist}
Content type (default: auto-detect)
-o OUTPUT, --output OUTPUT
Output directory (default: ./Music)
--temp-dir TEMP_DIR
Temporary directory (default: ./Music/temp)
--format-folder {1,2,3,4}
Folder naming format (1-4, default: 4)
--format-track {1,2,3,4}
Track naming format (1-4, default: 4)
--workers WORKERS Number of parallel download workers (default: 2)
--zip Create ZIP archive for albums/playlists
--overwrite Overwrite existing files
--token TOKEN Amazon Music API access token
--clear-token Remove stored access token
--show-token Show the stored access token
🔐 Auth Token
Star the repository on GitHub, then click "Get Auth Tokens" to access your authentication credentials. Click Here
🎵 Quality
| Quality | Specification | Bitrate | Format |
|---|---|---|---|
| Low | 48kbps | 48 kbps | OPUS |
| Medium | 192kbps | 192 kbps | OPUS |
| Normal | 320kbps | 320 kbps | OPUS |
| High | ≤16-bit / ≤48 kHz | ≤1411 kbps | FLAC |
| Master | 24-bit / ≤96 kHz | ≥2300 kbps | FLAC |
| Max | 24-bit / ≤192 kHz | ≥4600 kbps | FLAC |
📁 File & Folder Naming Formats
Track File Formats
| ID | Format Name | Example Output |
|---|---|---|
| 1 | TITLE_ARTIST | {track_explicit}{title} - {artist} |
| 2 | TITLE_ARTIST_QUALITY | {title} - {artist} ({quality}) |
| 3 | ARTIST_TITLE | {artist} - {title} |
| 4 | ARTIST_TITLE_QUALITY | {artist} - {title} ({quality}) |
Album Folder Formats
| ID | Format Name | Example Output |
|---|---|---|
| 1 | ALBUM_ARTIST | {album_explicit}{album} - {album_artist} |
| 2 | ALBUM_ARTIST_QUALITY | {album} - {album_artist} ({quality}) |
| 3 | ARTIST_ALBUM | {album_artist} - {album} |
| 4 | ARTIST_ALBUM_QUALITY | {album_artist} - {album} ({quality}) |
🔗 Quick Links
- Base URL: Click Here
📚 Endpoints Overview
| Method | Endpoint | Description |
|---|---|---|
GET |
/login |
Get Access Tokens |
GET |
/account |
Get authenticated account info |
GET |
/search?query={query}&type={type} |
Search Amazon Music |
GET |
/track?id={track_id} |
Get metadata for a track |
GET |
/album?id={album_id} |
Get album details including tracks |
GET |
/artist?id={artist_id} |
Get artist info and discography |
GET |
/playlist?id={playlist_id} |
Get official playlist info |
GET |
/community_playlist?id={playlist_id} |
Get community playlist info |
GET |
/episode?id={episode_id} |
Get a podcast episode |
GET |
/podcast?id={podcast_id} |
Get a podcast show and episodes |
GET |
/lyrics?id={track_id} |
Get lyrics |
GET |
/stream_urls?id={track_id} |
Get streaming URLs in multiple qualities |
POST |
/widevine_key |
Decrypt Widevine DRM using PSSH |
⚠️ Legal Disclaimer
This project is intended for educational and research purposes only. It interacts with Amazon’s internal APIs, which may violate their Terms of Service. The authors are not affiliated with Amazon. This software is provided “as is” without any warranties, express or implied. Use of this tool is at your own risk, and you are solely responsible for ensuring compliance with applicable laws and terms in your country or region. This project is non-commercial and does not host or distribute any Amazon-owned content.
👨💻 Dev & Support
⭐️ If you find this project useful, please consider starring the repo! It helps support the project and keeps it visible to others.
Release files for amazon-music 1.7.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| amazon_music-1.7.7.tar.gz | 24.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| amazon_music-1.7.7-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 53.7 kB
Release files / amazon_music-1.7.7.tar.gz
| Download URL | amazon_music-1.7.7.tar.gz |
|---|---|
| Size | 24.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5ab13d99903cb971b47c6d6e122cdd286f9eaae0ae37fa75b0408de64c58403a
|
|
BLAKE2b-256 checksum How to use checksums |
f27096817c66b21704aa1e5dc824a1911bca0a6358e3f0762cfa55624fb15e70
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / amazon_music-1.7.7-py2.py3-none-any.whl
| Download URL | amazon_music-1.7.7-py2.py3-none-any.whl |
|---|---|
| Size | 29.0 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
e05afd8e6576cebbcf605e07d845395c211d96497693f8bd931eab710d8a2eac
|
|
BLAKE2b-256 checksum How to use checksums |
3a1c19b376a0db45e9cf8ada3686f20dec61d3284364c915de6c25ff421bd7ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|