Catalogue
Connexion
Our API allows you to retrieve informations from our website via GET request and supports the following query parameters:

Name Meaning Description
t (required) Query type. This parameter specify the type of the query, u is for profile informations, t is for tracks informations.
q (required) Requested username. The t parameter supports two values:
  • u = username [returns basic profile informations containing the following]
    • id = returns the unique user id
    • username = returns the username
    • first_name = returns the first name
    • last_name = returns the last bame
    • website = returns the website
    • description = returns the description
    • country = returns the country
    • city = returns the city
    • postal = returns the postal
    • image = returns the profile avatar image
    • facebook = returns the facebook
    • twitter = returns the twitter
    • gplus = returns the gplus
    • youtube = returns the youtube
    • vimeo = returns the vimeo
    • tumblr = returns the tumblr
    • soundcloud = returns the soundcloud
    • myspace = returns the myspace
    • lastfm = returns the lastfm
  • t = track [returns informations about the track id]
    • id = returns the unique track id
    • title = returns the track title
    • description = returns the description of the track
    • art = returns the track artwork image
    • tag = returns the tag list
    • soundcloud = returns the soundcloud url
    • beatport = returns the beatport url
    • youtube = returns the youtube url
    • itunes = returns the itunes url
    • spotify = returns the spotify url
    • deezer = returns the deezer url
    • gplay = returns the gplay url
    • tidal = returns the tidal url
    • record = returns the record label
    • release = returns the release date
    • license = returns the license type
    • time = returns the date time when was published
    • views = returns the number of views (times played)
    • downloads = returns the number of downloads


Examples of requests:

For profile information of a user:
http://www.madafakamusic.com/api.php?t=u&q=USERNAME

For information of id track:
http://www.madafakamusic.com/api.php?t=t&id=IDTRACK


An example of json decoding would be the following PHP code for user information:

<?php
header('Content-Type: text/plain; charset=utf-8;');
$file = file_get_contents("http://www.madafakamusic.com/api.php?t=u&q=USERNAME");
print_r(json_decode($file));
?>



An example of json decoding would be the following PHP code for track information:

<?php
header('Content-Type: text/plain; charset=utf-8;');
$file = file_get_contents("http://www.madafakamusic.com/api.php?t=t&id=IDTRACK");
print_r(json_decode($file));
?>