Skip to content
HooprB2B

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-top
scopeanalytics:read
Query parameters
  • pageintegeroptionaldefault 1
    Page number.
  • pageSizeintegeroptionaldefault 20
    Items 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

HTTPerror.typeMeaning
401invalid_tokenToken missing, malformed or expired.
403insufficient_scopeToken lacks analytics:read.
429rate_limitedOver 600 requests/minute.