A fast SoundCloud downloader written in Go. Give it a track or playlist URL, get back .mp3 files with embedded cover art.
brew tap imthaghost/scdl
brew install scdlgo install github.com/imthaghost/scdl@latestGrab the latest release from the releases page.
scdl <url>Tracks:
scdl https://soundcloud.com/polo-g/polo-g-feat-juice-wrld-flexPlaylists / sets (every track downloaded into a subdirectory named after the playlist):
scdl https://soundcloud.com/<user>/sets/<playlist>The file is written as <track title>.mp3 with the SoundCloud artwork embedded as an ID3v2 front-cover frame. scdl exits with a non-zero status if any track fails.
| Flag | Description |
|---|---|
-o, --output <dir> |
Output directory (default: current directory). For playlists this is the parent of the playlist subdirectory. |
--token <token> |
SoundCloud OAuth token. Overrides $SCDL_TOKEN. |
--proxy <url> |
Proxy URL, e.g. http://user:pass@host:3128. When unset, $HTTPS_PROXY / $HTTP_PROXY / $NO_PROXY are honored. |
Supply a SoundCloud OAuth token to unlock 256 kbps Go+ transcodings and to download private tracks your account can access:
scdl --token "$YOUR_TOKEN" <url>
# or
export SCDL_TOKEN="your-token-here"
scdl <url>To find your token: open soundcloud.com in your logged-in browser, open DevTools → Network, click any request to api-v2.soundcloud.com, and copy the value after OAuth in the Authorization request header.
Private share links (?secret_token=s-XXX or /s-XXX) are supported with or without a token.
Note: Major-label catalog tracks (RCA/Atlantic/etc.) are served by SoundCloud only via DRM-encrypted protocols (
cbc-encrypted-hls,ctr-encrypted-hls). scdl downloads the plain HLS+MP3 path only, so those tracks will fail with a404from api-v2. Indie creator uploads and Go+ HQ transcodings work normally.
- Fetches the page (with
oauth_tokencookie when a token is configured) and parses its__sc_hydrationJSON. - For playlist URLs (
/sets/), expands stub track entries via api-v2/tracks?ids=…(batched), then downloads each track sequentially. - For each track: scrapes a fresh
client_idfrom SoundCloud's JS bundles, picks the best plain-HLSaudio/mpegtranscoding (hqpreferred oversq), and builds an authorized stream URL. - Downloads every segment in parallel, decrypts any AES-128 segments, and assembles them in order.
- Writes the resulting MP3 and embeds the
og:imagecover art viabogem/id3v2.
- High-quality (256 kbps) downloads via SoundCloud Go+ auth (#13)
- Private share-link downloads (
?secret_token=//s-XXX) (#10) - Playlist / set URLs (
/sets/...) - Non-zero exit code on download failure
-
--output/-oflag for output path - Proxy support (
--proxyflag,$HTTPS_PROXYenv) - Algorithmic
/discover/sets/...URLs (currently load via XHR — would need api-v2 playlist resolution) - DRM-protected (major-label) tracks (Widevine/Fairplay; intentionally not supported)

