Developers
The InternetDJ.com Developers portal allows you to integrate InternetDJ music, data and tools within your own platforms.
We welcome you to incorporate InternetDJ.com APIs within your application. Access to our APIs requires a key and queries are currently limited to 500 per day. If you'd like to access our APIs, apply for a key.
Service URL: HTTP
| url | method | description |
|---|---|---|
| http://www.internetdj.com/developers/api.php | GET or POST | Submit your request to this url via GET or POST, passing the required and optional variables outlined below. HTTPs is also available. |
Service Inputs
| Field | Type | Description |
|---|---|---|
| api_key | required | License key assigned to your account. Request your key. |
| format | optional | We output JSON by default and is currently the only output option. Can be set to:
|
| request_type | required | This is the type of data you are requesting. Can be set to:
|
| genre_id | optional | After you retrieve the list of genres from the "genre" request type, you will have the genre IDs and can use them with the request types artistsbygenre and songsbygenre. |
| artist_id | optional | After you retrieve the list of artists from the "artistsbygenre" request type, you will have the artist IDs and can use them with the request types songsbyartist. |
JSON: Service Outputs
| Request Type | Format | Description and Output |
|---|---|---|
| genre | array | Array containing all top level and sub-genres. Sub-genres are linked to the top level genre by parent_genre_id. The data returned includes:
|
| artistsbygenre | array | Array containing all artists with metadata related to the genre ID passed. The data returned includes:
|
| songsbyartist | array | Array containing all songs with metadata related to the artist ID passed. The data returned includes:
|
| songsbygenre | array | Array containing last 100 songs uploaded with metadata related to the genre ID passed. The data returned includes:
|
| sotd | array | Array containing the current song of the day. The data returned includes:
|
Code Samples
Here's an example of how to create a list of the top-level genres using JQuery & our JSON API. Replace API_KEY with your own.
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
</head>
<body>
<ul id="genres" data-role="listview"></ul>
<script>
$(document).ready(function(){
$.getJSON("http://www.internetdj.com/developers/api.php?api_key=API_KEY&request_type=genre", function(genres){
$.each(genres, function(i,genre) {
if(genre.parent_genre_id=='0') {
var s_gen=encodeURIComponent(genre.genre_name);
$('#genres').append('<li>'+genre.genre_name+'</li>');
}
});
$('#genres').listview('refresh');
});
});
</script>
</body>
</html>
Contributions
- InternetDJ for Drupal
- Download: internetdj-drupal.tar.gz
- About: The first interation of our Drupal plugin provides a block that embeds InternetDJ radio into your Drupal installation.
- Install: Download and unpack into your drupal modules directory, browse to your module admin and activate. Browse to the module settings to set autoplay options.
If you'd like us to include your InternetDJ module contributions, please contact us.
Need some help? Ask in our Forum.

