API reference
Top / popular tracks
The most-licensed tracks across the catalog. Each item is a track object plus a usageCount field.
GET
/v1/tracks-topscope
analytics:readQuery parameters
pageintegeroptionaldefault1Page number.pageSizeintegeroptionaldefault20Items per page (max 100).
Request
GET /v1/tracks-top
curl "https://<your-b2b-host>/v1/tracks-top?page=1&pageSize=50" \
-H "Authorization: Bearer $TOKEN"Response
Requires the analytics:read scope. The usageCount is the number of times a track has been licensed.
{
"data": {
"totalRecords": 200,
"totalPages": 4,
"currentPage": 1,
"pageSize": 50,
"items": [
{
"id": "9b1c0f2e-3a4b-4c5d-8e6f-7a8b9c0d1e2f",
"name": "Midnight Drive",
"slug": "midnight-drive",
"type": "music",
"durationSeconds": 184,
"usageCount": 4821,
"artworkUrl": "https://cdn.hoopr.example/musics/9b1c.../image.jpg"
}
]
},
"error": { "code": 0, "message": "OK" }
}Errors
| HTTP | error.type | Meaning |
|---|---|---|
| 401 | invalid_token | Token missing, malformed or expired. |
| 403 | insufficient_scope | Token lacks analytics:read. |
| 429 | rate_limited | Over 600 requests/minute. |