API Reference

Retrieve on-air, now-playing events from specified stations

/stations/{rpuids}/onair

Returns all information about on-air or now-playing shows and broadcasts from specified stations.

You can also, optionally, retrieve shows and their contained events that are playing next, where available.

 Endpoint

Base URL: https://api.radioplayer.org/v2/stations/{rpuids}/onair

Request Parameters

Header Fields

To find out how to correctly construct authentication headers for the Radioplayer Partner API (WRAPI) please see the Authentication guide.

Lookup what's playing on air by station

/v2/stations/3722,372101/onair
PATH PARAMETER VALUE
{rpuids} Specifies one or more station objects by their rpuid, which can be requested using a comma separated list.

Query Parameters

QUERY PARAMETER VALUE
next Optional. A Boolean value indicating whether you would like to receive the following show in the schedule. Defaults to false.

Response

When successful, the HTTP status code in the response header is 200 OK. An array of show objects, children of one or more station objects, are returned in JSON format (or on special request, XML supported by the RadioDNS schema). A show object may contain a number of event objects, which represent songs, news segments, interviews, etc.

content-type: application/json; charset=utf-8
x-ratelimit-limit: 300000
x-ratelimit-remaining: 285030
x-ratelimit-reset: 1585699200

If there is an error, the header returns an error status code.

The WRAPI also includes information about your monthly request quota in the returned header:

This includes information on:

  • Your total monthly quota
  • How many requests you have remaining for the month
  • When the quota will be reset, given as a UNIX timestamp.

The returned response body consists of nested meta and data objects.

The possible meta field values for this endpoint are:

Example Response Body

    {
    "data": [
        {
        "data": [
            {
            "song": {},
            "show": {
                "name": "The No Repeat Guarantee",
                "description": "Leona Graham brings you the No Repeat Guarantee - loads of great music and you'll never..."
            }
            }
        ],
        "meta": {
            "country": "826",
            "rpuid": "826100",
            "paginated": false,
            "nesting": false,
            "fromCache": false,
            "cacheExpiresAt": 1585307959699,
            "count": 1
        }
        }
    ],
    "meta": {
        "nesting": true,
        "paginated": false,
        "dataType": "onair",
        "count": 1,
        "fromCache": false,
        "cacheExpiresAt": null
    }
    }
FIELD VALUE
paginated Optional, Boolean. Sets how or if results are grouped into pages.

For more information on pagination, see the API Documentation index.
nesting Optional, Boolean. Indicates whether full data objects are nested within other objects.

For more information on nesting, see the API Documentation index.
dataType Object type returned by the request. In this case the object is onair.
count Optional, string. A number describing how many items are in the data set.
fromCache Optional, Boolean. Indicates whether this data came from cached data.

For more information on caching, please see the API Documentation index
cacheExpiresAt Optional. UNIX timestamp indicating when the cache will expire.

For more information on caching, please see the API Documentation index
country String. Three digit country code representing origin of station
rpuid String. Unique identifier for the station.

The possible data field values for this endpoint are:

FIELD VALUE
song
↳ artist
String, Optional. If a musical performance is playing, this field contains the artist, if known
song
↳ name
String, Optional. If a musical performance is currently being broadcast, this field is the title of the track
song
↳ start
Date, Optional. An RFC3339-formatted date stamp indicating the time of day when broadcast of this segment began.
song
↳ stop
Date, Optional. An RFC3339-formatted date stamp indicating the time of day when broadcast of this segment will end.
show
↳ name
String, Optional. The name of the current radio programme on air.
show
↳ description
Sring, Optional. A short description of the programme (128 characters).