Steam.getOwnedGames()

GetOwnedGames returns a list of games a player owns along with some playtime information, if the profile is publicly visible. Private, friends-only, and other privacy settings are not supported unless you are asking for your own personal details (ie the WebAPI key you are using is linked to the steamid you are requesting).

Usage

Hover over inputs/exits for more info.

var Steam = require('machinepack-steam');


// GetOwnedGames returns a list of games a player owns along with some playtime information, if the profile is publicly visible. Private, friends-only, and other privacy settings are not supported unless you are asking for your own personal details (ie the WebAPI key you are using is linked to the steamid you are requesting).

Steam.getOwnedGames({

steamid: '76561197960434622',

key: 'XXXXXXXXXXXXXXXXXXXXXXX',

include_appinfo: 1,

include_played_free_games: 1,

appids_filter: [ 440, 500, 550 ],

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// OK.

success: function (result) {

 

},

});

Inputs

steamid required

The SteamID of the account.

'76561197960434622'
key required

Steam API Key

'XXXXXXXXXXXXXXXXXXXXXXX'
include_appinfo

Include game name and logo information in the output. The default is to return appids only.

1
include_played_free_games

By default, free games like Team Fortress 2 are excluded (as technically everyone owns them). If include_played_free_games is set, they will be returned if the player has played them at some point. This is the same behavior as the games list on the Steam Community.

1
appids_filter

You can optionally filter the list to a set of appids. Note that these cannot be passed as a URL parameter, instead you must use the JSON format described in Steam_Web_API#Calling_Service_interfaces.

[ 440, 500, 550 ]

Exits

error

An unexpected error occurred.

success

OK.

{ game_count: 1,
  games: 
   [ { appid: 10,
       name: 'Counter-Strike',
       playtime_forever: 32,
       img_icon_url: '6b0312cda02f5f777efa2f3318c307ff9acafbb5',
       img_logo_url: 'af890f848dd606ac2fd4415de3c3f5e7a66fcb9f',
       has_community_visible_stats: true } ] }