{"id":15146050,"url":"https://github.com/misa198/scdl-core-js","last_synced_at":"2025-10-26T02:17:59.222Z","repository":{"id":71896001,"uuid":"369780921","full_name":"misa198/scdl-core-js","owner":"misa198","description":"Module for SoundCloud to download and get info tracks and playlists. Support Typescript and Javascript.","archived":false,"fork":false,"pushed_at":"2022-06-28T08:38:04.000Z","size":4632,"stargazers_count":6,"open_issues_count":3,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-22T21:27:02.303Z","etag":null,"topics":["nodejs","scdl","soundcloud","soundcloud-api","soundcloud-downloader","typescript"],"latest_commit_sha":null,"homepage":"https://misa198.github.io/scdl-core-js/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/misa198.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-22T10:38:00.000Z","updated_at":"2024-05-20T19:24:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"8841562c-d0d4-4d85-8788-9642c04518a1","html_url":"https://github.com/misa198/scdl-core-js","commit_stats":null,"previous_names":["misa198/scdl-core"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/misa198/scdl-core-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/misa198%2Fscdl-core-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/misa198%2Fscdl-core-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/misa198%2Fscdl-core-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/misa198%2Fscdl-core-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/misa198","download_url":"https://codeload.github.com/misa198/scdl-core-js/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/misa198%2Fscdl-core-js/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272847088,"owners_count":25003127,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-30T02:00:09.474Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nodejs","scdl","soundcloud","soundcloud-api","soundcloud-downloader","typescript"],"created_at":"2024-09-26T12:00:42.647Z","updated_at":"2025-10-26T02:17:59.161Z","avatar_url":"https://github.com/misa198.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# scdl-core\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/misa198/scdl-core/master/docs/banner.png\" width=\"500px\"\u003e\n\u003c/p\u003e\n\n- Module for SoundCloud to download and get info tracks and playlists.\n- Support Typescript and Javascript.\n\n![](https://img.shields.io/badge/Author-misa198-green)\n![](https://camo.githubusercontent.com/832d01092b0e822178475741271b049a2e27df13/68747470733a2f2f62616467656e2e6e65742f62616467652f2d2f547970655363726970742f626c75653f69636f6e3d74797065736372697074266c6162656c)\n[![](https://img.shields.io/npm/dt/scdl-core)](https://www.npmjs.com/package/scdl-core)\n\n# Usage\n\n```js\nconst fs = require(\"fs\");\nconst { SoundCloud } = require(\"scdl-core\");\n\nawait SoundCloud.connect();\nconst stream = await SoundCloud.download(\n  \"https://soundcloud.com/martingarrix/martin-garrix-feat-bonn-no-sleep\"\n);\nstream.pipe(fs.createWriteStream(\"song.mp3\"));\n```\n\n# API\n\n## connect\n\n```js\n// Used to get the SoundCloud client_id. Call 1 time at the top of your app.\nconst { SoundCloud } = require(\"scdl-core\");\nawait SoundCloud.connect();\nawait SoundCloud.download(\n  \"https://soundcloud.com/martingarrix/martin-garrix-feat-bonn-no-sleep\"\n);\nstream.pipe(fs.createWriteStream(\"song.mp3\"));\n```\n\n## search\n\n```js\nconst result = await SoundCloud.search({\n  query: string,\n  limit?: number, // Default: 20\n  offset?: number, // Default: 0\n  filter?: 'all' | 'albums' | 'playlists' | 'users' | 'tracks' // Default: \"all\"\n});\n```\n\n## tracks\n\n#### getTrackByIds\n\n```js\nconst ids = [578933490, 499766382];\nconst tracks = await SoundCloud.tracks.getTracksByIds(ids);\n```\n\n#### getTrack\n\n```js\nconst permalink =\n  \"https://soundcloud.com/martingarrix/martin-garrix-feat-bonn-no-sleep\";\nconst track = await SoundCloud.tracks.getTrack(permalink);\n```\n\n#### getTrending\n\n```js\nconst trendingTracks = await SoundCloud.tracks.getTrending({\n  limit?: number, // Default: 20\n  offset?: number // Default: 0\n});\n```\n\n## playlists/albums\n\n#### getPlaylist/getAlbum\n\n```js\nconst permalink =\n  \"https://soundcloud.com/martingarrix/sets/martin-garrix-matisse-sadko\";\nconst playlist = await SoundCloud.playlists.getPlaylist(permalink);\n```\n\n## users\n\n#### getUser\n\n```js\nconst permalink = \"https://soundcloud.com/martingarrix\";\nconst user = await SoundCloud.users.getUser(permalink);\n```\n\n## download\n\n```js\nconst permalink =\n  \"https://soundcloud.com/martingarrix/martin-garrix-feat-bonn-no-sleep\";\nconst stream = await SoundCloud.download(permalink);\nstream.pipe(fs.createWriteStream(\"song.mp3\"));\n\n// For streaming, you can customize the `highWaterMark` value to reduce lag if the internet is not good.\n// Example:\nconst stream = await SoundCloud.download(permalink, {\n  highWaterMark: 1 \u003c\u003c 25, // 32Mb, default is 16kb\n});\n```\n\n#### Use with Discord.js\n\n```javascript\n// Discord.js v12\nconst voiceChannel = message.member.voiceChannel;\nvoiceChannel\n  .join()\n  .then((connection) =\u003e {\n    SoundCloud.download(trackPermalink).then((stream) =\u003e {\n      connection.play(stream);\n    });\n  })\n  .catch((err) =\u003e console.log(err));\n```\n\n```javascript\n// Discord.js v13\nconst audioPlayer = createAudioPlayer();\nconst voiceConnection = joinVoiceChannel({\n  channelId,\n  guildId,\n  adapterCreator,\n});\nvoiceConnection.subscribe(audioPlayer);\nconst stream = await SoundCloud.download(SONG_URL);\nconst audioResource = createAudioResource(stream);\naudioPlayer.play(audioResource);\n```\n\n# Install\n\n```bash\nnpm install scdl-core --save\n```\n\nOr for Yarn users:\n\n```bash\nyarn add scdl-core\n```\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmisa198%2Fscdl-core-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmisa198%2Fscdl-core-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmisa198%2Fscdl-core-js/lists"}