Infomaniak Streaming Radio icon

Infomaniak Streaming Radio

Interact with Infomaniak Streaming Radio API

Actions141

Stats > Stations → Export Stats

AI-generated

Summary

Export station statistics for a given radio product within a specified time range.

Inputs

  • authentication — Authentication method, either OAuth2 or API Key.
  • path_radio_product_id (required) — Unique identifier of the radio product to request statistics for.
  • path_station_id (required) — Unique identifier of the station to request statistics for.
  • query_datatype (required) — Type of statistics to return; options include consumption, countries, listeners, listeners_by_stream, listeners_per_minute, players.
  • query_from (required) — Start of the time range for the statistics (inclusive).
  • query_to (required) — End of the time range for the statistics (exclusive).
  • queryParameters — Additional query parameters; can include stream IDs or enable HLS stats.
  • returnFullResponse — If true, the full API response is returned; otherwise only the relevant statistics are returned.

Output shape

An array of objects containing the requested station statistics

The response body matches the selected datatype; no pagination; errors follow the API error envelope.

Examples

Example 1: Export listeners count for a station between two dates using OAuth2

authentication: OAuth2; path_radio_product_id: 123; path_station_id: 456; query_datatype: listeners; query_from: '2024-01-01'; query_to: '2024-02-01'; returnFullResponse: false

Example 2: Export consumption data with additional stream IDs and HLS stats enabled

authentication: API Key; path_radio_product_id: 987; path_station_id: 654; query_datatype: consumption; query_from: '2023-10-01'; query_to: '2023-10-31'; queryParameters: {query_stream_ids: 'stream1,stream2', query_with_hls_stats: true}; returnFullResponse: false

Example 3: Get full API response for all available datatypes

authentication: OAuth2; path_radio_product_id: 111; path_station_id: 222; query_datatype: listeners_per_minute; query_from: '2025-01-01'; query_to: '2025-01-31'; returnFullResponse: true

Links

Discussion