1. Blog
  2. SoundCloud

Get SoundCloud artists and tracks

A handle returns the artist, then their tracks, newest first, up to 20 a page.

Developers searching for a SoundCloud API usually want an artist and that artist's tracks as JSON. SocialScrape has those reads. They are not SoundCloud's developer API, and they do not give you a SoundCloud client secret.

You call them with a SocialScrape key in x-api-key. See authentication.

Artist

GET /v1/soundcloud/artist takes url or handle. One of them. url is soundcloud.com/<user>. handle is the username, with or without @. username is an alias. The description says followers, track count, bio, location, avatar, banner and the social links the artist lists.

The recorded request uses a handle.

1curl -G "https://api.socialscrape.dev/v1/soundcloud/artist" \2  -H "x-api-key: $SOCIALSCRAPE_API_KEY" \3  --data-urlencode "handle=flume"
data
is a profile. platform is soundcloud. You get id, handle, name, bio, avatar_url, banner_url, url, verified, is_private, external_url, links and location. links is where listed social URLs land. stats.followers, stats.following and stats.posts are the counts (posts is the track count on this profile). stats.likes is present when the artist page has a like total. stats.views is null when it is not a profile field.
extra
on the recorded artist includes city, country_code, playlist_count, comments_count, urn, badges, station_permalink and last_modified. Use extra.urn if you store SoundCloud's own id alongside data.id. Country is extra.country_code, and city is extra.city, which may be more specific than location.

Errors are invalid_params, unsupported_url and not_found.

Sample. The recording is shortened. Counts in it belong to the sample.

Tracks

GET /v1/soundcloud/artist/tracks lists tracks, newest first, up to 20 a page. The same url or handle one-of applies. Private or blocked tracks are left out, so a page can be shorter than 20. parent is the artist. Pass cursor back until it is null.

1curl -G "https://api.socialscrape.dev/v1/soundcloud/artist/tracks" \2  -H "x-api-key: $SOCIALSCRAPE_API_KEY" \3  --data-urlencode "handle=flume"

Each item is a song, not a social post. Fields: id, url, title, artists, duration_seconds, cover_url, preview_url, released_at, isrc, explicit, stats. stats.plays is the play count.

stats.likes is the like count. stats.uses is null when unused. Comment count is extra.comment_count. Genre, license, label and waveform are in extra: genre, license, label_name, waveform_url, downloadable, download_count, streamable, reposts_count, urn.

downloadable is a boolean the track page exposes. It is not a file hosted by SocialScrape. If you need the bytes, this API is the wrong tool.

has_more and cursor work as on other lists. A null cursor means stop. Each page is 1 credit. See pagination.

One track

GET /v1/soundcloud/track requires url, a soundcloud.com/<user>/<track> link. There is no handle parameter on this route. The description says title, artist, duration, play, like and comment counts, genre, license, ISRC and release date.

That maps to title, artists, duration_seconds, stats.plays, stats.likes, extra.comment_count, extra.genre, extra.license, isrc and released_at.

The recorded URL is a track. One successful call is 1 credit.

Cost

Artist, each page of tracks, and one track are 1 credit each when they succeed. All three are cacheable for 30 days. max_age_days (0 to 30) serves a cached copy for 0 credits. Failures cost 0. The signup grant is 100 credits, once, with no card. See pricing and credits.

Limits

A short page can mean blocked or private tracks were skipped, not that the artist has few songs. Play count is stats.plays. Do not add extra.download_count into plays. preview_url may be null. This response does not include the full audio.

Search across SoundCloud by keyword is not these three routes. If you have a name and no URL, you need the handle or the artist URL from somewhere else before you call them.

not_found and unsupported_url are final. rate_limited waits on retry-after. Packs and plans have no rate limits; free accounts have a lower one. See rate limits and errors.

Next

Artist: SoundCloud artist API, tutorial, reference. Tracks: artist tracks API and reference. One track: SoundCloud track API, tutorial, reference. The hub is the SoundCloud API.

A different music catalog, keyed by Spotify ids rather than handles, is Spotify artist and search data.

Related

Questions

Is this SoundCloud's official API?

No. It is a SocialScrape read of artist and track fields. You send a SocialScrape key. You do not send a SoundCloud client id.

Handle or URL?

Either, on the artist and the artist tracks routes. url is soundcloud.com/<user>. handle is the username. The single track route takes the track URL only.

Are private tracks included?

No. The track list leaves out private or blocked tracks, so a page can be shorter than 20.

What is the play count field?

stats.plays. stats.likes is the like count. Comment count is extra.comment_count, not stats.plays.