This API controller was created for personal implementation in my project called Soundify. Soundcloud does not currently provide a method for interacting with the new v2 API effectively. The v1 API is missing a lot of endpoints the v2 api has. (/charts to name one).
- Installation
- Examples
- References
npm i soundcloud-v2-api
yarn add soundcloud-v2-api
const SC = require('soundcloud-v2-api');
SC.init({
clientId: 'YOUR_CLIENT_ID'
})
SC.get('/search/tracks', {
q: 'Post',
limit: 50
}).then(result => console.log(result))//Initialize as in previous example.
SC.stream('/tracks/${track.id}/streams').then(stream => {
stream.play()
})SC.init({
clientId: 'YOUR_CLIENT_ID',
cors: true
})Here are some of the most common endpoints available to use.
| Types | Returns |
|---|---|
| tracks | List of tracks containing query |
| users | List of users containing query |
| albums | List of albums containing query |
| playlists | List of playlists containing query |
| Types | Returns |
|---|---|
| / | Tracks statistics and information |
| reposters | List of users that reposted the track |
| likers | List of users that liked the track |
| comments | List of comments on the track |