Listening

Genre breakdown

GET https://api.rewind.rest/v1/listening/genres

Returns a genre breakdown over time, grouped by period and designed for stacked bar charts.

Authorization

Authorizationheaderstringrequired

API key. Read keys (rw_live_...) access GET endpoints. Admin keys (rw_admin_...) access all endpoints.

Query Parameters

datequerystring

Single day (YYYY-MM-DD). Overrides from/to.

fromquerystring

Range start, inclusive (ISO 8601)

toquerystring

Range end, inclusive (ISO 8601)

group_byqueryenum (string)
Allowed valuesweekmonthyear
limitqueryinteger

Max genres to return (rest grouped as "Other")

compare_toqueryenum (string)

When set to previous_year, returns a compare array with the same shape as data but for the window shifted back one year. Requires from + to or date to be set; ignored otherwise.

Allowed valuesprevious_year

Response

application/json

Genre breakdown by period

dataarray of objectrequired
comparearray of object