Quick start
Play.me APIs allows you to access the entire Play.me music catalog, by simple HTTP calls. The Play.me API call pattern is (when executed by GET HTTP method):
<base_URL> <api_method> <api_parameters> &apikey=<API key>
...where:
<base_URL>ishttp://api.playme.com<api_method>is one of the Play.me API methods, such astrack.get<api_parameters>is the list of method's parameters, according to documentation<apikey>is your API key.
API Basics
Using the simplest API calls listed here api.info, you can return some basic information about the Play.me API.
Open your browser and type in the following address in the URL field:
http://api.playme.com/api.info?apikey=1234567980
Then press Enter and the result will appear. You will need a real API key to see any result, which you can find in your Account Page after you have subscribed to the Play.me music service.
Let's try a code example in PHP (we assume your PHP environment is correctly set up and working).
The PHP code is as follows:
<?php
// the Playme API Base URL
$baseUrl = 'http://api.playme.com/';
// the api method
$apiMethod = 'api.info';
// your apikey (use the one from your account on lab.playme.com)
$apikeyParameter = 'apikey=1234567890';
// compose the HTTP call
$apiInfoCall = $baseUrl . $apiMethod .
'?' . $formatParameter .
'&' . $apikeyParameter;
// retrieve API result:
$result = file_get_contents($apiInfoCall);
echo($result);
?>
Your console will show the following result:
<?xml version="1.0" encoding="UTF-8"?>
<response>
<api>
<version>1.0.0</version>
</api>
<country>
<available>us</available>
<default>us</default>
</country>
<format>
<available>json,jsonp,xml</available>
<default>xml</default>
</format>
</response>
The response will be in XML format, as this is the API default response format. You can ask for a JSON response appending this to the previous call:
This is what you will get:
{
"response": {
"api": {
"version": "1.0.0"
},
"country": {
"available": ["us"],
"default": ["us"]
},
"format": {
"available": ["json", "jsonp", "xml"],
"default": ["xml"]
}
}
}

LOG IN