Browse the best premium and free APIs on the world's largest API Hub. Read about the latest API news, tutorials, SDK documentation, and API examples. RapidAPI offers free APIs all within one SDK. One API key. One dashboard. Tiktok, Douyin, Capcut, Threads, Instagram, Facebook, Espn, Kuaishou, Pinterest, imdb, imgur, ifunny, Reddit, Youtube, Twitter, Vimeo, Snapchat, Bilibili, Dailymotion, Sharechat, Linkedin, Tumblr, Hipi, Telegram, Getstickerpack, Xvideos, Xnxx, Xiaohongshu, Weibo, Miaopai, Meipai, Xiaoying, National Video, Yingke, Soundcloud, Mixcloud, Spotyfi, Zingmp3. Interface support list: Interface without watermark: Tiktok, Douyin, Hipi, Kuaishou, Snapchat. Extremely stable: Tiktok, Douyin, Capcut, ... v1.0.1 - Initial Release - 08/18/2019 v1.0.2 - Fixed bug when using proxies - 08/19/2019 v1.0.3 - Updated file where key is found - 01/01/2020 v1.0.4 - Update to automatically find file with key - 03/09/2020 Explore APIGet explore categories
https://api-v2.soundcloud.com/explore/categories?limit=10&offset=0&linked_partitioning=1&client_id=ID_HERE
Example
https://api-v2.soundcloud.com/explore/categories?limit=10&offset=0&linked_partitioning=1&client_id=02gUJC0hH2ct1EGOcYXQIzRFU91c72Ea&app_version=d8c55ad
Get tracks from explore category
https://api-v2.soundcloud.com/explore/CATEGORY_NAME_HERE?tag=out-of-experiment&limit=10&offset=0&linked_partitioning=1&client_id=ID_HERE
Example
https://api-v2.soundcloud.com/explore/Hip+Hop+%26+Rap?tag=out-of-experiment&limit=10&client_id=ID_HERE
New Search APISearch Everything
https://api-v2.soundcloud.com/search?q=antidote&facet=model&user_id=698189-13257-213778-325874&limit=10&offset=0&linked_partitioning=1&client_id=02gUJC0hH2ct1EGOcYXQIzRFU91c72Ea&app_version=d8c55ad
Search only tracks
https://api-v2.soundcloud.com/search/tracks?q=antidote&facet=genre&user_id=698189-13257-213778-325874&limit=10&offset=0&linked_partitioning=1&client_id=02gUJC0hH2ct1EGOcYXQIzRFU91c72Ea&app_version=d8c55ad
New Charts APIGet All-Music Chart
https://api-v2.soundcloud.com/charts?kind=top&genre=soundcloud%3Agenres%3Aall-music&client_id=02gUJC0hH2ct1EGOcYQXIzRFU91c72Ea&limit=20&offset=0&linked_partitioning=1&app_version=1461312517
The SDKs will make it easier to access the SoundCloud API on your framework of choice. We officially provide and support only JavaScript. All other SDKs (Ruby, Python) are supported by third-party developers. We welcome contributions to the open source projects so imagine how happy we'd be if you submit an SDK of your own for any additional language. JavaScript SDKThe JavaScript SDK lets you easily integrate SoundCloud into your website or webapp. Basic UseTo start using the SDK just add this script to your HTML and initialize the client with your own
var SC = require('soundcloud');
SC.initialize({
client_id: 'YOUR_CLIENT_ID',
redirect_uri: 'https://example.com/callback'
});
2 and optionally your
var SC = require('soundcloud');
SC.initialize({
client_id: 'YOUR_CLIENT_ID',
redirect_uri: 'https://example.com/callback'
});
3 in case you want to use authentication:
<script src="https://connect.soundcloud.com/sdk/sdk-3.3.2.js"></script>
<script>
SC.initialize({
client_id: 'YOUR_CLIENT_ID',
redirect_uri: 'https://example.com/callback'
});
</script>
You can also install the SDK via NPM now:
var SC = require('soundcloud');
SC.initialize({
client_id: 'YOUR_CLIENT_ID',
redirect_uri: 'https://example.com/callback'
});
4.
var SC = require('soundcloud');
SC.initialize({
client_id: 'YOUR_CLIENT_ID',
redirect_uri: 'https://example.com/callback'
});
Once that's done you are all set and ready to use the SoundCloud API. For example getting a user's latest track:
SC.get('/user/183/tracks').then(function(tracks){
alert('Latest track: ' + tracks[0].title);
});
The JavaScript SDK is open source and can be found on Github. If you are looking for example applications, have a look at . AuthenticationTo use the authentication you have to host a
var SC = require('soundcloud');
SC.initialize({
client_id: 'YOUR_CLIENT_ID',
redirect_uri: 'https://example.com/callback'
});
5 file on your server and set it as the
var SC = require('soundcloud');
SC.initialize({
client_id: 'YOUR_CLIENT_ID',
redirect_uri: 'https://example.com/callback'
});
3 in your app settings and when initializing the SDK. This
var SC = require('soundcloud');
SC.initialize({
client_id: 'YOUR_CLIENT_ID',
redirect_uri: 'https://example.com/callback'
});
5 file needs to contain just a few lines:
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Connect with SoundCloud</title>
</head>
<body onload="window.setTimeout(window.opener.SC.connectCallback, 1)">
<b style="text-align: center;">This popup should automatically close in a few seconds</b>
</body>
</html>
You initiate the connect flow by calling
var SC = require('soundcloud');
SC.initialize({
client_id: 'YOUR_CLIENT_ID',
redirect_uri: 'https://example.com/callback'
});
8. Once your users are authenticated and authorized, your app is allowed to use the HTTP methods , and to create comments, liking a track or updating user profiles. The following example shows how to follow a user, after connecting the current user:
SC.initialize({
client_id: 'YOUR_CLIENT_ID',
redirect_uri: 'https://example.com/callback'
});
SC.connect().then(function(){
return SC.put('/me/followings/183');
}).then(function(user){
alert('You are now following ' + user.username);
}).catch(function(error){
alert('Error: ' + error.message);
});
Relevant methods: , , , APIThe SDK provides easy access to all HTTP endpoints through the , , and methods. For a list of available endpoints, check the API Reference.
SC.put('/me', {
user: { description: 'I am using the SoundCloud API!' }
}).then(function(){
return SC.get('/me');
}).then(function(me){
console.log(me.description);
}).catch(function(error){
alert('Error: ' + error.message);
});
StreamingStreaming tracks from the SDK is powered by the same player that is also used on soundcloud.com to ensure the best playback experience.
SC.stream('/tracks/293').then(function(player){
player.play();
});
The player has all basic methods to control the playback flow like
var SC = require('soundcloud');
SC.initialize({
client_id: 'YOUR_CLIENT_ID',
redirect_uri: 'https://example.com/callback'
});
9,
SC.get('/user/183/tracks').then(function(tracks){
alert('Latest track: ' + tracks[0].title);
});
0,
SC.get('/user/183/tracks').then(function(tracks){
alert('Latest track: ' + tracks[0].title);
});
1,
SC.get('/user/183/tracks').then(function(tracks){
alert('Latest track: ' + tracks[0].title);
});
2, etc. Relevant methods: RecordingThe SDK uses getUserMedia, Web Workers and the Web Audio API to record from a user's computer, so make sure to check if the user's browser supports all of it (, , ) before you start recording. This example will record 5 seconds and play it back right away:
var recorder = new SC.Recorder();
recorder.start();
setTimeout(function(){
recorder.stop();
recorder.play();
}, 5000);
In addition to recording from the user's computer, the SDK also supports recording from an arbitrary AudioNode by passing it to the Recorder's constructor. Check out the and the for more information. Relevant methods: UploadingYou can upload recordings and files using the SDK's
SC.get('/user/183/tracks').then(function(tracks){
alert('Latest track: ' + tracks[0].title);
});
3 method. This method requires the user's browser to support FormData (supported in all modern browsers and IE10+, ).
SC.upload({
file: theBlob, // a Blob of your WAV, MP3...
title: 'This is my sound'
});
Uploads can take a while and it makes sense to inform the user about the progress. For this reason,
SC.get('/user/183/tracks').then(function(tracks){
alert('Latest track: ' + tracks[0].title);
});
3 returns the original request as well so that you can calculate the progress yourself.
var upload = SC.upload({
file: aBigBlob, // a Blob of your WAV, MP3...
title: 'This upload took quite some while'
});
upload.request.addEventListener('progress', function(e){
console.log('progress: ', (e.loaded / e.total) * 100, '%');
});
upload.then(function(track){
alert('Upload is done! Check your sound at ' + track.permalink_url);
});
Relevant methods: EmbeddingThe
SC.get('/user/183/tracks').then(function(tracks){
alert('Latest track: ' + tracks[0].title);
});
5 function is a wrapper for the SoundCloud oEmbed endpoint. It takes the URL you want to embed as an argument, and an optional options object that can contain an element that should be replaced by the embed code. All of the
SC.get('/user/183/tracks').then(function(tracks){
alert('Latest track: ' + tracks[0].title);
});
6 object's properties will be passed as parameters to the oEmbed endpoint. For example
SC.get('/user/183/tracks').then(function(tracks){
alert('Latest track: ' + tracks[0].title);
});
7,
SC.get('/user/183/tracks').then(function(tracks){
alert('Latest track: ' + tracks[0].title);
});
8, or
SC.get('/user/183/tracks').then(function(tracks){
alert('Latest track: ' + tracks[0].title);
});
9. The options are described in detail in the oEmbed documentation.
var SC = require('soundcloud');
SC.initialize({
client_id: 'YOUR_CLIENT_ID',
redirect_uri: 'https://example.com/callback'
});
0 Or:
var SC = require('soundcloud');
SC.initialize({
client_id: 'YOUR_CLIENT_ID',
redirect_uri: 'https://example.com/callback'
});
1 Relevant methods: ExamplesIf you want to check out more SDK usage examples, head over to the API Guide. It shows how to use API methods in all available SDKs. An example of an application that is using a combination of several SDK methods can be found on Github. It records a user's microphone and uploads it together with an artwork that is generated from the user's webcam. (no Flash required!) PromisesThe SDK uses Promises for most of its methods. They provide a way to easily compose API calls and offer a sane way to handle the various errors that can occur. Promises can be chained by using their
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Connect with SoundCloud</title>
</head>
<body onload="window.setTimeout(window.opener.SC.connectCallback, 1)">
<b style="text-align: center;">This popup should automatically close in a few seconds</b>
</body>
</html>
0 method and errors can be handled in a
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Connect with SoundCloud</title>
</head>
<body onload="window.setTimeout(window.opener.SC.connectCallback, 1)">
<b style="text-align: center;">This popup should automatically close in a few seconds</b>
</body>
</html>
1 handler. If you are new to Promises, check out this introductory blog artice on HTML5 rocks: html5rocks.com/en/tutorials/es6/promises. In order to conform with the ES6 standard, the SDK uses es6-promise which shims the
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Connect with SoundCloud</title>
</head>
<body onload="window.setTimeout(window.opener.SC.connectCallback, 1)">
<b style="text-align: center;">This popup should automatically close in a few seconds</b>
</body>
</html>
2 object on systems where it is not available. We also expose the library via , so that you can use methods like
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Connect with SoundCloud</title>
</head>
<body onload="window.setTimeout(window.opener.SC.connectCallback, 1)">
<b style="text-align: center;">This popup should automatically close in a few seconds</b>
</body>
</html>
3 or
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Connect with SoundCloud</title>
</head>
<body onload="window.setTimeout(window.opener.SC.connectCallback, 1)">
<b style="text-align: center;">This popup should automatically close in a few seconds</b>
</body>
</html>
4 even if your user's browser is not supporting Promises yet. Relevant methods: API Documentation
SC.initialize(options)Initializes the SDK. Parameters: <!DOCTYPE html>
<html lang="en">
<head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Connect with SoundCloud</title>
</head>
<body onload="window.setTimeout(window.opener.SC.connectCallback, 1)"> <b style="text-align: center;">This popup should automatically close in a few seconds</b>
</body>
</html> 5: var SC = require('soundcloud');
SC.initialize({ client_id: 'YOUR_CLIENT_ID',
redirect_uri: 'https://example.com/callback'
});
2: You application's client id var SC = require('soundcloud');
SC.initialize({ client_id: 'YOUR_CLIENT_ID',
redirect_uri: 'https://example.com/callback'
});
3 (optional): Only needed if you want to authenticate users <!DOCTYPE html>
<html lang="en"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Connect with SoundCloud</title>
</head>
<body onload="window.setTimeout(window.opener.SC.connectCallback, 1)">
<b style="text-align: center;">This popup should automatically close in a few seconds</b>
</body>
</html>
8 (optional): If you want to reuse an access token
SC.connect(options)Initiate the OAuth2 connect flow. Parameters: <!DOCTYPE html>
<html lang="en">
<head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Connect with SoundCloud</title>
</head>
<body onload="window.setTimeout(window.opener.SC.connectCallback, 1)"> <b style="text-align: center;">This popup should automatically close in a few seconds</b>
</body>
</html> 9: var SC = require('soundcloud');
SC.initialize({ client_id: 'YOUR_CLIENT_ID',
redirect_uri: 'https://example.com/callback'
});
2: override the before set client id. var SC = require('soundcloud');
SC.initialize({ client_id: 'YOUR_CLIENT_ID',
redirect_uri: 'https://example.com/callback'
});
3: the redirect URI as defined in your app settings. SC.initialize({ client_id: 'YOUR_CLIENT_ID',
redirect_uri: 'https://example.com/callback'
});
SC.connect().then(function(){ return SC.put('/me/followings/183');
}).then(function(user){ alert('You are now following ' + user.username);
}).catch(function(error){ alert('Error: ' + error.message);
});
2: additional OAuth2 scopes (default: "*")
Returns: A promise that will resolve with a session data object SC.get(path, [params])Execute a GET request. Parameters: SC.initialize({
client_id: 'YOUR_CLIENT_ID',
redirect_uri: 'https://example.com/callback'
});
SC.connect().then(function(){
return SC.put('/me/followings/183');
}).then(function(user){
alert('You are now following ' + user.username);
}).catch(function(error){
alert('Error: ' + error.message);
});
3: the path to the requested resource e.g. '/users/183' SC.initialize({
client_id: 'YOUR_CLIENT_ID',
redirect_uri: 'https://example.com/callback'
});
SC.connect().then(function(){
return SC.put('/me/followings/183');
}).then(function(user){
alert('You are now following ' + user.username);
}).catch(function(error){
alert('Error: ' + error.message);
});
4: an object of additional parameters to pass in the request.
Returns: A promise that will resolve with the requested resource SC.post(path, [params])Execute a POST request. Parameters: SC.initialize({
client_id: 'YOUR_CLIENT_ID',
redirect_uri: 'https://example.com/callback'
});
SC.connect().then(function(){
return SC.put('/me/followings/183');
}).then(function(user){
alert('You are now following ' + user.username);
}).catch(function(error){
alert('Error: ' + error.message);
});
3: the path to the requested resource e.g. '/me/followings' SC.initialize({
client_id: 'YOUR_CLIENT_ID',
redirect_uri: 'https://example.com/callback'
});
SC.connect().then(function(){
return SC.put('/me/followings/183');
}).then(function(user){
alert('You are now following ' + user.username);
}).catch(function(error){
alert('Error: ' + error.message);
});
6: an object of additional parameters to pass in the request body.
Returns: A promise that will resolve with the requested resource SC.put(path, [params])Execute a PUT request. Parameters: SC.initialize({
client_id: 'YOUR_CLIENT_ID',
redirect_uri: 'https://example.com/callback'
});
SC.connect().then(function(){
return SC.put('/me/followings/183');
}).then(function(user){
alert('You are now following ' + user.username);
}).catch(function(error){
alert('Error: ' + error.message);
});
3: the path to the requested resource e.g. '/me' SC.initialize({
client_id: 'YOUR_CLIENT_ID',
redirect_uri: 'https://example.com/callback'
});
SC.connect().then(function(){
return SC.put('/me/followings/183');
}).then(function(user){
alert('You are now following ' + user.username);
}).catch(function(error){
alert('Error: ' + error.message);
});
6: an object of additional parameters to pass in the request body.
Returns: A promise that will resolve with the requested resource SC.delete(path)Execute a DELETE request. Parameters: SC.initialize({
client_id: 'YOUR_CLIENT_ID',
redirect_uri: 'https://example.com/callback'
});
SC.connect().then(function(){
return SC.put('/me/followings/183');
}).then(function(user){
alert('You are now following ' + user.username);
}).catch(function(error){
alert('Error: ' + error.message);
});
3: the path to the requested resource
Returns: A promise that will resolve when the resource has been deleted SC.upload(options)Uploads a file or a recording to SoundCloud Parameters: <!DOCTYPE html>
<html lang="en">
<head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Connect with SoundCloud</title>
</head>
<body onload="window.setTimeout(window.opener.SC.connectCallback, 1)"> <b style="text-align: center;">This popup should automatically close in a few seconds</b>
</body>
</html> 5: SC.put('/me', { user: { description: 'I am using the SoundCloud API!' }
}).then(function(){ return SC.get('/me');
}).then(function(me){ console.log(me.description);
}).catch(function(error){ alert('Error: ' + error.message);
});
1: a Blob of the file or the recording (see ). SC.put('/me', { user: { description: 'I am using the SoundCloud API!' }
}).then(function(){ return SC.get('/me');
}).then(function(me){ console.log(me.description);
}).catch(function(error){ alert('Error: ' + error.message);
});
2: a title for the recording. SC.put('/me', { user: { description: 'I am using the SoundCloud API!' }
}).then(function(){ return SC.get('/me');
}).then(function(me){ console.log(me.description);
}).catch(function(error){ alert('Error: ' + error.message);
});
3: a progress callback. - It also accepts all other params for upload requests, such as
SC.put('/me', { user: { description: 'I am using the SoundCloud API!' }
}).then(function(){ return SC.get('/me');
}).then(function(me){ console.log(me.description);
}).catch(function(error){ alert('Error: ' + error.message);
}); 4 or SC.put('/me', { user: { description: 'I am using the SoundCloud API!' }
}).then(function(){ return SC.get('/me');
}).then(function(me){ console.log(me.description);
}).catch(function(error){ alert('Error: ' + error.message);
});
5 (see API Reference for a full list).
Returns: A promise that will resolve when the resource has been uploaded. It also contains a reference to the original request (see ) SC.resolve(url)Resolves a SoundCloud URL to a JSON representation of the requested resource Parameters: SC.put('/me', {
user: { description: 'I am using the SoundCloud API!' }
}).then(function(){
return SC.get('/me');
}).then(function(me){
console.log(me.description);
}).catch(function(error){
alert('Error: ' + error.message);
});
6: a URL to a track, playlist or user on SoundCloud.
Returns: A promise that will resolve with a JSON object SC.oEmbed(url, [params])Will lookup the embed code for the passed URL (track, set or user) using oEmbed Parameters: Returns: A promise that will resolve with the oEmbed info for the resource SC.stream(trackPath, [secretToken])Creates a player for this stream Parameters: SC.stream('/tracks/293').then(function(player){
player.play();
});
0: the path of the track to be streamed e.g. /tracks/293 SC.stream('/tracks/293').then(function(player){
player.play();
});
1: a secret token for the track
Returns: A promise that will resolve with a player for the track SC.Recorder(options)The constructor function which returns an instance of the Web Audio Recorder (has to be called with
SC.stream('/tracks/293').then(function(player){
player.play();
});
2) Parameters: <!DOCTYPE html>
<html lang="en">
<head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Connect with SoundCloud</title>
</head>
<body onload="window.setTimeout(window.opener.SC.connectCallback, 1)"> <b style="text-align: center;">This popup should automatically close in a few seconds</b>
</body>
</html> 9: SC.stream('/tracks/293').then(function(player){ player.play();
});
4: You can pass an AudioContext if you want to reuse it SC.stream('/tracks/293').then(function(player){ player.play();
});
5: Pass a source if you want to record from an AudioNode
recorder.start()Starts recording from the user's computer or the
SC.stream('/tracks/293').then(function(player){
player.play();
});
5 that was passed into the constructor Requires the , and to be available in the user's browser recorder.stop()Stops the current recording recorder.play()Plays back what was just recorded Returns: The AudioNode that is used to play the sound recorder.getWAV()Returns: A promise that resolves with a WAV Blob of the current recording recorder.getBuffer()Returns: A promise that resolves with an AudioBuffer of the current recording recorder.saveAs(filename)Downloads the recorded WAV to the user's computer Parameters: SC.stream('/tracks/293').then(function(player){
player.play();
});
7: The desired name of the file
recorder.delete()Stops and deletes the recording SC.PromiseThe promise prototype that is used in the SDK internally (es6-promise). Use it to create your own promises or to use methods like Promise.all or Promise.race. How do I connect to SoundCloud API?To access the SoundCloud® API, you will first need to register your app at https://soundcloud.com/you/apps using your SoundCloud® account. When you've done that, we'll issue you with a client ID and client secret. Your client ID is required for all calls to the SoundCloud® API. What is the most played song on SoundCloud 2023?On 17 June 2023, “Promise” by Jimin (South Korea, b. Park Ji-min), SoundCloud's most streamed track, had accumulated 330 million plays on the Berlin, Germany-based platform. How do you get on the SoundCloud charts?If you are a creator and you're keen to get your track trending, we recommend genuine interactions with your followers, and promotion of the track soon after you've uploaded it to increase your chances. It also helps to have the track tagged correctly with the genre you want it to appear in. What can you do with SoundCloud API?With SoundCloud API you can build applications that take music to the next level. With this guide we explain and provide code examples for a lot of common integration use cases like playing and uploading tracks, liking a playlist or discovering new music. |