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 🙏

© 2026 – Pkg Stats / Ryan Hefner

spotify-scraper

v1.0.3

Published

Used for obtaining streams from artist

Readme

Spotify Scraper

[!WARNING] Package is NOT for commercial use and is intended solely for non-profit, educational, and recreational purposes.

Overview

Obtain data from Spotify regarding your favorite artist or album. Utilizes Puppeteer.

Install

npm i spotify-scraper

Dependencies

Usage

|Function| Example | Type | Description | |---| ---| ---| --- | getAlbum | getAlbum('6YUCc2RiXcEKS9ibuZxjt0') | (albumID:string) => Promise<AlbumData> | Takes in Spotify AlbumID, returns AlbumData | getArtist | getArtist('3fMbdgg4jU18AjLCKBhRSm') | (artistID:string) => Promise<ArtistData> | Takes spotifyArtistID, returns ArtistData getTotalStreams| getTotalStreams(TracksV2) | (TracksV2) => number | Takes in TracksV2 object from AlbumData and returns total streams of album.

Demo

import { getArtist } from "spotify-scraper"
//Take a look at artist
    const nirvana = await getArtist('6olE6TJLqED3rqDCT0FyPh');
    console.log(nirvana)

Click for expected response

// Get an artist releases
import { getArtist } from "spotify-scraper"
    const aliciaKeys = await getArtist('3DiDSECUqqY1AuBP8qtaIa');

    const aliciaKeysAlbums = aliciaKeys.data.artistUnion.discography.albums.items;
    aliciaKeysAlbums.forEach(album => album.releases.items.forEach(release => console.log(release)));

Click for expected response

import { getAlbum, getTotalStreams } from "spotify-scraper"
// Get album
    const cowboyCarterAlbum = await getAlbum('6BzxX6zkDsYKFJ04ziU5xQ');
// Take a look at albumUnion
    console.log(cowboyCarterAlbum.data.albumUnion);
// Get the albums totalStreams
    console.log(getTotalStreams(cowboyCarterAlbum.data.albumUnion.tracksV2));

Click for expected response

Models

AlbumData

Artist