jennifer registry

@skiffyard/steam

A thick, friendly layer over Valve's Steam Web API

Formerly @deckyard/steam.

steamvalvegamesrestapi

Depend on it

[decks]
"@skiffyard/steam" = "^0.4.0"

Versions

VersionStatusKindPinRequiresEnginesCapabilities
0.4.0livegit12867ab8bee5-jennifer >=0.28.0net

License

LGPL-3.0-only

Source

Released from
0.4.0
Published under
@skiffyard skiffyard organisation
Repository owner
skiffyard

Resolutions

Times 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.

Readme

@skiffyard/steam

test Documentation release

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.

Install

jvc add @skiffyard/steam

jvc 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).

Example

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:11101

Get 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.

Documentation

https://skiffyard.github.io/deck-steam/: a guide per topic and the cheatsheet of every export. Valve's own reference: Steam Web API documentation.

Disclaimer

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.

License

LGPL-3.0-only, see LICENSE. Copyright (C) 2026 mplx <[email protected]>.

Trademarks

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.

This deck as JSON