UpBeat's API is a web service that allows you to access certain parts of data of the UpBeat site.
UpBeat provides a public API for your use, allowing you to intergrate it where you wish, as long as it doesn't directly harm UpBeat, its services or our data. Typical use of our API consists of a few simple calls, which are detailed below.
UpBeat's API is currently at Version 1.
UpBeat's API base URL is https://upbeatradio.net/api/v1.
Please contact an Administrator if you encounter any bugs or errors.
GET /stats
This method allows you to get:
- The current Presenter on-air.
- Extensive metadata on the current song playing.
- The listener count.
Notes
"played" is the number of times that song has been played on UpBeat.
"day" refers to the weekday on which the slot is held.
"hour" refers to the time of day when the slot is taking place.
"spotify_id" will return -1 if there is none specified.
"preview" will return -1 if there is none specified.
"likes" will return -1 if Auto DJ (UpBeat Stream) is on-air.
"id" will return -1 if Auto DJ (UpBeat Stream) is on-air.
If the current slot is a weekly show, the parameters will remain unchanged with the addition of a "show: true" parameter.
Example Response:
{
"song": {
"title": "Vossi Bop",
"artist": "Stormzy",
"art": "https:\/\/i.scdn.co\/image\/4cd307b8e20d22edd53b057762939c70ba7fb482",
"preview": "https:\/\/p.scdn.co\/mp3-preview\/b3836168720465c84df242690ea49f6a855a6cde?cid=3e2461fb11204f6ea0dcb949097ac62b",
"spotify_id": "44ZJ4hLD5onikKsVLQaILr",
"likes": 39,
"dislikes": 18,
"favourites": 9,
"played": 256
},
"onair": {
"name": "Dean",
"likes": 12,
"profile_url ":"https:\/\/upbeatradio.net\/v3\/Account.Profile?user=Dean.3204",
"avatar": "https:\/\/upbeatradio.net\/staff\/_assets\/_avatarImages\/avatar_3204.png?1600796777",
"id": "3204",
"day": 3,
"hour": 6,
"socials":{
"snapchat": "deanbelsey",
"instagram": "dean.belsey"
}
},
"last_updated": "28\/Oct\/2020:06:51:38 +0000",
"listeners": 120,
"listen_url": "https:\/\/live.UpBeat.pw:443"
}
GET /recentlyPlayed
This method allows you to get:
- The last 50 songs that have been played on UpBeat.
Notes
The example response is limited to two songs.
"played" is the number of times that song has been played on UpBeat.
"spotify_id" will return -1 if there is none specified.
"preview" will return -1 if there is none specified.
"time" is the epoch date of when that song was played.
Example Response:
[
{
"title": "Giant",
"artist": "Calvin Harris",
"preview": "https:\/\/p.scdn.co\/mp3-preview\/0f2bfeddc5705a09caf868f7e5aebf7e9fd8b6bd?cid=3e2461fb11204f6ea0dcb949097ac62b",
"spotify_id": "5itOtNx0WxtJmi1TQ3RuRd",
"likes": 54,
"dislikes": 4,
"favourites": 13,
"played": 413,
"time": 1603947714
},
{
"title": "Roses (Imanbek Remix)",
"artist": "SAINt JHN",
"preview": "https:\/\/p.scdn.co\/mp3-preview\/857ba479318b91a6ab733143b985fd5f60f74045?cid=3e2461fb11204f6ea0dcb949097ac62b",
"spotify_id": "2Wo6QQD1KMDWeFkkjLqwx5",
"likes": 3,
"dislikes": 0,
"favourites": 2,
"played": 21,
"time": 1603947694
}
...
]
GET /booked
This method allows you to get:
- The current weeks booked slots.
Notes
The example response is limited to two slots.
"week" refers to the week in that year on which the slot is held.
"day" refers to the weekday on which the slot is held.
"hour" refers to the time of day when the slot is taking place.
Example Response:
[
{
"name": "Chezzer",
"avatar": "https:\/\/upbeatradio.net\/staff\/_assets\/_avatarImages\/avatar_1085.png?1601510878",
"user_id": 1085,
"day": 1,
"hour": 0,
"week": 44,
"profile_url": "https:\/\/upbeatradio.net\/v3\/Account.Profile?user=Chezzer.1085"
},
{
"name": "Jack",
"avatar": "https:\/\/upbeatradio.net\/staff\/_assets\/_avatarImages\/avatar_1.png?1601924033",
"user_id": 1,
"day": 1,
"hour": 1,
"week": 44,
"profile_url": "https:\/\/upbeatradio.net\/v3\/Account.Profile?user=Jack.1"
}
...
]