Small static page that turns a SoundCloud track URL into the numeric track ID SoundCloud uses in URLs and APIs (for example https://api.soundcloud.com/tracks/123456789).
Repo is a single file: index.html — no build step, no backend.
-
You paste a track link — full URLs like
https://soundcloud.com/artist/track-nameor short links likehttps://on.soundcloud.com/…work as long as they resolve to a public track. -
The page calls SoundCloud’s oEmbed API — in the browser it runs:
GET https://soundcloud.com/oembed?format=json&url=<your URL, URL-encoded>That is SoundCloud’s documented way to get embed metadata for a resource. The JSON response includes a
titleand anhtmlfield: a snippet of HTML for the embed widget. -
The track ID is read from the embed HTML — the widget markup references SoundCloud’s track API path, e.g.
https://api.soundcloud.com/tracks/123456789. The script uses a regular expression to find that number (it also tolerates URL-encoded slashes,%2F, in the string). -
Results in the UI — the numeric ID is shown, the oEmbed
titleis shown as a subtitle when present, and Copy writes the ID to the clipboard via the Clipboard API.
There is no SoundCloud client id or secret in this project: everything goes through the public oEmbed endpoint and runs only in your browser.
| Works | Usually does not |
|---|---|
| Public track URLs | Private or restricted tracks (oEmbed returns nothing useful) |
Standard and on.soundcloud.com short links |
Non-track URLs (playlists, profiles, etc. are out of scope) |
If oEmbed fails or the embed HTML does not contain a track id, the UI shows a short error asking for a public track URL.
- Serve over HTTPS in production. Clipboard access and predictable
fetchbehavior expect a secure context. Openingindex.htmlasfile://may be inconsistent across browsers for cross-origin requests.
Git
- Push this repo to GitHub (or GitLab / Bitbucket).
- In Vercel, import the project.
- Framework: Other (or “No framework”). Build command: empty. Output directory:
.(or the folder that containsindex.html).
CLI
cd soundscloud-id-extractor
npx vercelDrag and drop — upload the folder at Netlify Drop.
Git — import the repo; build command empty; publish directory ..
CLI
cd soundscloud-id-extractor
npx netlify deploy --prod --dir .| File | Role |
|---|---|
index.html |
Markup, styles, and script for the tool |