# Music API
> Search millions of tracks, artists and albums and fetch their details — including 30-second audio previews, cover art, durations, fan counts and full tracklists. Powered by Deezer.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/music-api/..."
```

## Pricing
- **Free** (Free) — 1,500 calls/Mo, 2 req/s
- **Basic** ($9/Mo) — 35,000 calls/Mo, 8 req/s
- **Pro** ($29/Mo) — 180,000 calls/Mo, 20 req/s
- **Mega** ($79/Mo) — 750,000 calls/Mo, 50 req/s

## Endpoints

### Music

#### `GET /v1/album` — Album details + tracklist

**Parameters:**
- `id` (query, required, string) — Numeric album id Example: `302127`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/music-api/v1/album?id=302127"
```

**Response:**
```json
{
    "data": {
        "id": 302127,
        "link": "https://www.deezer.com/album/302127",
        "cover": "https://cdn-images.dzcdn.net/images/cover/5718f7c81c27e0b2417e2a4c45224f8a/250x250-000000-80-0-0.jpg",
        "title": "Discovery",
        "artist": "Daft Punk",
        "tracks": [
            {
                "id": 3135553,
                "title": "One More Time",
                "preview": "https://cdnt-preview.dzcdn.net/api/1/1/f/8/c/0/f8c5dc3837912dba37c9a1ab3170cc3f.mp3?hdnea=exp=1780099848~acl=/api/1/1/f/8/c/0/f8c5dc3837912dba37c9a1ab3170cc3f.mp3*~data=user_id=0,application_id=42~hmac=9e6759dab63a6fa6bb0c4de9491d43fdb88d5a515b6d0bd48e2bf95c44239d83",
                "duration": 320
            },
            {
                "id": 3135554,
                "title": "Aerodynamic",
                "preview": "https://cdnt-preview.dzcdn.net/api/1/1/6/9/9/0/699d41611cf0280f0a55c8ba4a372c14.mp3?hdnea=exp=1780099848~acl=/api/1/1/6/9/9/0/699d41611cf0280f0a55c8ba4a372c14.mp3*~data=user_id=0,application_id=42~hmac=c7eb49957ae57978bd0d619726fdf7cb2d7ba08e5156b8f499e3f62889274a45",
                "duration": 212
            },
            {
                "id": 3135555,
                "title": "Digital Love",
                "preview": "https://cdnt-preview.dzcdn.net/api/1/1/1/e/c/0/1ec8ff31f93acc81ebb93a45c191e219.mp3?hdnea=exp=1780099848~acl=/api/1/1/1/e/c/0/1ec8ff31f93acc81ebb93a45c191e219.mp3*~data=user_id=0,application_id=42~hmac=e21ae7d7081cf318383300353d54f
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/artist` — Artist details

**Parameters:**
- `id` (query, required, string) — Numeric artist id Example: `27`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/music-api/v1/artist?id=27"
```

**Response:**
```json
{
    "data": {
        "id": 27,
        "fans": 5156165,
        "link": "https://www.deezer.com/artist/27",
        "name": "Daft Punk",
        "albums": 38,
        "picture": "https://cdn-images.dzcdn.net/images/artist/638e69b9caaf9f9f3f8826febea7b543/250x250-000000-80-0-0.jpg"
    },
    "meta": {
        "timestamp": "2026-05-29T23:55:49.398Z",
        "request_id": "5e8144eb-c435-4248-8acb-395900b8499a"
    },
    "status": "ok",
    "message": "Artist retrieved successfully",
    "success": true
}
```

#### `GET /v1/search` — Search tracks, artists or albums

**Parameters:**
- `q` (query, required, string) — Search query Example: `daft punk`
- `type` (query, optional, string) — track | artist | album Example: `track`
- `limit` (query, optional, string) — Max results 1-50 Example: `25`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/music-api/v1/search?q=daft+punk&type=track&limit=25"
```

**Response:**
```json
{
    "data": {
        "type": "track",
        "count": 25,
        "query": "daft punk",
        "results": [
            {
                "id": 66609426,
                "link": "https://www.deezer.com/track/66609426",
                "rank": 954234,
                "album": "Get Lucky (Radio Edit - feat. Pharrell Williams and Nile Rodgers)",
                "cover": "https://cdn-images.dzcdn.net/images/cover/bc49adb87758e0c8c4e508a9c5cce85d/250x250-000000-80-0-0.jpg",
                "title": "Get Lucky (Radio Edit - feat. Pharrell Williams and Nile Rodgers)",
                "artist": "Daft Punk",
                "preview": "https://cdnt-preview.dzcdn.net/api/1/1/1/b/f/0/1bf80a82992903ff685ba1b7275223f8.mp3?hdnea=exp=1780099849~acl=/api/1/1/1/b/f/0/1bf80a82992903ff685ba1b7275223f8.mp3*~data=user_id=0,application_id=42~hmac=65ea5346619b78ccf0f4c094c9e152c8d8fb3db4aaf36f5c45e7e21e48f3556a",
                "album_id": 6516139,
                "duration": 248,
                "explicit": false,
                "artist_id": 27
            },
            {
                "id": 136889400,
                "link": "https://www.deezer.com/track/136889400",
                "rank": 945011,
                "album": "Starboy",
                "cover": "https://cdn-images.dzcdn.net/images/cover/134778e4c4f19ea71c82408300925a9a/250x250-000000-80-0-0.jpg",
                "title": "Starboy",
                "artist": "The Weeknd",
                "preview": "https://cdnt-preview.dzcd
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/track` — Track details

**Parameters:**
- `id` (query, required, string) — Numeric track id Example: `3135556`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/music-api/v1/track?id=3135556"
```

**Response:**
```json
{
    "data": {
        "id": 3135556,
        "link": "https://www.deezer.com/track/3135556",
        "rank": 814839,
        "album": "Discovery",
        "cover": "https://cdn-images.dzcdn.net/images/cover/5718f7c81c27e0b2417e2a4c45224f8a/250x250-000000-80-0-0.jpg",
        "title": "Harder, Better, Faster, Stronger",
        "artist": "Daft Punk",
        "preview": "https://cdnt-preview.dzcdn.net/api/1/1/6/a/2/0/6a2c0a5670afe821e08fc5154909534a.mp3?hdnea=exp=1780099850~acl=/api/1/1/6/a/2/0/6a2c0a5670afe821e08fc5154909534a.mp3*~data=user_id=0,application_id=42~hmac=228d16a44969ac28388f1a127eb6da7b5efb5d346a3dcb3d0f9a7fde1235d2cd",
        "album_id": 302127,
        "duration": 226,
        "explicit": false,
        "artist_id": 27
    },
    "meta": {
        "timestamp": "2026-05-29T23:55:50.250Z",
        "request_id": "db6fc9d9-f1ca-4c2b-b9d0-a79b0aa982eb"
    },
    "status": "ok",
    "message": "Track retrieved successfully",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/music-api
OpenAPI spec: https://www.oanor.com/api/music-api/openapi.json
