Rainwave API Documentation

Requests

Core JSON
Allows GETAllow CORSAuth RequiredStation ID RequiredTune In RequiredLogin RequiredDJAdminPaginationURLLink
  API keysid     /api4/album 
  API keysid     /api4/all_albums 
  API keysid     /api4/all_artists 
GET API key    pagination/api4/all_faves 
  API keysid     /api4/all_groups 
GET API key    pagination/api4/all_songs 
  API keysid     /api4/artist 
  phpBB      /api4/bootstrap 
  API keysid    /api4/clear_rating 
  API keysid    /api4/clear_requests 
  API keysid    /api4/clear_requests_on_cooldown 
  API keysid     /api4/current_listeners 
  API keysid    /api4/delete_request 
  API keysid    /api4/fave_album 
  API keysid    /api4/fave_all_songs 
  API key     /api4/fave_song 
  API keysid     /api4/group 
GETCORS sid     /api4/info 
GETCORS sid     /api4/info_all 
  API key      /api4/listener 
  API keysid    /api4/order_requests 
  API keysid    /api4/pause_request_queue 
GET API keysid    pagination/api4/playback_history 
  API keysid    /api4/rate 
  API keysid     /api4/request 
  API keysid    /api4/request_favorited_songs 
  API keysid     /api4/request_line 
  API keysid    /api4/request_unrated_songs 
  API keysid     /api4/search 
  API keysid     /api4/song 
GET API key      /api4/station_song_count 
GETCORS       /api4/stations 
  API keysid     /api4/sync 
GET       pagination/api4/tip_jar 
GET API key      /api4/top_100 
  API keysid    /api4/unpause_request_queue 
  API keysid   pagination/api4/unrated_songs 
  API key      /api4/user_info 
  API keysid   pagination/api4/user_recent_votes 
  API keysid   pagination/api4/user_requested_history 
         /api4/user_search 
  API keysidtunein    /api4/vote 
Statistic HTML
Allows GETAllow CORSAuth RequiredStation ID RequiredTune In RequiredLogin RequiredDJAdminPaginationURLLink
GET phpBB    pagination/pages/all_favesLink
GET phpBBsid     /pages/current_listenersLink
GET phpBBsid    pagination/pages/playback_historyLink
GET phpBB     pagination/pages/tip_jarLink
GET phpBB      /pages/top_100Link
GET phpBBsid   pagination/pages/unrated_songsLink
GET phpBBsid   pagination/pages/user_recent_votesLink
GET phpBBsid   pagination/pages/user_requested_historyLink

Making an API Request

Get the currently playing/election data for Covers/station ID 3 for an anonymous user or external website:

xhr = new XMLHttpRequest();
xhr.open("POST", "http://rainwave.cc/api4/info", true);
xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xhr.onload = function() { console.log(xhr.response) };
xhr.send("sid=3");

Get currently playing/election data for Game/station ID 1 for a user with ID 2:

xhr.open("POST", "http://rainwave.cc/api4/info", true);
xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xhr.send("sid=1&user=2&key=AUTHKEYFROMUSER");

Vote on a song on All/station ID 5:

xhr.open("POST", "http://rainwave.cc/api4/vote", true);
xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xhr.send("sid=5&user=2&key=AUTHKEYFROMUSER&entry_id=1");

Grab album information for album ID 1 on OCR Remix/station ID 2:

xhr.open("POST", "http://rainwave.cc/api4/album", true);
xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xhr.send("sid=2&user=2&key=AUTHKEYFROMUSER&id=1");

Get the 300th to 350th previously played song for Chiptune (using paginated requests):

xhr.open("POST", "http://rainwave.cc/api4/playback_history", true);
xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xhr.send("sid=4&user=2&key=AUTHKEYFROMUSER&id=1&per_page=50&page_start=6");

Please experiment by making requests yourself and looking at the output. Parameters and conditions are noted in the table above.

Station ID For 'sid' Argument