A thick, friendly layer over Valve's Steam Web API
Formerly @deckyard/steam.
[decks]
"@skiffyard/steam" = "^0.4.0"| Version | Status | Kind | Pin | Requires | Engines | Capabilities |
|---|---|---|---|---|---|---|
| 0.4.0 | live | git | 12867ab8bee5 | - | jennifer >=0.28.0 | net |
LGPL-3.0-only
0.4.0Times a client asked this registry where to find this deck. Not downloads: the registry only stores metadata, and the code is fetched from its repository directly, so we never see an install and cannot count one. Repeated builds inflate these numbers; installs from an existing lockfile do not appear at all. Counted in UTC.
A typed client for Valve™'s Steam™ Web API (ISteamUser, IPlayerService, ISteamUserStats, ISteamApps, ISteamNews, ISteamRemoteStorage, IEconService, IGameServersService), the storefront on store.steampowered.com and the Community Market on steamcommunity.com, for Jennifer. Replies come back as structs, Steam ids are accepted in all three notations, arguments are checked before any request, and every failure is a SteamError (kind "steam", with the HTTP status), except the generic kinds: a reached cap ("limit"), a deadline ("timeout"), a connection closed mid-reply ("closed"), a cancelled task ("cancelled") and a host that cannot be reached (net.NetError, kind "net").
This deck is part of Skiffyard, small community decks for Jennifer.
jvc add @skiffyard/steamjvc vendors src/ to vendor/skiffyard/steam/. To vendor by hand, unpack src/ from the release archive skiffyard-steam-<version>.tar.gz there. Needs Jennifer 0.28.0 or newer and the default jennifer binary (jennifer-tiny has no net).
import "@skiffyard/steam/" as steam;
def c as steam.Client init steam.clientFromEnv(); # reads STEAM_API_KEY
# needs a key: profiles, libraries, achievements
def id as string init steam.resolveAccount($c, "gabelogannewell");
def p as steam.PlayerSummary init steam.playerSummary($c, $id);
io.printf("%s is %s\n", $p.personaName, steam.personaStateName($p.personaState));
def lib as list of steam.OwnedGame init steam.ownedGames($c, $id, true, true);
for (def g in steam.mostPlayed($lib, 5)) {
io.printf("%s|pad=40 %f|prec=1 h\n", $g.name, steam.playtimeHours($g.playtimeForever));
}
# keyless: player counts, the storefront, the market, news
io.printf("%d in game\n", steam.currentPlayers($c, 730));
def d as steam.AppDetails init steam.appDetails($c, 620);
def q as steam.MarketPrice init steam.priceOverview($c, 440, "Mann Co. Supply Crate Key");
for (def n in steam.newsForApp($c, 440, 3, 0)) {
io.printf("%s\n %s\n", $n.title, steam.summarize(steam.plainText($n.contents), 120));
}
# no request at all
steam.toSteamId2("76561197960287930"); # STEAM_1:0:11101Get a key at https://steamcommunity.com/dev/apikey. STEAM_VERBOSE=1 prints each request with the key redacted. examples/ has one runnable program per topic.
https://skiffyard.github.io/deck-steam/: a guide per topic and the cheatsheet of every export. Valve's own reference: Steam Web API documentation.
Valve changes the Web API without notice and has retired endpoints before (see apps). Respect the Steam Web API Terms of Use and the rate limits; hammering the Community Market gets an address blocked. Use at your own risk; no warranty of any kind.
LGPL-3.0-only, see LICENSE. Copyright (C) 2026 mplx <[email protected]>.
Steam™, Valve™ and the Steam logo are trademarks of Valve Corporation. Other product and company names may be trademarks of their respective owners. They are used only to identify the products this deck works with. This deck is an independent project, not affiliated with, sponsored, endorsed or supported by Valve Corporation.