AmineSoukara/amazon-music
关于
Amazon Music API,提供曲目、专辑、艺人、播放列表和播客的元数据、播放、搜索与查询功能,并支持提取流媒体 URL 和获取 Widevine DRM 密钥。
设计与媒体实测星标增长
- 24小时
- 0
- 7天
- +4
- 15天
- +9
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文
🎵 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.
探索相关项目
加载中…