### Install steamgpt package Source: https://github.com/steamgptnet/steamgpt-js/blob/main/README.md Use npm to install the library in your Node.js project. ```bash npm install steamgpt ``` -------------------------------- ### Quick start with SteamGPT Source: https://github.com/steamgptnet/steamgpt-js/blob/main/README.md Demonstrates basic usage of profile, bans, identity, and batch lookup functions. Supports various SteamID formats. ```js import { profile, bans, identity, batch } from 'steamgpt' // any id form works: steamid64, STEAM_1:0:x, [U:1:x], steamcommunity link or vanity name const player = await profile('76561197960287930') console.log(player.steam?.personaname, player.ids.steamid) // Rabscuttle STEAM_1:0:11101 const b = await bans('76561197960287930') console.log(b.bans.VACBanned, b.bans.NumberOfGameBans) // false 0 const who = await identity('STEAM_1:0:11101') console.log(who.steamid64) // 76561197960287930 // checking many players? ALWAYS batch - up to 100 ids in ONE request const roster = await batch(['76561197960287930', '76561197960265731'], { include: ['bans'] }) console.log(roster.count, roster.players[0].steam_bans) ``` -------------------------------- ### profile(id) Source: https://github.com/steamgptnet/steamgpt-js/blob/main/README.md Fetches the raw Steam summary for a given player. ```APIDOC ## profile(id) ### Description Fetches the raw Steam summary for a given player. ### Parameters - **id** (string) - Required - SteamID64, STEAM_1:0:x, [U:1:x], steamcommunity link, or vanity name. ``` -------------------------------- ### summary(id, opts?) Source: https://github.com/steamgptnet/steamgpt-js/blob/main/README.md Retrieves a comprehensive summary of a player, including Steam profile, bans, FACEIT stats, and friends. The output can be filtered using the include or preset options. ```APIDOC ## summary(id, opts?) ### Description Retrieves a comprehensive summary of a player, including Steam profile, bans, FACEIT stats, and friends. ### Parameters - **id** (string) - Required - SteamID64, STEAM_1:0:x, [U:1:x], steamcommunity link, or vanity name. - **opts** (object) - Optional - Configuration object to trim response with `include` or `preset` (e.g., 'identity' or 'competitive'). ``` -------------------------------- ### batch(ids, opts?) Source: https://github.com/steamgptnet/steamgpt-js/blob/main/README.md Performs a batch lookup for up to 100 players in a single request. ```APIDOC ## batch(ids, opts?) ### Description Performs a batch lookup for up to 100 players in a single request. ### Parameters - **ids** (array) - Required - Array of up to 100 steamid64 strings. - **opts** (object) - Optional - Configuration object for batch request options. ``` -------------------------------- ### compare(idA, idB) Source: https://github.com/steamgptnet/steamgpt-js/blob/main/README.md Compares two players side by side and identifies shared friends. ```APIDOC ## compare(idA, idB) ### Description Compares two players side by side and identifies shared friends. ### Parameters - **idA** (string) - Required - SteamID of the first player. - **idB** (string) - Required - SteamID of the second player. ``` -------------------------------- ### faceit(id) Source: https://github.com/steamgptnet/steamgpt-js/blob/main/README.md Retrieves FACEIT player object and FACEIT ban status. ```APIDOC ## faceit(id) ### Description Retrieves FACEIT player object and FACEIT ban status. ### Parameters - **id** (string) - Required - SteamID64, STEAM_1:0:x, [U:1:x], steamcommunity link, or vanity name. ``` -------------------------------- ### bans(id) Source: https://github.com/steamgptnet/steamgpt-js/blob/main/README.md Retrieves VAC, game, community, and economy ban status for a player. ```APIDOC ## bans(id) ### Description Retrieves VAC, game, community, and economy ban status for a player. ### Parameters - **id** (string) - Required - SteamID64, STEAM_1:0:x, [U:1:x], steamcommunity link, or vanity name. ``` -------------------------------- ### identity(id) Source: https://github.com/steamgptnet/steamgpt-js/blob/main/README.md Converts between various SteamID formats and retrieves vanity names without profile data. ```APIDOC ## identity(id) ### Description Converts between various SteamID formats and retrieves vanity names without profile data. ### Parameters - **id** (string) - Required - SteamID64, STEAM_1:0:x, [U:1:x], steamcommunity link, or vanity name. ``` -------------------------------- ### Handle API errors Source: https://github.com/steamgptnet/steamgpt-js/blob/main/README.md Catch errors and inspect machine-readable slugs to handle specific failure cases like 404s or rate limits. ```js try { await profile('no-such-player-xyz') } catch (e) { console.log(e.code, e.slug) // 404 player_not_found } ``` -------------------------------- ### friends(id, opts?) Source: https://github.com/steamgptnet/steamgpt-js/blob/main/README.md Retrieves the public friend graph for a player. ```APIDOC ## friends(id, opts?) ### Description Retrieves the public friend graph for a player. ### Parameters - **id** (string) - Required - SteamID64, STEAM_1:0:x, [U:1:x], steamcommunity link, or vanity name. - **opts** (object) - Optional - Configuration object; `opts.detail: 'short'` returns a bare steamid64 array. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.