![]() |
VOOZH | about |
dotnet add package SteamWebAPI2 --version 5.0.0
NuGet\Install-Package SteamWebAPI2 -Version 5.0.0
<PackageReference Include="SteamWebAPI2" Version="5.0.0" />
<PackageVersion Include="SteamWebAPI2" Version="5.0.0" />Directory.Packages.props
<PackageReference Include="SteamWebAPI2" />Project file
paket add SteamWebAPI2 --version 5.0.0
#r "nuget: SteamWebAPI2, 5.0.0"
#:package SteamWebAPI2@5.0.0
#addin nuget:?package=SteamWebAPI2&version=5.0.0Install as a Cake Addin
#tool nuget:?package=SteamWebAPI2&version=5.0.0Install as a Cake Tool
👁 Build Status
👁 NuGet
👁 MyGet CI
This is a .NET library that makes it easy to use the Steam Web API. It conveniently wraps around all of the JSON data and ugly API details with clean methods, structures and classes.
Please refer here for details regarding the Steam Web API, its endpoints, and how this library consumes them.
Check this README and the Wiki for more details about getting started and common use cases.
This library was created to address the (at times) awful nature of the Steam Web API. Many of the exposed endpoints have little to no documentation on the parameters and absolutely no documentation on any of the responses. In addition, many of the endpoints do not follow any type of coding convention as it appears that different developers created different endpoints without collaborating with one another.
For example, some responses have a containing "response" object while others have a containing "result" object. To make it worse, some have a containing "results" or "responses" or "applist" or "playerstats" object or a number of other unconventional choices.
Instead of stressing about parsing the ugly JSON responses yourself, just use this library to make a method call and get back a response with everything in a more C#/.NET style. These are the rules on which the library was built:
DateTime.enum where possible.NOTE:
Valve's Steamworks documentation doesn't do a good job at explaining the difference between their public API and partner API. This library only works with the public-facing API located at: api.steampowered.com. Any endpoints from their documentation that are located at the partner.steam-api.com will not be accessible with this library. I am not a registered publisher and thus don't have access to any of the partner endpoints.
See the library in the NuGet gallery here.
Package Manager:
Install-Package SteamWebAPI2
.NET Core CLI:
dotnet add package SteamWebAPI2
About section so you understand why this library existsSteamWebInterfaceFactory to use as a helper to create objects for various endpoint calls.The library is structured to mirror the Steam Web API endpoint structure. For example, the "DOTA2Econ" class will expose methods to communicate with the "IDOTA2Econ" endpoints. See here for more endpoint details.
Each method returns a SteamWebResponse object which contains the following:
| Field | Type | Description |
|---|---|---|
| Data | T | Maps to the payload returned by the Steam Web API. |
| ContentLength | long? | Maps to the HTTP ContentLength header. |
| ContentType | string | Maps to the HTTP ContentType header. |
| ContentTypeCharSet | string | Maps to the HTTP ContentType charset header. |
| Expires | DateTimeOffset? | Maps to the HTTP Expires header. Optional. |
| LastModified | DateTimeOffset? | Maps to the HTTP LastModified header. Optional |
// factory to be used to generate various web interfaces
var webInterfaceFactory = new SteamWebInterfaceFactory(<dev api key here>);
// this will map to the ISteamUser endpoint
// note that you have full control over HttpClient lifecycle here
var steamInterface = webInterfaceFactory.CreateSteamWebInterface<SteamUser>(new HttpClient());
// this will map to ISteamUser/GetPlayerSummaries method in the Steam Web API
// see PlayerSummaryResultContainer.cs for response documentation
var playerSummaryResponse = await steamInterface.GetPlayerSummaryAsync(<steamIdHere>);
var playerSummaryData = playerSummaryResponse.Data;
var playerSummaryLastModified = playerSummaryResponse.LastModified;
// this will map to ISteamUser/GetFriendsListAsync method in the Steam Web API
// see FriendListResultContainer.cs for response documentation
var friendsListResponse = await steamInterface.GetFriendsListAsync(<steamIdHere>);
var friendsList = friendsListResponse.Data;
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 is compatible. |
| .NET Framework | net461 net461 was computed. net462 net462 was computed. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 3 NuGet packages that depend on SteamWebAPI2:
| Package | Downloads |
|---|---|
|
SourceSchemaParser
Parses Valve Source Engine game schema files into easy to use object oriented structures. |
|
|
GameCollector.StoreHandlers.Steam
Library for finding games owned and installed with Steam. |
|
|
Nami
Package Description |
Showing the top 2 popular GitHub repositories that depend on SteamWebAPI2:
| Repository | Stars |
|---|---|
| LANCommander/LANCommander | |
|
sp0ok3r/Mercury
Mercury is a powerful tool for Steam users built on SteamKit2, offering advanced features for managing accounts, chats, and interactions.
|
| Version | Downloads | Last Updated |
|---|---|---|
| 5.0.0 | 13,251 | 11/12/2025 |
| 4.4.1 | 65,652 | 4/12/2023 |
| 4.4.0 | 14,425 | 8/6/2022 |
| 4.3.2 | 15,360 | 11/20/2021 |
| 4.3.1 | 7,297 | 7/28/2021 |
| 4.3.0 | 4,307 | 3/1/2021 |
| 4.2.7 | 4,240 | 1/4/2021 |
| 4.2.6 | 5,739 | 10/14/2020 |
| 4.2.5 | 7,760 | 7/13/2020 |
| 4.2.4 | 2,055 | 5/27/2020 |
| 4.2.3 | 1,763 | 5/6/2020 |
| 4.2.2 | 1,302 | 5/6/2020 |
| 4.2.1 | 1,343 | 5/1/2020 |
| 4.2.0 | 3,019 | 5/1/2020 |
| 4.1.5 | 1,301 | 4/28/2020 |
| 4.1.4 | 1,299 | 4/27/2020 |
| 4.1.3 | 1,498 | 4/27/2020 |
| 4.1.2 | 1,327 | 4/24/2020 |
| 4.1.1 | 2,609 | 3/26/2020 |
| 4.1.0 | 1,509 | 3/7/2020 |