Source: https://dinakar-rewind.docs.pageloop.ai/api-reference/listening/getlisteninghistory

# Listening history

GET `https://api.rewind.rest/v1/listening/history`

Returns paginated scrobble history with optional filters.

## Authorization

#### Authorization (header, string, required)

API key. Read keys (rw\_live\_...) access GET endpoints. Admin keys (rw\_admin\_...) access all endpoints.

## Query Parameters

#### page (query, integer)

#### limit (query, integer)

#### from (query, string)

#### to (query, string)

#### artist (query, string)

#### album (query, string)

## Response

#### 200

Scrobble history

#### data (array of object, required)

#### properties

#### track (object, required)

#### artist (object, required)

#### album (object, required)

#### scrobbled\_at (string, required)

#### pagination (object, required)

#### properties

#### page (integer, required)

#### limit (integer, required)

#### total (integer, required)

#### total\_pages (integer, required)

#### 401

Unauthorized

#### error (string, required)

#### status (integer, required)

#### Request

```bash cURL
curl -X GET 'https://api.rewind.rest/v1/listening/history' \
  -H 'Authorization: Bearer <token>'
```

```javascript JavaScript
const res = await fetch('https://api.rewind.rest/v1/listening/history', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer <token>',
  },
});
const data = await res.json();
```

```python Python
import requests

res = requests.get(
    'https://api.rewind.rest/v1/listening/history',
    headers={'Authorization': 'Bearer <token>'}
)
data = res.json()
```

#### Response

```json 200
{
  "data": [
    {
      "track": {
        "id": "\u2026",
        "name": "\u2026",
        "url": "\u2026",
        "apple_music_url": "\u2026",
        "preview_url": "\u2026"
      },
      "artist": {
        "id": "\u2026",
        "name": "\u2026"
      },
      "album": {
        "id": "\u2026",
        "name": "\u2026",
        "image": "\u2026"
      },
      "scrobbled_at": "string"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 150,
    "total_pages": 8
  }
}
```

```json 401
{
  "error": "Not found",
  "status": 404
}
```
