A strongly-typed .NET client for the steamwebapi.com Steam Web API. Targets netstandard2.1, uses System.Text.Json, and returns a Result/Result<T> instead of throwing for expected API failures.
Reference the SteamWebAPI project, or pack/reference the built DLL.
using SteamWebAPI;
using SteamWebAPI.Models.Items;
var client = new SteamWebApiClient("YOUR_API_KEY");
var result = await client.GetItemAsync("AK-47 | Redline (Field-Tested)");
if (result.IsSuccess)
{
var item = result.Value;
Console.WriteLine($"{item.MarketHashName}: {item.PriceLatest}");
}
else
{
Console.WriteLine($"Failed ({result.Error.Type}): {result.Error.Message}");
}Every method accepts an optional CancellationToken and follows the same Task<Result<T>> pattern. Methods are grouped into partial classes by feature (Items, Info, Currency, Float, Profile, Inventory, Explore, MarketIndex, MarketPrices, Account, SteamGuard, TradeOffers, Proxy).
using SteamWebAPI.Extensions;
services.AddSteamWebAPI("YOUR_API_KEY");
// or, to configure the underlying HttpClient:
services.AddSteamWebAPI("YOUR_API_KEY", http => http.Timeout = TimeSpan.FromSeconds(30));Then inject SteamWebApiClient wherever you need it.
This library was mostly generated by AI. Review before relying on it in production.