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

steam-sale

v1.0.3

Published

A promise based scraper for getting Steam games that are on sale.

Readme

Introduction

This module is a promise-based scraper of Steam sales using the infinite scrolling web API endpoint. I didn't get rate limited while trying to scrape every deal. It took a minute, but the promise finally resolved into the correct array. The imported module is a single function which accepts one parameter and returns a promise. The parameter is optional and can be used to set the maximum amount of deals returned by the function. If it's left as undefined, the scraper will return every deal. Of course, the smaller number you set the quicker you'll get your result. The only dependency of this module has is axios. No HTML parsing, just pure text manipulation.

This is my second package, please don't judge me. Happy scraping everyone!

Installation

npm i steam-sale

Example usage

const Steam = require("steam-sale")
async function Test()
{
	const SaleItems = await Steam(10);
	console.log(SaleItems)
}

Test()

Output

  [{
    id: 'app:287700', //'app' or 'bundle' and the ID of the item separated by a colon.
    url: 'https://store.steampowered.com/app/287700/METAL_GEAR_SOLID_V_THE_PHANTOM_PAIN/?snr=1_7_7_2300_150_1', // The url of the item
    img: 'https://cdn.akamai.steamstatic.com/steam/apps/287700/capsule_231x87.jpg?t=1591740509', // 2x sized image url (shown while hovering over the item)
    tags: [
      1687, 1695,   19,
      1742, 1708, 4145,
      1756
    ], // IDs of the tags attached to the item (You could check the meaning of the ID at https://steamdb.info/tag/<id> or https://store.steampowered.com/search/?tags=<id1>,<id2>,-<excludedId>)
    curators: [ 39026134 ], // IDs of the curators associated with the game (check https://store.steampowered.com/curator/<id>)
    title: 'METAL GEAR SOLID V: THE PHANTOM PAIN', // Name of the item
    platforms: [ 'win' ], // Platforms the game can be played on 
    released: '1 Sep, 2015', // Release date
    review: 'Very Positive', // Review summary
    price_data: 749, // Price as a number, in my region it's the number of cents it costs, divide by 100 to get the actual price in the region's currency
    discount: '-75%', // Discount percentage OR 'N/A'
    old_price: '29,99€', // Original price or 'N/A'
    new_price: '7,49€' // Discounted price or 'N/A'
  }
  ...
  ]

N/A and other values that don't make sense

Steam lists some games that cannot be bought separately, only in a bundle. These consequently don't have a price tag either. They are included because if the bundle is on sale the game itself gets listed (even if you can't buy the game itself). Keep them or remove them, these are included in the maximum amount you set and I've decided to return them for clarity's sake.