Skip to content
 
 

Repository files navigation

Steam Community for Node.js

Fork of DoctorMcKay/node-steamcommunity — all credit to Alex Corn (DoctorMcKay) for the original library.

Forked repo: jsupa/node-steamcommunity

This fork replaces the deprecated request HTTP library with impit and adds TypeScript definitions, SOCKS proxy support, and Node.js 18+ compatibility.

npm version npm downloads license

This module provides an easy interface for the Steam Community website. This module can be used to simply login to steamcommunity.com for use with other libraries, or to interact with steamcommunity.com.

Have a question about the module or coding in general? Do not create a GitHub issue. GitHub issues are for feature requests and bug reports. Instead, post in the dedicated forum. Such issues may be ignored!

🔄 v4.0.0 — Migration to impit

The deprecated request package has been replaced with impit, a modern HTTP library with native fetch API, browser TLS fingerprint emulation, and built-in SOCKS/HTTP proxy support.

What Changed

v3.50.x (old) v3.51.0 (new)
request package impit + tough-cookie
Request.jar(), Request.cookie() tough-cookie CookieJar / Cookie.parse()
Request.defaults({...}) new Impit({...}) constructor
options.request (inject custom instance) options.impit (inject custom Impit instance)
options.proxy via request agent options.proxy → impit proxyUrl (native HTTP/HTTPS/SOCKS4/SOCKS5)
Node.js >=4.0.0 Node.js >=18.0.0 (impit requires native fetch)
No TypeScript types Full .d.ts type definitions included

Breaking Changes

1. steamCommunity.request is gone

The old request instance was exposed as steamCommunity.request. It no longer exists.

// ❌ OLD (broken in v3.51.0)
steamCommunity.request.get(url, (err, response, body) => { ... });
steamCommunity.request.post({url, form: {...}}, callback);

// ✅ NEW — use httpRequest/httpRequestGet/httpRequestPost (powered by impit)
steamCommunity.httpRequestGet({uri: url}, (err, response, body) => { ... });
steamCommunity.httpRequestPost({uri: url, form: {...}}, callback);

2. Injecting a custom HTTP client

// ❌ OLD
const community = new SteamCommunity({request: myCustomRequestInstance});

// ✅ NEW
const { Impit } = require('impit');
const myImpit = new Impit({browser: 'firefox', http3: true});
const community = new SteamCommunity({impit: myImpit});

3. Proxy configuration

// ❌ OLD — proxy configured on the request instance
const request = require('request').defaults({proxy: 'http://...'});
const community = new SteamCommunity({request});

// ✅ NEW — proxy is a direct constructor option (impit natively handles it)
const community = new SteamCommunity({proxy: 'http://user:pass@host:3128'});
// or SOCKS5:
const community = new SteamCommunity({proxy: 'socks5://127.0.0.1:9050'});

4. Node.js version

impit requires Node.js 18+ (native fetch support).

New Features

  • TypeScript typesindex.d.ts included. Auto-discovered via "types" in package.json. Covers all 80+ methods, 9 enums, 7 classes, and 11 typed events.
  • SOCKS proxy support — impit natively supports SOCKS4/SOCKS5 proxies via options.proxy.
  • Browser TLS fingerprinting — inject a custom Impit instance with {browser: 'chrome'} or {browser: 'firefox'} for TLS fingerprint emulation.
  • encoding: null — still returns a raw Buffer for binary data (images), bridged via response.arrayBuffer().
  • formData multipart uploads — avatar uploads and file uploads work via a built-in multipart body builder.

Publish

npm run publish:dry      # Preview what will be published
npm run publish:public   # Publish to npm

Documentation

Documentation is available on the GitHub wiki.

Support

Report bugs on the issue tracker or ask questions on the dedicated forum.

About

Interact with various interfaces on Steam Community from Node.js

Resources

Contributing

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages