Framework-agnostic PHP SDK for the Steam Web API, built on top of Saloon v4.
It powers the player profiles on Dead by Stats.
- Fluent resources on the connector —
$connector->players()->ownedGames($id). - Lists past Steam's 100 IDs —
summaries()andbans()cut them into concurrent requests. - Strong types (PHP 8.5, PHPStan max, 100% type coverage).
- Readonly DTOs with
DateTimeImmutableinstead of framework date objects. - Domain exception hierarchy rooted at
SteamApiException. - Daily 100 000-request rate limit baked in via
saloonphp/rate-limit-plugin, reset at 00:00 UTC, or limits of your own throughrateLimits. - Timeouts and opt-in retries on
SteamConfig— only a5xxor no answer at all is retried, since every attempt spends quota. - Request, response and failure hooks with key-free payloads, and
debug()output with the key masked. - Requests of your own for methods the SDK does not ship, sent with the key, the budget and SDK exceptions.
SteamFakeand a factory per DTO for tests, faking every endpoint and the failures Steam really sends.- Zero framework coupling — any Saloon
Senderin place of Guzzle, and a Laravel bridge package ships separately.
- PHP 8.5+
- Saloon 4, with its rate limit plugin 2.5.2+
composer require fkrzski/php-steam-api-sdkuse Fkrzski\SteamApiSdk\SteamConfig;
use Fkrzski\SteamApiSdk\SteamConnector;
use Fkrzski\SteamApiSdk\ValueObjects\SteamId;
$connector = new SteamConnector(new SteamConfig(apiKey: 'YOUR_STEAM_API_KEY'));
$summaries = $connector->users()->summaries([SteamId::fromSteamId64('76561198000000000')]);
echo $summaries[0]->personaName;Full documentation — every request, the SteamId value object, configuration, rate limiting, DTOs, the exception hierarchy, hooks and debugging, custom requests, testing helpers and what SemVer covers — lives at docs.fkrzski.dev/php-steam-api-sdk.
MIT. See LICENSE.md.