<!-- Include the library --><script src="playdar.js"></script><script>/* First, set the client up with some callbacks. */
Playdar.setupClient({
// Called when the browser is authorised to query Playdar.onAuth: function () {
// At this point, we can query the Playdar API for a track and start polling for matches.
Playdar.client.resolve("Artist", "Track");
},
// Called in response to each poll with the results so far.onResults: function (response, lastPoll) {
console.log('Polling ' + response.qid);
if (lastPoll) {
// Take a look at the final response.
console.dir(response);
}
}
});
/* The client is now ready to check in with Playdar. */
Playdar.client.go();
</script>

Fill in the form values and press return or click the “go” button for a live demo. The number of results will appear below:

In ProgressNo ResultsPartial MatchesPerfect Match

Who’s using Playdar.js?

Playlick - Playlist player/manager that lets you import playlists from Last.fm, Spotify, XSPF and podcasts. You can also import album listings and generate a playlist by combining two Last.fm profiles.

Playgrub - Extract playlists from web pages with a handy bookmarklet and a cute logo.