
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
steam-webapi
Advanced tools
Supports Node v0.8.26 (or newer) but might work on older versions
A Steam API Key is needed for many of the methods in the API and is a requirement for this library.
All the methods are created at runtime (available after Steam.ready, which retrieves the API methods), rather than compile-time, so this should theoretically support all (existing and future) Steam API methods. No need to worry about calling the correct API version, as it will always be the latest. If you must use a different version simply pass in a {'version': x} option into a method.
To install:
npm install steam-webapi
var Steam = require('steam-webapi');
// Set global Steam API Key
Steam.key = "YOUR API KEY";
Steam.ready(function(err) {
if (err) return console.log(err);
var steam = new Steam();
// Retrieve the steam ID from a steam username/communityID
steam.resolveVanityURL({vanityurl:'jonbo'}, function(err, data) {
console.log(data);
// data -> { steamid: '76561197968620915', success: 1 }
// Get the Player's TF2 Backpack items
data.gameid = Steam.TF2;
// getPlayerItems requires { gameid, steamid }
steam.getPlayerItems(data, function (err, data) {
console.log(data);
// data -> { status: 1, num_backpack_slots: 1100, items: [...], ...}
});
});
});
// Requires node 0.11+ and "node --harmony"
var Steam = require('steam-webapi');
var Promise = require('bluebird');
// Set global Steam API Key
Steam.key = "YOUR API KEY";
Steam.ready(Promise.coroutine(function*(err) {
if (err) return console.log(err);
// Creates an promise wielding function for every method (with Async attached at the end)
Promise.promisifyAll(Steam.prototype);
var steam = new Steam();
// Retrieve the steam ID from a steam username/communityID
var data = yield steam.resolveVanityURLAsync({vanityurl:'jonbo'});
console.log(data);
// data -> { steamid: '76561197968620915', success: 1 }
// Get the Player's TF2 Backpack items
data.gameid = Steam.TF2;
data = yield steam.getPlayerItemsAsync(data);
console.log(data);
// data -> { status: 1, num_backpack_slots: 1100, items: [...], ...}
}));
If you plan on only using this for TF2 data only (or just want to default to it), the first example can be rewritten.
var steam = new Steam({gameid: Steam.TF2, appid:Steam.TF2});
steam.resolveVanityURL({vanityurl:'jonbo'}, function(err, data) {
// No need for data.gameid = Steam.TF2; here
steam.getPlayerItems(data, function (err, data) {
console.log(data);
// data -> { status: 1, num_backpack_slots: 1100, items: [...], ...}
});
});
It works the same for 'key' and other fields.
$ npm run test
MIT
FAQs
Steam WebAPI wrapper
The npm package steam-webapi receives a total of 391 weekly downloads. As such, steam-webapi popularity was classified as not popular.
We found that steam-webapi demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.