API
Documentation

Introduction

Calling all developers! UpBeat now has a public api, so you can now integrate upbeat into your applications! Whether your creating a discord bot for internet radio stations, or just a status page, our api can let you do that.

Upbeat's API is currently at version 1.
Upbeat's API base URL is https://upbeatradio.net/api/v1.

Bugs

Please contact an Administrator if you encounter any bugs or errors. Whether this may be a full 500 or a wrong parameter, please contact.


GET /stats

This method allows you to get:

  • Who is on air at the moment.
  • Extensive metadata on the current song playing.
  • Listener Count.

NOTES

"played" is the number of times that song has been played on upbeat.
"day" is the day of the week the slot is taking place.
"hour" is the hour of the day that the slot is taking place.
"spotify_id" will return -1 if there is none set.
"preview" will return -1 if there is none set.
"likes" will return -1 if auto dj is onair.
"id" will return -1 if auto dj is onair.
If the current slot is a weekly show the parameters will stay the same with the exception of a "show": true parameter being added.

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": 17,
   "listen_url": "https:\/\/live.upbeat.pw:443"
}
            

GET /recentlyPlayed

This method allows you to get:

  • The recent 50 songs that have been played on upbeat.

NOTES

The example response is limited to 2 songs.
"played" is the number of times that song has been played on upbeat.
"spotify_id" will return -1 if there is none set.
"preview" will return -1 if there is none set.
"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 2 slots.
"week" is the week of the year that the slot is taking place.
"day" is the day of the week the slot is taking place.
"hour" is the hour of the day that 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"
   }
   ...
]
            
By using this site you agree to the use of Cookies, as described in our Cookie Policy.
Continue