Knowledge base
1000 FAQs, 500 tutorials and instructional videos. Here, there are only solutions!
Manage Auto DJ metadata with a custom Streaming Radio player
This guide details how to manage and display metadata (titles, artists) and album covers for a Streaming Radio / Auto DJ stream when using a custom audio player.
Prerequisites
- Obtain your radio station ID: the
station_idvalue is essential for querying the metadata and cover art APIs; this is the station ID and not the radio pack ID, which you can find:- via an API call,
- or directly from the URL of your dashboard on the Infomaniak Manager:
https://manager.infomaniak.com/v3/{account_id}/ng/streaming-radio/pack/{pack_id}/station/{station_id}/dashboard
View the metadata of the tracks being played
The dynamic display of titles and album covers on a custom player relies on public API requests (no authentication required); you can obtain the list of metadata (❓: help) for the 100 most recent tracks broadcast on your radio station via a browser or by using a GET request:
https://metadata.infomaniak.com/api/radio/{station_id}/metadata
Data Format
The most recent broadcast title is always at the end of the list. Each title is described in the following format:
{
"duration": 565,
"date": 1791303566,
"microtime": 1791303566.10439,
"title": "ARTIST - SONG TITLE",
"cover": null
}Details:
- title: metadata formatted as ARTIST - TITLE
- date: start timestamp of the title expressed in Unix time
- microtime: precise timestamp to the microsecond in Unix time
- duration: duration of the track in seconds (present only if the track is not currently playing, corresponding to the difference in seconds between the receipt of the metadata for this track and the next).
- cover: this field is not used in this route and returns the value
null; to obtain the cover images, please refer to the section below.
Note: The timestamp is expressed in Unix time; it can be converted automatically or using online tools such as UnixTimestamp or EpochConverter…
Retrieve album covers
Two API routes are available to retrieve the album cover of a track on your radio:
- Cover image for the currently playing track (recommended):
GET https://metadata.infomaniak.com/api/radio/{station_id}/metadata-cover?currentTimeOfPlayer={unixtime}
Provide the current UTC time in Unix format in thecurrentTimeOfPlayerparameter. This method is recommended for its fast execution. - List of recent covers:
GET https://metadata.infomaniak.com/api/radio/{station_id}/metadata-all-cover
This method returns all the most recently broadcast covers.
Link to this FAQ: https://faq.infomaniak.com/2912
Has this FAQ been helpful?