Metadata-Version: 2.4
Name: AlacDecoderAmazonDL
Version: 1.7.7
Summary: A Python package for interacting with Amazon Music services
Home-page: https://github.com/AmineSoukara/Amazon-Music
Author: Amine Soukara
Author-email: AmineSoukara@gmail.com
Maintainer: Amine Soukara
Maintainer-email: AmineSoukara@gmail.com
License: MIT
Project-URL: Source, https://github.com/AmineSoukara/Amazon-Music
Project-URL: Documentation, https://github.com/AmineSoukara/Amazon-Music#readme
Project-URL: Tracker, https://github.com/AmineSoukara/Amazon-Music/issues
Project-URL: Changelog, https://github.com/AmineSoukara/Amazon-Music/releases
Keywords: amazon,music,cli,api,downloader,streaming,audio
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: End Users/Desktop
Classifier: Topic :: Multimedia :: Sound/Audio
Classifier: Topic :: Utilities
Classifier: Natural Language :: English
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: Implementation :: CPython
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.25.0
Requires-Dist: dotmap>=1.3.30
Requires-Dist: mutagen>=1.45.1
Requires-Dist: pathvalidate>=2.5.0
Requires-Dist: rich>=13.0.0
Requires-Dist: pyfiglet>=0.8.post1
Provides-Extra: dev
Requires-Dist: pytest>=6.0.0; extra == "dev"
Requires-Dist: pytest-cov>=2.0.0; extra == "dev"
Requires-Dist: mypy>=0.910; extra == "dev"
Requires-Dist: flake8>=3.9.0; extra == "dev"
Requires-Dist: twine>=3.4.0; extra == "dev"
Requires-Dist: wheel>=0.36.0; extra == "dev"
Provides-Extra: gui
Requires-Dist: customtkinter>=5.1.2; extra == "gui"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: maintainer
Dynamic: maintainer-email
Dynamic: project-url
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

  Amazon Music API

# 🎵 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 (https://amz.dezalty.com)
   · 
  Report Bug (https://github.com/AmineSoukara/amazon-music/issues)
   · 
  Request Feature (https://github.com/AmineSoukara/amazon-music/issues)

---
> ⚠️ The API is still in development. For issues or suggestions: [contact support](https://bio.link/aminesoukara). 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
```bash
pip install amazon-music
```

## 🖥️ CLI Usage
The command-line interface provides easy access to Amazon Music content:

### Basic Commands
```bash
amz [URL_OR_ID] [OPTIONS]
```


### Examples
```bash
# 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](https://amz.dezalty.com/login)

## 🎵 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](https://amz.dezalty.com)

---

## 📚 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](https://www.amazon.com/gp/help/customer/display.html?nodeId=508088)**.
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

---

![⭐️](https://telegra.ph/file/b132a131aabe2106bd335.gif)

> ⭐️ If you find this project useful, please consider starring the repo! It helps support the project and keeps it visible to others.

---

