# ListenBrainz API
> A live window into ListenBrainz — the open, MetaBrainz-run music-scrobbling social network, the open-data answer to Last.fm — as an API. Pull the sitewide listening charts: the most-listened artists, recordings or releases over a week, month, quarter, year or all time, each with its listen count; a user's most recent listens; or what a user is playing right now. The pulse of what the open-music community is listening to, delivered as clean JSON for music, social and dashboard apps. Live data, no key. Distinct from music-metadata and lyrics APIs.

## 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/listenbrainz-api/..."
```

## Pricing
- **Free** (Free) — 600 calls/Mo, 5 req/s
- **Starter** ($6/Mo) — 14,000 calls/Mo, 15 req/s
- **Pro** ($16/Mo) — 68,000 calls/Mo, 30 req/s
- **Business** ($41/Mo) — 340,000 calls/Mo, 50 req/s

## Endpoints

### Charts

#### `GET /v1/charts` — Sitewide listening charts

**Parameters:**
- `entity` (query, optional, string) — artists | recordings | releases Example: `artists`
- `range` (query, optional, string) — week | month | quarter | year | all_time Example: `week`
- `count` (query, optional, string) — Max 1-100 Example: `25`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/listenbrainz-api/v1/charts?entity=artists&range=week&count=25"
```

**Response:**
```json
{
    "data": {
        "count": 25,
        "range": "week",
        "charts": [
            {
                "mbid": "69158f97-4c07-4c4e-baf8-4e4ab1ed666e",
                "name": "Boards of Canada",
                "rank": 1,
                "title": null,
                "artist": "Boards of Canada",
                "listen_count": 33354
            },
            {
                "mbid": "f59c5520-5f46-4d2c-b2c4-822eabf53419",
                "name": "Linkin Park",
                "rank": 2,
                "title": null,
                "artist": "Linkin Park",
                "listen_count": 17407
            },
            {
                "mbid": "a74b1b7f-71a5-4011-9441-d0b5e4122711",
                "name": "Radiohead",
                "rank": 3,
                "title": null,
                "artist": "Radiohead",
                "listen_count": 13545
            },
            {
                "mbid": "9fff2f8a-21e6-47de-a2b8-7f449929d43f",
                "name": "Drake",
                "rank": 4,
                "title": null,
                "artist": "Drake",
                "listen_count": 12043
            },
            {
                "mbid": "20244d07-534f-4eff-b4d4-930878889970",
                "name": "Taylor Swift",
                "rank": 5,
                "title": null,
                "artist": "Taylor Swift",
                "listen_count": 11600
            },
            {
                "mbid": "164f0d73-1234-4e2c-8743-d77bf2191051",
…(truncated, see openapi.json for full schema)
```

### Users

#### `GET /v1/now-playing` — What a user is playing now

**Parameters:**
- `username` (query, required, string) — Username Example: `rob`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/listenbrainz-api/v1/now-playing?username=rob"
```

**Response:**
```json
{
    "data": {
        "track": null,
        "username": "rob",
        "playing_now": false
    },
    "meta": {
        "timestamp": "2026-06-09T03:03:26.257Z",
        "request_id": "8b8efc82-034d-47d5-8323-3378f3073d26"
    },
    "status": "ok",
    "message": "Now playing retrieved successfully",
    "success": true
}
```

#### `GET /v1/user` — A user's recent listens

**Parameters:**
- `username` (query, required, string) — Username Example: `rob`
- `count` (query, optional, string) — Max 1-100 Example: `25`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/listenbrainz-api/v1/user?username=rob&count=25"
```

**Response:**
```json
{
    "data": {
        "count": 25,
        "listens": [
            {
                "track": "Some Resolve",
                "artist": "Röyksopp",
                "release": "Profound Mysteries II",
                "listened_at": "2026-02-18T11:28:29.000Z",
                "recording_mbid": "30d08f4c-d825-4ae1-b79c-44242cddd7c0"
            },
            {
                "track": "Tell Him",
                "artist": "Röyksopp feat. Susanne Sundfør",
                "release": "Profound Mysteries II",
                "listened_at": "2026-02-18T11:21:46.000Z",
                "recording_mbid": "46f0b53f-6731-457c-93e7-57cff0e5b0c2"
            },
            {
                "track": "Remembering the Departed",
                "artist": "Röyksopp",
                "release": "Profound Mysteries II",
                "listened_at": "2026-02-18T11:16:20.000Z",
                "recording_mbid": "a8eb2940-b706-4e35-afd2-f15feec4eb20"
            },
            {
                "track": "It Was a Good Thing",
                "artist": "Röyksopp feat. Pixx",
                "release": "Profound Mysteries II",
                "listened_at": "2026-02-18T11:12:30.000Z",
                "recording_mbid": "100bdac3-db86-41ba-b987-6f639914834c"
            },
            {
                "track": "Control",
                "artist": "Röyksopp",
                "release": "Profound Mysteries II",
                "listened_at": "2026-02-18T11:08:17.000Z",
                "reco
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Service metadata

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/listenbrainz-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "ranges": [
            "week",
            "month",
            "quarter",
            "year",
            "all_time"
        ],
        "source": "ListenBrainz public API (live)",
        "service": "listenbrainz-api",
        "entities": [
            "artists",
            "recordings",
            "releases"
        ],
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/user": "A user's recent listens (username=, e.g. rob, count).",
            "GET /v1/charts": "Sitewide listening charts (entity=artists|recordings|releases, range=week|month|quarter|year|all_time, count).",
            "GET /v1/now-playing": "What a user is playing now (username=)."
        },
        "description": "Live data from ListenBrainz, the open MetaBrainz music-scrobbling network: sitewide listening charts (most-listened artists, recordings or releases by week/month/year/all-time with listen counts), a user's recent listens, and what a user is playing now. Live, no key. Distinct from music-metadata and lyrics APIs.",
        "upstream_status": "ok"
    },
    "meta": {
        "timestamp": "2026-06-09T03:03:27.829Z",
        "request_id": "0d5cc58f-a409-4434-8553-e6c8bef09a89"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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