npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

soundcloud-scraper

v5.0.3

Published

Get data from soundcloud easily.

Downloads

5,871

Readme

SoundCloud Scraper

Get data from soundcloud easily.

NPM

Installation

$ npm i soundcloud-scraper

Documentation

https://soundcloud-scraper.js.org

Example

Downloading a Song

Note: This process can take few seconds if you do not provide api key because it will first find the api key and then fetch respective track url to get final stream url and then download it. To solve this issue, first get your soundcloud key using SoundCloud.keygen() and then save it somewhere. Later you can pass that key in SoundCloud.Client constructor: new SoundCloud.Client("API_KEY"). SoundCloud Scraper automatically detects SOUNDCLOUD_API_KEY from process.env.

const SoundCloud = require("soundcloud-scraper");
const client = new SoundCloud.Client();
const fs = require("fs");

client.getSongInfo("https://soundcloud.com/dogesounds/alan-walker-feat-k-391-ignite")
    .then(async song => {
        const stream = await song.downloadProgressive();
        const writer = stream.pipe(fs.createWriteStream(`./${song.title}.mp3`));
        writer.on("finish", () => {
          console.log("Finished writing song!")
          process.exit(1);
        });
    })
    .catch(console.error);

Responses

Song Info

Song {
  id: '316547873',
  title: 'Alan Walker feat. K-391 - Ignite [FREE DOWNLOAD]',
  description: 'FREE DOWNLOAD: http://discoverysounds.com/gate/alan-walker-feat-k-391-ignite\n' +
    '\n' +
    'Alan Walker Feat K 391 Ignite Download\n' +
    'Alan Walker Feat K 391 Ignite Mp3 Download\n' +
    'Alan Walker Feat K 391 Ignite New Song 2',
  thumbnail: 'https://i1.sndcdn.com/artworks-000216694368-wsysn4-t500x500.jpg',
  url: 'https://soundcloud.com/dogesounds/alan-walker-feat-k-391-ignite',
  duration: 210000,
  playCount: '771664',
  commentsCount: '371',
  likes: '13514',
  genre: 'Dance & EDM',
  author: {
    name: 'Doge Sounds',
    username: 'dogesounds',
    url: 'https://soundcloud.com/dogesounds',
    avatarURL: 'https://i1.sndcdn.com/avatars-000304905983-a0568r-large.jpg',
    urn: 298449071,
    verified: false,
    followers: 149,
    following: 32
  },
  publishedAt: 2017-04-07T11:02:54.000Z,
  embedURL: 'https://soundcloud.com/oembed?url=https%3A%2F%2Fsoundcloud.com%2Fdogesounds%2Falan-walker-feat-k-391-ignite&format=json',
  embed: null,
  streams: {
    hls: 'https://api-v2.soundcloud.com/media/soundcloud:tracks:316547873/7ccfb0e4-2d57-4f9b-b5df-9d340a3a2dd6/stream/hls',
    progressive: 'https://api-v2.soundcloud.com/media/soundcloud:tracks:316547873/7ccfb0e4-2d57-4f9b-b5df-9d340a3a2dd6/stream/progressive'
  },
  trackURL: 'https://api-v2.soundcloud.com/media/soundcloud:tracks:316547873/7ccfb0e4-2d57-4f9b-b5df-9d340a3a2dd6/stream/progressive',
  comments: [],
  streamURL: null
}

Song Embed

Embed {
  url: 'https://soundcloud.com/oembed?url=https%3A%2F%2Fsoundcloud.com%2Fdogesounds%2Falan-walker-feat-k-391-ignite&format=json',
  version: 1,
  type: 'rich',
  provider: { name: 'SoundCloud', url: 'https://soundcloud.com' },
  height: 400,
  width: '100%',
  title: 'Alan Walker feat. K-391 - Ignite [FREE DOWNLOAD] by Doge Sounds',
  description: 'FREE DOWNLOAD: http://discoverysounds.com/gate/alan-walker-feat-k-391-ignite\n' +
    '\n' +
    'Alan Walker Feat K 391 Ignite Download\n' +
    'Alan Walker Feat K 391 Ignite Mp3 Download\n' +
    'Alan Walker Feat K 391 Ignite New Song 2017\n' +
    'Alan Walker Feat K 391 Ignite 2017',
  author: { name: 'Doge Sounds', url: 'https://soundcloud.com/dogesounds' },
  thumbnailURL: 'https://i1.sndcdn.com/artworks-000216694368-wsysn4-t500x500.jpg'
}

Song Comments

[
  {
    text: '����',
    createdAt: 2020-10-30T11:58:13.000Z,
    author: {
      name: 'askaria22',
      username: 'mohamed-askaria-541170196',
      url: 'https://soundcloud.com/mohamed-askaria-541170196'
    }
  },
  {
    text: 'Cool',
    createdAt: 2020-10-28T15:03:21.000Z,
    author: {
      name: 'Matias Ronkainen',
      username: 'matias-ronkainen',
      url: 'https://soundcloud.com/matias-ronkainen'
    }
  },
  {
    text: 'wow nice song i love the beat',
    createdAt: 2020-10-27T05:35:39.000Z,
    author: {
      name: 'saathvika vempati',
      username: 'saathvika-vempati',
      url: 'https://soundcloud.com/saathvika-vempati'
    }
  },
  {
    text: 'tempik',
    createdAt: 2020-10-23T04:49:11.000Z,
    author: {
      name: '[email protected]',
      username: 'didik-saputra-908291434',
      url: 'https://soundcloud.com/didik-saputra-908291434'
    }
  },
  {
    text: '@jazmine-powers-328939011: ew chain mail',
    createdAt: 2020-10-21T18:40:33.000Z,
    author: {
      name: 'FallenQbjYT',
      username: 'fallen-qbj',
      url: 'https://soundcloud.com/fallen-qbj'
    }
  },
  ...
]

User Info

{
  urn: 298449071,
  username: 'dogesounds',
  name: 'Doge Sounds',
  verified: false,
  createdAt: 2017-03-29T21:35:45.000Z,
  avatarURL: 'https://i1.sndcdn.com/avatars-000304905983-a0568r-large.jpg',
  profile: 'https://soundcloud.com/dogesounds',
  bannerURL: 'https://i1.sndcdn.com/visuals-000298449071-KhchhU-original.jpg',
  followers: 149,
  following: 32,
  likesCount: 6,
  tracksCount: 2,
  tracks: [
    {
      title: 'Alan Walker feat. K-391 - Ignite [FREE DOWNLOAD]',
      url: 'https://soundcloud.com/dogesounds/alan-walker-feat-k-391-ignite',
      publishedAt: 2017-04-07T11:02:54.000Z,
      genre: 'Dance & EDM',
      author: 'dogesounds',
      duration: 210000
    },
    {
      title: 'W&W & Daddy Yankee - Gasolina (Hardwell Mashup) [FREE DOWNLOAD]',
      url: 'https://soundcloud.com/dogesounds/ww-daddy-yankee-gasolina-hardwell-mashup',
      publishedAt: 2017-03-29T21:38:38.000Z,
      genre: 'Dance & EDM',
      author: 'dogesounds',
      duration: 267000
    }
  ],
  likes: [
    {
      title: 'Alan Walker feat. K-391 - Ignite [FREE DOWNLOAD]',
      url: 'https://soundcloud.com/dogesounds/alan-walker-feat-k-391-ignite',
      publishedAt: 2017-04-07T11:02:54.000Z,
      genre: 'Dance & EDM',
      author: {
        name: 'Doge Sounds',
        username: 'dogesounds',
        profile: 'https://soundcloud.com/dogesounds'
      }
    },
    {
      title: 'W&W & Daddy Yankee - Gasolina (Hardwell Mashup) [FREE DOWNLOAD]',
      url: 'https://soundcloud.com/dogesounds/ww-daddy-yankee-gasolina-hardwell-mashup',
      publishedAt: 2017-03-29T21:38:38.000Z,
      genre: 'Dance & EDM',
      author: {
        name: 'Doge Sounds',
        username: 'dogesounds',
        profile: 'https://soundcloud.com/dogesounds'
      }
    }
  ]
}

Playlist

{
  id: 1001644540,
  title: 'albert vishi',
  url: 'https://soundcloud.com/ambreen-kanwal-397095258/sets/albert-vishi',
  description: 'Listen to albert vishi by Ambreen Kanwal #np on #SoundCloud',
  thumbnail: 'https://i1.sndcdn.com/artworks-y5WKIPZcAx2gKBSU-UGgDzA-t500x500.jpg',
  author: {
    profile: 'https://soundcloud.com/ambreen-kanwal-397095258',
    username: 'ambreen-kanwal-397095258',
    name: 'Ambreen Kanwal',
    urn: 311943633
  },
  embedURL: 'https://soundcloud.com/oembed?url=https%3A%2F%2Fsoundcloud.com%2Fambreen-kanwal-397095258%2Fsets%2Falbert-vishi&format=json',
  embed: null,
  genre: '',
  trackCount: 54,
  tracks: [
    Song {
      id: 754856170,
      title: 'Albert Vishi Ft. Ane Flem - Zombie (The Cranberries Cover In Alan Walker Style)',
      description: null,
      thumbnail: 'https://i1.sndcdn.com/artworks-y5WKIPZcAx2gKBSU-UGgDzA-large.jpg',
      url: 'https://soundcloud.com/albertvishi/albert-vishi-ft-ane-flem-zombie-the-cranberries-cover-in-alan-walker-style',
      duration: 252056,
      playCount: 138735,
      commentsCount: 52,
      likes: 2174,
      genre: 'Dance & EDM',
      author: [Object],
      publishedAt: 2020-02-04T11:41:24.000Z,
      embedURL: null,
      embed: null,
      streams: [Object],
      trackURL: 'https://api-v2.soundcloud.com/media/soundcloud:tracks:754856170/8a6b90d7-59fc-4669-baa6-c7e53d45a6ef/stream/progressive',
      comments: [],
      streamURL: null
    },
    ...
  ]
}

Join Our Discord Server