HTTP API Reference
The SoundCloud API exposes SoundCloud resources like sounds, sets and users. These resources can be accessed and manipulated using the HTTP methods GET, POST, PUT and DELETE.
All SoundCloud resources are accessed and manipulated in a similar way. A list
of the latest resource is usually available through /[resource name]
,
a single specific resource through /[resource name][id]
and related subresources like a tracks comments through
/[resource name]/[id]/[subresource name]
.
Unless otherwise specified, the base URL for API endpoints is:
https://api.soundcloud.com
To access public resources you just have to pass a
client_id
parameter:
$ curl https://api.soundcloud.com/tracks?client_id=YOUR_CLIENT_ID
To act on behalf of a SoundCloud user, they must first authenticate your app.
/connect
Full URI:
https://soundcloud.com/connect
The OAuth2 authorization endpoint. Your app redirects a user to this endpoint, allowing them to delegate access to their account.
Parameters
Parameter | Type | Description |
client_id | string | The client id belonging to your application |
redirect_uri | string | The redirect uri you have configured for your application |
response_type | enumeration | (code, token) |
scope | string | '*' |
display | string | Can specify a value of 'popup' for mobile optimized screen |
state | string | Any value included here will be appended to the redirect URI |
/oauth2/token
The OAuth2 token endpoint. This endpoint accepts
POST
requests and is used to provision
access tokens once a user has authorized your application.
Note All parameters must be sent in the request body, not as part of the query string.
Parameters
Parameter | Type | Description |
client_id | string | The client id belonging to your application |
client_secret | string | The client secret belonging to your application |
redirect_uri | string | The redirect uri you have configured for your application |
grant_type | enumeration | (authorization_code, refresh_token, password, client_credentials, oauth1_token) |
code | string | The authorization code obtained when user is sent to redirect_uri |
Example
$ curl -X POST "https://api.soundcloud.com/oauth2/token" \\ -F 'client_id=YOUR_CLIENT_ID' \\ -F 'client_secret=YOUR_CLIENT_SECRET' \\ -F 'grant_type=authorization_code' \\ -F 'redirect_uri=yourapp.com/soundcloud/oauth-callback' \\ -F 'code=0000000EYAA1CRGodSoKJ9WsdhqVQr3g'
{ "access_token": "04u7h-4cc355-70k3n", "scope": "*" }
/users
A SoundCloud user
Example
$ curl "api.soundcloud.com/users/3207?client_id=YOUR_CLIENT_ID"
{ "id": 3207, "permalink": "jwagener", "username": "Johannes Wagener", "uri": "api.soundcloud.com/users/3207", "permalink_url": "soundcloud.com/jwagener", "avatar_url": "i1.sndcdn.com/avatars-000001552142-pbw8yd-large.jpg?142a848", "country": "Germany", "full_name": "Johannes Wagener", "city": "Berlin", "description": "<b>Hacker at SoundCloud</b>\r\n\r\nSome of my recent Hacks:\r\n\r\nsoundiverse.com \r\nbrowse recordings with the FiRe app by artwork\r\n\r\ntopbillin.com \r\nfind people to follow on SoundCloud\r\n\r\nchatter.fm \r\nget your account hooked up with a voicebox\r\n\r\nrecbutton.com \r\nrecord straight to your soundcloud account", "discogs_name": null, "myspace_name": null, "website": "johannes.wagener.cc", "website_title": "johannes.wagener.cc", "online": true, "track_count": 12, "playlist_count": 1, "followers_count": 417, "followings_count": 174, "public_favorites_count": 26 }
Properties
name | description | example value |
---|---|---|
id | integer ID | 123 |
permalink | permalink of the resource | "sbahn-sounds" |
username | username | "Doctor Wilson" |
uri | API resource URL | api.soundcloud.com/comments/32562 |
permalink_url | URL to the SoundCloud.com page | "soundcloud.com/bryan/sbahn-sounds" |
avatar_url | URL to a JPEG image | "i1.sndcdn.com/avatars-000011353294-n0axp1-large.jpg" |
country | country | "Germany" |
full_name | first and last name | "Tom Wilson" |
city | city | "Berlin" |
description | description | "Buskers playing in the S-Bahn station in Berlin" |
discogs-name | Discogs name | "myrandomband" |
myspace-name | MySpace name | "myrandomband" |
website | a URL to the website | "facebook.com/myrandomband" |
website-title | a custom title for the website | "myrandomband on Facebook" |
online | online status (boolean) | true |
track_count | number of public tracks | 4 |
playlist_count | number of public playlists | 5 |
followers_count | number of followers | 54 |
followings_count | number of followed users | 75 |
public_favorites_count | number of favorited public tracks | 7 |
avatar_data | binary data of user avatar | (only for uploading) |
Subresources
Methods | Path | Description |
---|---|---|
GET | /users/{id} | a user |
GET | /users/{id}/tracks | list of tracks of the user |
GET | /users/{id}/playlists | list of playlists (sets) of the user |
GET | /users/{id}/followings | list of users who are followed by the user |
GET, PUT, DELETE | /users/{id}/followings/{id} | a user who is followed by the user |
GET | /users/{id}/followers | list of users who are following the user |
GET | /users/{id}/followers/{id} | user who is following the user |
GET | /users/{id}/comments | list of comments from this user |
GET | /users/{id}/favorites | list of tracks favorited by the user |
You can order by track creation date (default) or favoriting_date with the query parameter |
||
GET, PUT, DELETE | /users/{id}/favorites/{id} | track favorited by the user |
GET | /users/{id}/groups | list of joined groups |
GET, PUT, DELETE | /users/{id}/web-profiles | list of web profiles |
Filters
Parameter | Type | Description |
q | string | a string to search for (see search documentation) |
/tracks
A SoundCloud Track
Example
$ curl "api.soundcloud.com/tracks/13158665?client_id=YOUR_CLIENT_ID"
{ "id": 13158665, "created_at": "2011/04/06 15:37:43 +0000", "user_id": 3699101, "duration": 18109, "commentable": true, "state": "finished", "sharing": "public", "tag_list": "soundcloud:source=iphone-record", "permalink": "munching-at-tiannas-house", "description": null, "streamable": true, "downloadable": true, "genre": null, "release": null, "purchase_url": null, "label_id": null, "label_name": null, "isrc": null, "video_url": null, "track_type": "recording", "key_signature": null, "bpm": null, "title": "Munching at Tiannas house", "release_year": null, "release_month": null, "release_day": null, "original_format": "m4a", "original_content_size": 10211857, "license": "all-rights-reserved", "uri": "api.soundcloud.com/tracks/13158665", "permalink_url": "soundcloud.com/user2835985/munching-at-tiannas-house", "artwork_url": null, "waveform_url": "w1.sndcdn.com/fxguEjG4ax6B_m.png", "user": { "id": 3699101, "permalink": "user2835985", "username": "user2835985", "uri": "api.soundcloud.com/users/3699101", "permalink_url": "soundcloud.com/user2835985", "avatar_url": "a1.sndcdn.com/images/default_avatar_large.png?142a848" }, "stream_url": "api.soundcloud.com/tracks/13158665/stream", "download_url": "api.soundcloud.com/tracks/13158665/download", "playback_count": 0, "download_count": 0, "favoritings_count": 0, "comment_count": 0, "created_with": { "id": 124, "name": "SoundCloud iPhone", "uri": "api.soundcloud.com/apps/124", "permalink_url": "soundcloud.com/apps/iphone" }, "attachments_uri": "api.soundcloud.com/tracks/13158665/attachments" }
Properties
name | description | example value |
---|---|---|
id | integer ID | 123 |
created_at | timestamp of creation | "2009/08/13 18:30:10 +0000" |
user_id | user-id of the owner | 343 |
user | mini user representation of the owner | {id: 343, username: "Doctor Wilson"...} |
title | track title | "S-Bahn Sounds" |
permalink | permalink of the resource | "sbahn-sounds" |
permalink_url | URL to the SoundCloud.com page | "soundcloud.com/bryan/sbahn-sounds" |
uri | API resource URL | "api.soundcloud.com/tracks/123" |
sharing | public/private sharing | "public" |
embeddable_by | who can embed this track or playlist | "all", "me", or "none" |
purchase_url | external purchase link | "amazon.com/buy/a43aj0b03" |
artwork_url | URL to a JPEG image | "i1.sndcdn.com/a....-large.jpg?142a848" |
JPEG, PNG and GIF are accepted when uploading and will be encoded to multiple JPEGs in these formats:
The URL is pointing to the format For example:
to
|
||
description | HTML description | "my first track" |
label | label mini user object | {id:123, username: "BeatLabel"...} |
duration | duration in milliseconds | 1203400 |
genre | genre | "HipHop" |
tag_list | list of tags | "tag1 \"hip hop\" geo:lat=32.444 geo:lon=55.33" |
The
Machine tags are not revealed to the user on the track pages. |
||
label_id | id of the label user | 54677 |
label_name | label name | "BeatLabel" |
release | release number | 3234 |
release_day | day of the release | 21 |
release_month | month of the release | 5 |
release_year | year of the release | 2001 |
streamable | streamable via API (boolean) | true |
downloadable | downloadable (boolean) | true |
state | encoding state | "finished" |
Possible values:
|
||
license | creative common license | "no-rights-reserved" |
Possible values:
|
||
track_type | track type | "recording" |
Possible values:
|
||
waveform_url | URL to PNG waveform image | "w1.sndcdn.com/fxguEjG4ax6B_m.png" |
download_url | URL to original file | "api.soundcloud.com/tracks/3/download" |
stream_url | link to 128kbs mp3 stream | "api.soundcloud.com/tracks/3/stream" |
video_url | a link to a video page | "vimeo.com/3302330" |
bpm | beats per minute | 120 |
commentable | track commentable (boolean) | true |
isrc | track ISRC | "I123-545454" |
key_signature | track key | "Cmaj" |
comment_count | track comment count | 12 |
download_count | track download count | 45 |
playback_count | track play count | 435 |
favoritings_count | track favoriting count | 6 |
original_format | file format of the original file | "aiff" |
original_content_size | size in bytes of the original file | 10211857 |
created_with | the app that the track created | {"id"=>3434, "..."=>nil} |
This property is only present if the track was created with an app that is published in the app gallery. More details about this are in the /apps docs. |
||
asset_data | binary data of the audio file | (only for uploading) |
artwork_data | binary data of the artwork image | (only for uploading) |
user_favorite | track favorite of current user (boolean, authenticated requests only) | 1 |
Subresources
Methods | Path | Description |
---|---|---|
GET, PUT, DELETE | /tracks/{id} | a track |
GET | /tracks/{id}/comments | comments for the track |
GET, PUT, DELETE | /tracks/{id}/comments/{comment-id} | a comment for the track |
GET | /tracks/{id}/favoriters | users who favorited the track |
GET | /tracks/{id}/favoriters/{user-id} | a user who has favorited to the track |
GET, PUT | /tracks/{id}/secret-token | secret token of the track |
Filters
Parameter | Type | Description |
q | string | a string to search for (see search documentation) |
tags | list | a comma separated list of tags |
filter | enumeration | (all,public,private) |
license | enumeration | Filter on license. (see license attribute) |
bpm[from] | number | return tracks with at least this bpm value |
bpm[to] | number | return tracks with at most this bpm value |
duration[from] | number | return tracks with at least this duration (in millis) |
duration[to] | number | return tracks with at most this duration (in millis) |
created_at[from] | date | (yyyy-mm-dd hh:mm:ss) return tracks created at this date or later |
created_at[to] | date | (yyyy-mm-dd hh:mm:ss) return tracks created at this date or earlier |
ids | list | a comma separated list of track ids to filter on |
genres | list | a comma separated list of genres |
types | enumeration | a comma separated list of types |
/playlists
A SoundCloud Set is internally called playlists due to some naming restrictions.
Example
$ curl "api.soundcloud.com/playlists/405726?client_id=YOUR_CLIENT_ID"
{ "kind": "playlist", "id": 405726, "created_at": "2010/11/02 09:24:50 +0000", "user_id": 3207, "duration": 154516, "sharing": "public", "tag_list": "", "permalink": "field-recordings", "track_count": 5, "streamable": true, "downloadable": true, "embeddable_by": "me", "purchase_url": null, "label_id": null, "type": "other", "playlist_type": "other", "ean": "", "description": "a couple of field recordings to test soundiverse.com.\r\n\r\nrecorded with the fire recorder: soundcloud.com/apps/fire", "genre": "", "release": "", "purchase_title": null, "label_name": "", "title": "Field Recordings", "release_year": null, "release_month": null, "release_day": null, "license": "all-rights-reserved", "uri": "api.soundcloud.com/playlists/405726", "permalink_url": "soundcloud.com/jwagener/sets/field-recordings", "artwork_url": "i1.sndcdn.com/artworks-000025801802-1msl1i-large.jpg?5e64f12", "user": { "id": 3207, "kind": "user", "permalink": "jwagener", "username": "Johannes Wagener", "uri": "api.soundcloud.com/users/3207", "permalink_url": "soundcloud.com/jwagener", "avatar_url": "i1.sndcdn.com/avatars-000014428549-3at7qc-large.jpg?5e64f12" }, "tracks": [ { "kind": "track", "id": 6621631, "created_at": "2010/11/02 09:08:43 +0000", "user_id": 3207, "duration": 27099, "commentable": true, "state": "finished", "original_content_size": 2382624, "sharing": "public", "tag_list": "Fieldrecording geo:lat=52.527544 geo:lon=13.402905", "permalink": "coffee-machine", "streamable": true, "embeddable_by": "all", "downloadable": false, "purchase_url": null, "label_id": null, "purchase_title": null, "genre": "", "title": "coffee machine", "description": "", "label_name": "", "release": "", "track_type": "", "key_signature": "", "isrc": "", "video_url": null, "bpm": null, "release_year": null, "release_month": null, "release_day": null, "original_format": "wav", "license": "cc-by", "uri": "api.soundcloud.com/tracks/6621631", "user": { "id": 3207, "kind": "user", "permalink": "jwagener", "username": "Johannes Wagener", "uri": "api.soundcloud.com/users/3207", "permalink_url": "soundcloud.com/jwagener", "avatar_url": "i1.sndcdn.com/avatars-000014428549-3at7qc-large.jpg?5e64f12" }, "created_with": { "id": 64, "kind": "app", "name": "FiRe - Field Recorder", "uri": "api.soundcloud.com/apps/64", "permalink_url": "soundcloud.com/apps/fire", "external_url": "itunes.apple.com/us/app/fire-2-field-recorder/id436241643?mt=8" }, "permalink_url": "soundcloud.com/jwagener/coffee-machine", "artwork_url": "i1.sndcdn.com/artworks-000002863219-4zpxc0-large.jpg?5e64f12", "waveform_url": "w1.sndcdn.com/Yva1Qimi7TVd_m.png", "stream_url": "api.soundcloud.com/tracks/6621631/stream", "playback_count": 1249, "download_count": 114, "favoritings_count": 14, "comment_count": 11, "attachments_uri": "api.soundcloud.com/tracks/6621631/attachments" }, { "kind": "track", "id": 6621549, "created_at": "2010/11/02 09:00:23 +0000", "user_id": 3207, "duration": 65618, "commentable": true, "state": "finished", "original_content_size": 5780256, "sharing": "public", "tag_list": "Fieldrecording geo:lat=52.528181 geo:lon=13.412658", "permalink": "tram-in-berlin", "streamable": true, "embeddable_by": "all", "downloadable": true, "purchase_url": null, "label_id": null, "purchase_title": null, "genre": "", "title": "tram in berlin", "description": "", "label_name": "", "release": "", "track_type": "recording", "key_signature": "", "isrc": "", "video_url": null, "bpm": null, "release_year": null, "release_month": null, "release_day": null, "original_format": "wav", "license": "cc-by", "uri": "api.soundcloud.com/tracks/6621549", "user": { "id": 3207, "kind": "user", "permalink": "jwagener", "username": "Johannes Wagener", "uri": "api.soundcloud.com/users/3207", "permalink_url": "soundcloud.com/jwagener", "avatar_url": "i1.sndcdn.com/avatars-000014428549-3at7qc-large.jpg?5e64f12" }, "created_with": { "id": 64, "kind": "app", "name": "FiRe - Field Recorder", "uri": "api.soundcloud.com/apps/64", "permalink_url": "soundcloud.com/apps/fire", "external_url": "itunes.apple.com/us/app/fire-2-field-recorder/id436241643?mt=8" }, "permalink_url": "soundcloud.com/jwagener/tram-in-berlin", "artwork_url": "i1.sndcdn.com/artworks-000002863163-6f2aqe-large.jpg?5e64f12", "waveform_url": "w1.sndcdn.com/u04ibjx6FYdM_m.png", "stream_url": "api.soundcloud.com/tracks/6621549/stream", "download_url": "api.soundcloud.com/tracks/6621549/download", "playback_count": 578, "download_count": 93, "favoritings_count": 4, "comment_count": 3, "attachments_uri": "api.soundcloud.com/tracks/6621549/attachments" }, { "kind": "track", "id": 6668072, "created_at": "2010/11/03 19:47:11 +0000", "user_id": 3207, "duration": 21871, "commentable": true, "state": "finished", "original_content_size": 1921800, "sharing": "public", "tag_list": "geo:lat=52.527529 geo:lon=13.402961", "permalink": "alex-playing-drums", "streamable": true, "embeddable_by": "all", "downloadable": true, "purchase_url": null, "label_id": null, "purchase_title": null, "genre": null, "title": "alex playing drums", "description": "", "label_name": "", "release": "", "track_type": "recording", "key_signature": "", "isrc": "", "video_url": null, "bpm": null, "release_year": null, "release_month": null, "release_day": null, "original_format": "wav", "license": "cc-by", "uri": "api.soundcloud.com/tracks/6668072", "user": { "id": 3207, "kind": "user", "permalink": "jwagener", "username": "Johannes Wagener", "uri": "api.soundcloud.com/users/3207", "permalink_url": "soundcloud.com/jwagener", "avatar_url": "i1.sndcdn.com/avatars-000014428549-3at7qc-large.jpg?5e64f12" }, "created_with": { "id": 64, "kind": "app", "name": "FiRe - Field Recorder", "uri": "api.soundcloud.com/apps/64", "permalink_url": "soundcloud.com/apps/fire", "external_url": "itunes.apple.com/us/app/fire-2-field-recorder/id436241643?mt=8" }, "permalink_url": "soundcloud.com/jwagener/alex-playing-drums", "artwork_url": "i1.sndcdn.com/artworks-000002888918-takbu6-large.jpg?5e64f12", "waveform_url": "w1.sndcdn.com/MQnxWxIH94ai_m.png", "stream_url": "api.soundcloud.com/tracks/6668072/stream", "download_url": "api.soundcloud.com/tracks/6668072/download", "playback_count": 400, "download_count": 84, "favoritings_count": 2, "comment_count": 1, "attachments_uri": "api.soundcloud.com/tracks/6668072/attachments" }, { "kind": "track", "id": 6698933, "created_at": "2010/11/04 19:09:32 +0000", "user_id": 3207, "duration": 12726, "commentable": true, "state": "finished", "original_content_size": 1116936, "sharing": "public", "tag_list": "geo:lat=52.528450 geo:lon=13.404099", "permalink": "typing", "streamable": true, "embeddable_by": "all", "downloadable": false, "purchase_url": null, "label_id": null, "purchase_title": null, "genre": null, "title": "typing", "description": "", "label_name": "", "release": "", "track_type": "recording", "key_signature": "", "isrc": "", "video_url": null, "bpm": null, "release_year": null, "release_month": null, "release_day": null, "original_format": "wav", "license": "cc-by", "uri": "api.soundcloud.com/tracks/6698933", "user": { "id": 3207, "kind": "user", "permalink": "jwagener", "username": "Johannes Wagener", "uri": "api.soundcloud.com/users/3207", "permalink_url": "soundcloud.com/jwagener", "avatar_url": "i1.sndcdn.com/avatars-000014428549-3at7qc-large.jpg?5e64f12" }, "created_with": { "id": 64, "kind": "app", "name": "FiRe - Field Recorder", "uri": "api.soundcloud.com/apps/64", "permalink_url": "soundcloud.com/apps/fire", "external_url": "itunes.apple.com/us/app/fire-2-field-recorder/id436241643?mt=8" }, "permalink_url": "soundcloud.com/jwagener/typing", "artwork_url": "i1.sndcdn.com/artworks-000002903990-le6t7d-large.jpg?5e64f12", "waveform_url": "w1.sndcdn.com/ZSil4IqhP6Hh_m.png", "stream_url": "api.soundcloud.com/tracks/6698933/stream", "playback_count": 1151, "download_count": 102, "favoritings_count": 1, "comment_count": 0, "attachments_uri": "api.soundcloud.com/tracks/6698933/attachments" }, { "kind": "track", "id": 6770077, "created_at": "2010/11/07 02:45:11 +0000", "user_id": 3207, "duration": 27202, "commentable": true, "state": "finished", "original_content_size": 2392840, "sharing": "public", "tag_list": "geo:lat=52.531203 geo:lon=13.412165", "permalink": "bassy", "streamable": true, "embeddable_by": "all", "downloadable": true, "purchase_url": null, "label_id": null, "purchase_title": null, "genre": "", "title": "bassy", "description": "", "label_name": "", "release": "", "track_type": "recording", "key_signature": "", "isrc": "", "video_url": null, "bpm": null, "release_year": null, "release_month": null, "release_day": null, "original_format": "wav", "license": "cc-by", "uri": "api.soundcloud.com/tracks/6770077", "user": { "id": 3207, "kind": "user", "permalink": "jwagener", "username": "Johannes Wagener", "uri": "api.soundcloud.com/users/3207", "permalink_url": "soundcloud.com/jwagener", "avatar_url": "i1.sndcdn.com/avatars-000014428549-3at7qc-large.jpg?5e64f12" }, "created_with": { "id": 64, "kind": "app", "name": "FiRe - Field Recorder", "uri": "api.soundcloud.com/apps/64", "permalink_url": "soundcloud.com/apps/fire", "external_url": "itunes.apple.com/us/app/fire-2-field-recorder/id436241643?mt=8" }, "permalink_url": "soundcloud.com/jwagener/bassy", "artwork_url": "i1.sndcdn.com/artworks-000002938592-960ejc-large.jpg?5e64f12", "waveform_url": "w1.sndcdn.com/bxaiyNJt3vWK_m.png", "stream_url": "api.soundcloud.com/tracks/6770077/stream", "download_url": "api.soundcloud.com/tracks/6770077/download", "playback_count": 335, "download_count": 78, "favoritings_count": 1, "comment_count": 1, "attachments_uri": "api.soundcloud.com/tracks/6770077/attachments" } ] }
Properties
name | description | example value |
---|---|---|
id | integer ID | 123 |
created_at | timestamp of creation | "2009/08/13 18:30:10 +0000" |
user_id | user-id of the owner | 343 |
user | mini user representation of the owner | {id: 343, username: "Doctor Wilson"...} |
title | track title | "S-Bahn Sounds" |
permalink | permalink of the resource | "sbahn-sounds" |
permalink_url | URL to the SoundCloud.com page | "soundcloud.com/bryan/sbahn-sounds" |
uri | API resource URL | "api.soundcloud.com/tracks/123" |
sharing | public/private sharing | "public" |
embeddable_by | who can embed this track or playlist | "all", "me", or "none" |
purchase_url | external purchase link | "amazon.com/buy/a43aj0b03" |
artwork_url | URL to a JPEG image | "i1.sndcdn.com/a....-large.jpg?142a848" |
JPEG, PNG and GIF are accepted when uploading and will be encoded to multiple JPEGs in these formats:
The URL is pointing to the format For example:
to
|
||
description | HTML description | "my first track" |
label | label mini user object | {id:123, usernam |