I\'ve inherited a database of Soundcloud IDs and would like to build a page linking to each track on Soundcloud. Is it possible to link to a track on the Soundcloud website
First you will need to register an app at https://soundcloud.com/you/apps.
Then use the API to return a JSON object of the track using the track ID and your client ID.
e.g. (using jQuery) …
$.ajax({
url: "http://api.soundcloud.com/playlists/405726.json?client_id=XXXX",
type: 'GET',
success: function (data) {
console.log(data);
}
});
Where XXX is your Client ID.
You can scrape it from the "widget" URL
https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/{trackId}
contains a link element
<link rel="canonical" href="{canonicalURI}">
It seems that the way to do this is to use the API. With a track number, you can call
http://api.soundcloud.com/tracks/12345678.json?client_id=YOUR_CLIENT_ID
This returns a JSON object with a permalink_url
property which gives you the full url including the user and track name.
See the API tracks documentation for more details.