Search by

fkrzski / php-steam-api-sdk

fkrzski

Framework-agnostic PHP SDK for the Steam Web API, built on Saloon.

Package info

github.com/fkrzski/php-steam-api-sdk

pkg:composer/fkrzski/php-steam-api-sdk

Fund package maintenance!

fkrzski

Statistics

Installs: 2 536

Dependents: 1

Suggesters: 0

Stars: 2

Open Issues: 4

0.8.0 2026-10-07 05:15 UTC

README

PHP Steam API SDK — composer require fkrzski/php-steam-api-sdk

License Latest Version on Packagist Total Downloads Tests

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).
  • Strong types (PHP 8.5, PHPStan max, 100% type coverage).
  • Readonly DTOs with DateTimeImmutable instead of framework date objects.
  • Domain exception hierarchy rooted at SteamApiException.
  • Daily 100 000-request rate limit baked in via saloonphp/rate-limit-plugin.
  • Timeouts and opt-in retries on SteamConfig — only a 5xx or 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.
  • Zero framework coupling — a Laravel bridge package ships separately.

Requirements

  • PHP 8.5+
  • Saloon 4+

Installation

composer require fkrzski/php-steam-api-sdk

Quickstart

use 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;

Documentation

Full documentation — every request, the SteamId value object, configuration, DTOs, the exception hierarchy, and debugging hooks — lives at docs.fkrzski.dev/php-steam-api-sdk.

License

MIT. See LICENSE.md.