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

@varandas/steam

v2.0.0

Published

Gets data from steam

Readme

Steam

Node.js CI codecov semantic-release: angular

Interface to the Steam Web API, fully typed, written in TypeScript. (Wrapper for the Steam Web API)

Steam

Valve provides these APIs so website developers can use data from Steam in new and interesting ways. They allow developers to query Steam for information that they can present on their own sites.

The Steam Web API is a RESTful web service designed to be called from a web browser using JavaScript, or from a server using a standard HTTP library.

I designed this library to make it easy to use the Steam Web API in your projects - Contributions are more than welcome! Feel free to submit your ideas by opening a new issue or creating a Pull Request.

Features / Roadmap

  • [x] News
  • [x] Player
  • [x] User
  • [x] User Stats

News

  • [x] Get News For App

Player

  • [x] Get Owned Games
  • [x] Get Recently Played Games

User

  • [x] Get PlayerSummaries
  • [x] Get IFriend List

User Stats

  • [x] Get Player Achievements
  • [x] Get Global Achievements Percentages For App
  • [x] Get User Stats For Game

Installation

# With npm
npm install @varandas/steam

# Or with yarn
yarn add @varandas/steam

Usage

Please note that you need to register for a Steam Web API key.

Also be aware that the Steam Web API only works on a node environment. Requests made from the browser will fail.

With es6 modules

import SteamApi, { IGetNewsForAppParams, IGetNewsForAppResponse } from '@varandas/steam'

// Create a new client
const steamApi = new SteamApi("YOUR_STEAM_API_KEY")

// Get the services as needed
const newsService = steamApi.getNewsService()
const playerService = steamApi.getPlayerService()
const userService = steamApi.getUserService()
const userStatsService = steamApi.getUserStatsService()

Or with commonjs

const SteamApi = require('@varandas/steam').default

Documentation

SteamApi

// Main class, use it to create the services. 
const steamApi = new SteamApi("YOUR_STEAM_API_KEY")

News Service

// Get the news service from the client
const newsService = steamApi.getNewsService()

// Get News For App
const news = await newsService.getNewsForApp({
  appid: 440,
  count: 3,
  maxlength: 300,
})

User Service

// Get the user service
const userService = steamApi.getUserService()

// Get Player Summaries
const users = await userService.getPlayerSummaries({
  steamids: ['76561198000000000', '76561198000000001'],
})

// Get IFriend List
const friends = await userService.getFriendList({
  steamid: '76561198000000000',
  relationship: 'all',
})

User Stats Service

// Get the user stats service
const userStatsService = steamApi.getUserStatsService()

// Get Player Achievements
const achievements = await userStatsService.getPlayerAchievements({
  steamid: '76561198000000000',
  appid: 440,
})

// Get Global Achievements Percentages For App
const achievements = await userStatsService.getGlobalAchievementsPercentagesForApp({
  gameid: 440,
})

// Get User Stats For Game
const stats = await userStatsService.getUserStatsForGame({
  steamid: '76561198000000000',
  appid: 440,
})

Player Service

// Get the player service
const playerService = steamApi.getPlayerService()

// Get Owned Games
const games = await playerService.getOwnedGames({
  steamId: '76561198000000000',
  includeAppInfo: true,
  includePlayedFreeGames: true,
})

// Get Recently Played Games
const games = await playerService.getRecentlyPlayedGames({
  steamid: '76561198000000000',
  count: 3,
})

License

MIT - 2023 André Varandas

Disclaimer

This project is not affiliated with Valve Corporation or Steam. All trademarks are property of their respective owners in the US and other countries. ©2023 Valve Corporation. Steam and the Steam logo are trademarks and/or registered trademarks of Valve Corporation in the U.S. and/or other countries.