Unofficial https://steamapis.com .NET library, targeting .NET 8.0
dotnet add package SteamApis.Netusing SteamApis.Net.Extensions;
builder.Services.AddSteamApis("your-steamapis-key");You can optionally customize the underlying HttpClient:
builder.Services.AddSteamApis("your-steamapis-key", client =>
{
client.Timeout = TimeSpan.FromSeconds(30);
});Then inject ISteamApisClient anywhere:
public class MyService(ISteamApisClient steamApis)
{
public async Task DoWorkAsync()
{
var inventory = await steamApis.Steam.Users.GetInventoryAsync("7656119...", 730, 2);
}
}using SteamApis.Net.Services;
var client = SteamApisClientFactory.Create("your-steamapis-key");
var inventory = await client.Steam.Users.GetInventoryAsync("7656119...", 730, 2);ISteamApisClient exposes two API groups:
| Property | Base URL | Description |
|---|---|---|
Steam |
https://api.steamapis.com |
Steam API v2 endpoints |
MarketPlace |
https://marketplaceapi.steamapis.com |
Third-party Marketplace Data API v2 |
Every method returns an ApiResult<T> — no exceptions are thrown for API-level failures:
var result = await client.Steam.Apps.GetDetailsAsync(730);
if (result.IsSuccess)
{
Console.WriteLine(result.Value.Name);
}
else
{
Console.WriteLine($"{result.Error.StatusCode}: {result.Error.Message}");
}ApiResult<T> also provides helpers like TryGetValue, GetValueOrDefault, Map, OnSuccess, and OnFailure:
var playerCount = (await client.Steam.Apps.GetPlayerCountsAsync())
.OnFailure(error => logger.LogWarning("Request failed: {Code}", error.Code));