Skip to content

MattPua/steam-nodejs

Repository files navigation

Steam Node.js Library (Unofficial)

npm version npm downloads License: MIT Contributions welcome

An unofficial Node.js library for the Steam Web API written in TypeScript. This library is built with Bun and Zod.

Based on the also unofficial Steam API documentation by XPaw.

This SDK provides a simple way to interact with different parts of the Steam API. Specifically, it operates on endpoints that have been validated to work (by manually testing each endpoint from the unofficial documentation).

It also provides a simple way to redirect users to a Steam login page and authenticate users with Steam using OpenID Connect.

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

Installation

bun add steam-nodejs

Usage

import { SteamClient } from 'steam-nodejs';

const steamClient = new SteamClient('your-api-key');


// After authenticating the user, you can operate on different parts of the Steam API
const friendsList = await steamClient.user.getFriendsList(user.steamid);

console.log(friendsList);

More Examples

import { SteamClient } from 'steam-nodejs';

const steamClient = new SteamClient('your-api-key');

const followedGames = await steamClient.store.getGamesFollowed(user.steamid);

console.log(appDetails.name);

Available Services

Currently, the following services are available:

Features

Service Features
Charts Get games by concurrent players
Get most played games
Get best of year
Community Get apps
Econ Get trade offers summary
Get trade history
Get trade offers
News Get news for app
Player Get Steam level
Get badges
Get owned games
Get recently played games
Get last played times
Get animated avatar
Get avatar frame
Get mini profile background
Get favourite badge
Get player link details
Get profile background
Get profile customization
Get profile items equipped
Get Steam Deck keyboard skins
Get top achievements for games
Sale Get user year in review
Get user year achievements
Stats Get number of current players
Get player achievements
Get global achievement percentages for app
Get schema for game
Get user stats for game
Store Top Sellers Get weekly top sellers
Steam Store Get app details (use this specifically to get information about a particular app)
Store Get app list on store
Get games followed
Get games followed count
Get most popular tags
User Store Visit Get most visited items on store
User Get user
Get friends list
Get users
Get user group list
Wishlist Get wishlist
Get wishlist item count
Reviews Get reviews for an app
Actions Get categories for the store
Get tags for the store

Documentation

For more information, please see the documentation.

Also read InternalSteamWebAPI for more extra on other undocumented endpoints and information on the Steam Store Web API.

Contributing

Please see CONTRIBUTING.md for contribution guidelines.

Developing Locally

This project requires the following dependencies to be installed:

To install the dependencies, run the following command:

bun install

Testing

Please create a .env.test file with the following content:

TEST_STEAM_API_KEY=your-api-key
TEST_STEAM_USER_ID=your-steam-user-id

You can get your Steam API key from the Steam Developer Portal.

After which, you can run the tests with the following command:

bun test

License

MIT

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. Valve Corporation. Steam and the Steam logo are trademarks and/or registered trademarks of Valve Corporation in the U.S. and/or other countries.

About

Unofficial Steam (Valve Corporation) NodeJS SDK

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published