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

steamgames

v1.2.3

Published

A package for fetching game data from Steam APIs

Readme


🚀 Features

  • 🔍 Get full Steam app list
  • 🆔 Convert app names to Steam IDs
  • 🎮 Fetch game details with filters
  • 🔌 Fully typed and ESM-compatible
  • ⚙️ Easily extendable API architecture

📦 Installation

npm install steamgames

📦 steamgames Documentation

This package provides convenient functions to fetch game data from the Steam API. Below are the available functions, their descriptions, and usage examples.


Functions

0. getSteamIDList

Fetches the full list of Steam apps (games and software) from the Steam API.

Signature:

getSteamIDList(): Promise<ListAPIResponse>

Returns: A promise that resolves to the full app list object as returned by the Steam API.

Example:

import { getSteamIDList } from 'steamgames';

async function showAppList() {
  const appList = await getSteamIDList();
  console.log(appList.applist.apps.app); // Array of { appid, name }
}

showAppList();

1. getSteamGameDetails

Fetches detailed information about a Steam game by its appid.

Signature:

getSteamGameDetails(appid: number, country?: string): Promise<APIResponse>

Example:

import { getSteamGameDetails } from 'steamgames';

const appid = 292030; // The Witcher 3: Wild Hunt
const country = 'de'; // Optional country code

getSteamGameDetails(appid, country).then(result => {
  if (result.success) {
    console.log('Game name:', result.data.name);
    console.log('Game price details:', result.data.price_overview);
  } else {
    console.log('No data exists for this game.');
  }
});

2. getSteamGameNamefromID

Finds the game name for a given Steam appid.

Signature:

getSteamGameNamefromID(appid: string): Promise<string | undefined>

Example:

import { getSteamGameNamefromID } from 'steamgames';

getSteamGameNamefromID('292030').then(name => {
  if (name) {
    console.log('Game name:', name);
  } else {
    console.log('Game not found.');
  }
});

3. getSteamIDforGame

Finds the Steam appid for a given game name. I have applied fuzzy logic for search and you can set the threshold in the function. threshold value can be between (0.1 - 1.0) (most to least strict) Signature:

getSteamIDforGame(gameName: string, threshold: number): Promise<number | undefined>

Example:

import { getSteamIDforGame } from 'steamgames';

getSteamIDforGame('Witcher 3', 0.2).then(appid => {
  if (appid) {
    console.log('Found appid:', appid);
  } else {
    console.log('Game not found.');
  }
});

4. getSteamIDsforGame

Finds multiple Steam appids for a given game name. I have applied fuzzy logic for search and you can set the threshold in the function. threshold value can be between (0.1 - 1.0) (most to least strict)

Signature:

getSteamIDsforGame(gameName: string, threshold: number): Promise<number | undefined>

Example:

import { getSteamIDsforGame } from 'steamgames';

getSteamIDsforGame('Witcher 3', 0.2).then(appid => {
  if (appid) {
    console.log('Found appid:', appid);
  } else {
    console.log('Game not found.');
  }
});

5. getSteamPriceOverview

Fetches price overview for one or more Steam appids.

Signature:

getSteamPriceOverview(appids: number[], country?: string): Promise<PriceAPIResponse>

Example:

import { getSteamPriceOverview } from 'steamgames';

const appids = [3240220, 292030];
const country = 'de';

getSteamPriceOverview(appids, country).then(result => {
  for (const appid of appids) {
    const price = result[appid]?.data?.price_overview?.final_formatted;
    console.log(`Price of game with appid ${appid}:`, price);
  }
});

6. Combined Example: Get Game Name and Price

Fetches the price and name for multiple appids using both getSteamPriceOverview and getSteamGameNamefromID.

Example:

import { getSteamPriceOverview } from 'steamgames';
import { getSteamGameNamefromID } from 'steamgames';

async function testGetSteamGameAPIs() {
  const appids = [3240220, 292030, 377160];
  const country = 'de'; // Example country code

  try {
    const result = await getSteamPriceOverview(appids, country);

    for (const appid of appids) {
      const price = result[appid]?.data?.price_overview?.final_formatted;
      const appiStr = String(appid);
      const name = await getSteamGameNamefromID(appiStr);
      console.log(`Current Price of  ${name}:`, price);
    }
  } catch (error) {
    console.error('Error fetching game details:', error);
  }
}

// Call the test
testGetSteamGameAPIs();

Notes

  • All functions are asynchronous and return Promises.
  • Make sure to handle errors using try/catch or .catch().
  • You can import these functions directly from the package after building and publishing.

For more details, see the source code or open an issue on the repository.