Steam Web API for node.js
Switch branches/tags
Nothing to show
Latest commit ba8962f Oct 23, 2011 @brainss more docs :)
Failed to load latest commit information.
lib more docs :) Oct 23, 2011
package.json Improvements Oct 22, 2011


Steam Web API for node.js

A Steam API Key is needed to use this module.

Steam Documentation

To install:

npm install steamAPI

To use:

var steam = require('steamAPI').configure('yourSteamAPIKey');

//Returns a JSON object of Robin Walker's TF2 Backpack

Specify Settings

Optionally, you can change all of the default settings by passing an object map to configure();

var steam = require('steamAPI').configure({
  format: 'xml',
  gameid: '440',
  version: '0002'
}, 'yourSteamAPIKey');

Available Settings

These are the default settings.

  format: 'json',                   // json returns a JSON object all other formats return a string of raw data
  version: '0001'                   // For Steam API methods the newest version is 0002
  steamid: '76561197960435530',     // Robin Walker
  steamids: ['76561197960435530'],  // getPlayerSummaries() uses an Array of steamids
  gameid: '440',                    // See steam documentation for gameids 
  appid: '440',                     // See steam documentation for appids 
  count: '5',                       // Number of news entries returned
  maxlength: '300',                 // Maximum length of each news entry
  language: 'en',                   // See steam documentation for available languages

Supported methods

  • getNewsForApp
  • getGlobalAchievementPercentagesForApp
  • getPlayerSummaries
  • getPlayerItems
  • getSchema


//Returns a JSON object for Left 4 Dead 2
  appid: 550,
  count: 10,
  maxlength: 300
}, console.log);

//Returns a raw XML string of the default appid (440) which is TF2 using method version 0002
  format: 'xml',
  version: '0002'
}, console.log);

//This method uses an array of 64bit Steamids in the query.
//The Steam Web API limits the request to 100 steamids.
  steamids: ['76561197960435530']
}, console.log);

//Returns my TF2 backpack as a JSON object
  steamid: '76561198010315856'
}, console.log);

//Returns the entire TF2 Item Schema as a JSON object

Please Note

By default, all methods will use version 0001. Currently the Steam Web API (non-TF2) methods support version 0002. To use the newest version please specify within the parameter object.

  appid: '440',
  version: '0002'
}, console.log);