Difference between revisions of "WebAPI"

From Team Fortress Wiki
Jump to: navigation, search
m (Common elements: Page only consists of 1 URL, which is this one. I thought I'd change it to avoid confusion)
m
 
Line 16: Line 16:
 
:;<code>json</code> (default): The [https://www.json.org/json-en.html JavaScript Object Notation] format
 
:;<code>json</code> (default): The [https://www.json.org/json-en.html JavaScript Object Notation] format
 
:;<code>xml</code>: Standard XML
 
:;<code>xml</code>: Standard XML
:;<code>vdf</code>: [[/VDF|Valve Data Format]]
+
:;<code>vdf</code>: [[WebAPI/VDF|Valve Data Format]]
 
;{{API optional|language}}
 
;{{API optional|language}}
 
:The [[w:List of ISO 639-1 codes|ISO639-1 language code]] for the language all tokenized strings should be returned in. Not all strings have been translated to every language. If a language does not have a string, the English string will be returned instead.  If this parameter is omitted the string token will be returned for the strings.
 
:The [[w:List of ISO 639-1 codes|ISO639-1 language code]] for the language all tokenized strings should be returned in. Not all strings have been translated to every language. If a language does not have a string, the English string will be returned instead.  If this parameter is omitted the string token will be returned for the strings.
Line 28: Line 28:
  
 
;ISteamApps: Methods relating to Steam Apps in general.
 
;ISteamApps: Methods relating to Steam Apps in general.
:;[[/GetAppList|GetAppList]]: Full list of every publicly facing program in the store/library.
+
:;[[WebAPI/GetAppList|GetAppList]]: Full list of every publicly facing program in the store/library.
:;[[/GetServersAtAddress|GetServersAtAddress]]: Shows all steam-compatible servers related to a IPv4 Address.
+
:;[[WebAPI/GetServersAtAddress|GetServersAtAddress]]: Shows all steam-compatible servers related to a IPv4 Address.
:;[[/UpToDateCheck|UpToDateCheck]]: Check if a given app version is the most current available.
+
:;[[WebAPI/UpToDateCheck|UpToDateCheck]]: Check if a given app version is the most current available.
  
 
;ISteamEconomy: Methods relating to games' store's assets.
 
;ISteamEconomy: Methods relating to games' store's assets.
:;[[/GetAssetClassInfo|GetAssetClassInfo]]: Asset metadata
+
:;[[WebAPI/GetAssetClassInfo|GetAssetClassInfo]]: Asset metadata
:;[[/GetAssetPrices|GetAssetPrices]]: Prices of items in the economy.
+
:;[[WebAPI/GetAssetPrices|GetAssetPrices]]: Prices of items in the economy.
  
 
;ISteamNews: Methods relating to Steam News.
 
;ISteamNews: Methods relating to Steam News.
:;[[/GetNewsForApp|GetNewsForApp]]: News feed for various games
+
:;[[WebAPI/GetNewsForApp|GetNewsForApp]]: News feed for various games
  
 
;ISteamRemoteStorage: Methods relating to stored files.
 
;ISteamRemoteStorage: Methods relating to stored files.
:;[[/GetCollectionDetails|GetCollectionDetails]]:
+
:;[[WebAPI/GetCollectionDetails|GetCollectionDetails]]:
:;[[/GetPublishedFileDetails|GetPublishedFileDetails]]:
+
:;[[WebAPI/GetPublishedFileDetails|GetPublishedFileDetails]]:
:;[[/GetUGCFileDetails|GetUGCFileDetails]]: UGC file size, local filename, and URL.
+
:;[[WebAPI/GetUGCFileDetails|GetUGCFileDetails]]: UGC file size, local filename, and URL.
  
 
;ISteamUser: Methods relating to Steam users.
 
;ISteamUser: Methods relating to Steam users.
:;[[/GetFriendList|GetFriendList]]: User friend list
+
:;[[WebAPI/GetFriendList|GetFriendList]]: User friend list
:;[[/GetPlayerBans|GetPlayerBans]]: Player ban/probation status
+
:;[[WebAPI/GetPlayerBans|GetPlayerBans]]: Player ban/probation status
:;[[/GetPlayerSummaries|GetPlayerSummaries]]: User profile data
+
:;[[WebAPI/GetPlayerSummaries|GetPlayerSummaries]]: User profile data
:;[[/GetUserGroupList|GetUserGroupList]]: Lists Group ID(s) linked with 64 bit ID
+
:;[[WebAPI/GetUserGroupList|GetUserGroupList]]: Lists Group ID(s) linked with 64 bit ID
:;[[/ResolveVanityURL|ResolveVanityURL]]: Resolve vanity URL parts to a 64 bit ID.
+
:;[[WebAPI/ResolveVanityURL|ResolveVanityURL]]: Resolve vanity URL parts to a 64 bit ID.
  
 
;ISteamUserStats: Methods relating to User stats.
 
;ISteamUserStats: Methods relating to User stats.
:;[[/GetGlobalAchievementPercentagesForApp|GetGlobalAchievementPercentagesForApp]]: Statistics showing how much of the player base have unlocked various achievements.
+
:;[[WebAPI/GetGlobalAchievementPercentagesForApp|GetGlobalAchievementPercentagesForApp]]: Statistics showing how much of the player base have unlocked various achievements.
:;[[/GetGlobalStatsForGame|GetGlobalStatsForGame]]:
+
:;[[WebAPI/GetGlobalStatsForGame|GetGlobalStatsForGame]]:
:;[[/GetNumberOfCurrentPlayers|GetNumberOfCurrentPlayers]]: Returns the current number of players for an app.
+
:;[[WebAPI/GetNumberOfCurrentPlayers|GetNumberOfCurrentPlayers]]: Returns the current number of players for an app.
:;[[/GetPlayerAchievements|GetPlayerAchievements]]: Game achievements
+
:;[[WebAPI/GetPlayerAchievements|GetPlayerAchievements]]: Game achievements
:;[[/GetSchemaForGame|GetSchemaForGame]]:
+
:;[[WebAPI/GetSchemaForGame|GetSchemaForGame]]:
:;[[/GetUserStatsForGame|GetUserStatsForGame]]:
+
:;[[WebAPI/GetUserStatsForGame|GetUserStatsForGame]]:
  
 
;IPlayerService: Methods relating to a Steam user's games.
 
;IPlayerService: Methods relating to a Steam user's games.
:;[[/GetRecentlyPlayedGames|GetRecentlyPlayedGames]]:
+
:;[[WebAPI/GetRecentlyPlayedGames|GetRecentlyPlayedGames]]:
:;[[/GetOwnedGames|GetOwnedGames]]:
+
:;[[WebAPI/GetOwnedGames|GetOwnedGames]]:
:;[[/GetSteamLevel|GetSteamLevel]]:
+
:;[[WebAPI/GetSteamLevel|GetSteamLevel]]:
:;[[/GetBadges|GetBadges]]:
+
:;[[WebAPI/GetBadges|GetBadges]]:
:;[[/GetCommunityBadgeProgress|GetCommunityBadgeProgress]]:
+
:;[[WebAPI/GetCommunityBadgeProgress|GetCommunityBadgeProgress]]:
  
 
;ISteamWebAPIUtil: Methods relating to the WebAPI itself.
 
;ISteamWebAPIUtil: Methods relating to the WebAPI itself.
:;[[/GetServerInfo|GetServerInfo]]: Returns WebAPI server time & checks server status.
+
:;[[WebAPI/GetServerInfo|GetServerInfo]]: Returns WebAPI server time & checks server status.
:;[[/GetSupportedAPIList|GetSupportedAPIList]]: Lists all available WebAPI interfaces.
+
:;[[WebAPI/GetSupportedAPIList|GetSupportedAPIList]]: Lists all available WebAPI interfaces.
  
 
=== Game specific interfaces ===
 
=== Game specific interfaces ===
 
==== Generic ====
 
==== Generic ====
 
;IEconItems_<ID>: Methods relating to in-game items for supported games.
 
;IEconItems_<ID>: Methods relating to in-game items for supported games.
:;[[/GetPlayerItems|GetPlayerItems]]: Lists items in a player's backpack.
+
:;[[WebAPI/GetPlayerItems|GetPlayerItems]]: Lists items in a player's backpack.
:;[[/GetSchema|GetSchema]]: Information about the items in a supporting game.
+
:;[[WebAPI/GetSchema|GetSchema]]: Information about the items in a supporting game.
:;[[/GetSchemaURL|GetSchemaURL]]: Returns a URL for the games' item_game.txt file.
+
:;[[WebAPI/GetSchemaURL|GetSchemaURL]]: Returns a URL for the games' item_game.txt file.
:;[[/GetStoreMetadata|GetStoreMetadata]]: Information about the game's store.
+
:;[[WebAPI/GetStoreMetadata|GetStoreMetadata]]: Information about the game's store.
:;[[/GetStoreStatus|GetStoreStatus]]: The game's store status.
+
:;[[WebAPI/GetStoreStatus|GetStoreStatus]]: The game's store status.
  
 
;IGCVersion_<ID>: TODO.
 
;IGCVersion_<ID>: TODO.
:;[[/GetClientVersion|GetClientVersion]]: TODO
+
:;[[WebAPI/GetClientVersion|GetClientVersion]]: TODO
:;[[/GetClusterVersion|GetClusterVersion]]: TODO
+
:;[[WebAPI/GetClusterVersion|GetClusterVersion]]: TODO
:;[[/GetServerVersion|GetServerVersion]]: TODO
+
:;[[WebAPI/GetServerVersion|GetServerVersion]]: TODO
  
 
;ITFPromos_<ID>: TODO.
 
;ITFPromos_<ID>: TODO.
:;[[/GetItemID|GetItemID]]: TODO
+
:;[[WebAPI/GetItemID|GetItemID]]: TODO
:;[[/GrantItem|GrantItem]]: TODO
+
:;[[WebAPI/GrantItem|GrantItem]]: TODO
  
 
==== Dota 2 ====
 
==== Dota 2 ====
 
;IDOTA2Match_<ID>: Methods relating to Dota 2 matches.
 
;IDOTA2Match_<ID>: Methods relating to Dota 2 matches.
:;[[/GetLeagueListing|GetLeagueListing]]: Information about DotaTV-supported leagues.
+
:;[[WebAPI/GetLeagueListing|GetLeagueListing]]: Information about DotaTV-supported leagues.
:;[[/GetLiveLeagueGames|GetLiveLeagueGames]]: A list of in-progress league matches, as well as details of that match as it unfolds.
+
:;[[WebAPI/GetLiveLeagueGames|GetLiveLeagueGames]]: A list of in-progress league matches, as well as details of that match as it unfolds.
:;[[/GetMatchDetails|GetMatchDetails]]: Information about a particular match.
+
:;[[WebAPI/GetMatchDetails|GetMatchDetails]]: Information about a particular match.
:;[[/GetMatchHistory|GetMatchHistory]]: A list of matches, filterable by various parameters.
+
:;[[WebAPI/GetMatchHistory|GetMatchHistory]]: A list of matches, filterable by various parameters.
:;[[/GetMatchHistoryBySequenceNum|GetMatchHistoryBySequenceNum]]: A list of matches ordered by their sequence num.
+
:;[[WebAPI/GetMatchHistoryBySequenceNum|GetMatchHistoryBySequenceNum]]: A list of matches ordered by their sequence num.
:;[[/GetScheduledLeagueGames|GetScheduledLeagueGames]]: A list of scheduled league games coming up.
+
:;[[WebAPI/GetScheduledLeagueGames|GetScheduledLeagueGames]]: A list of scheduled league games coming up.
:;[[/GetTeamInfoByTeamID|GetTeamInfoByTeamID]]: A list of all the teams set up in-game.
+
:;[[WebAPI/GetTeamInfoByTeamID|GetTeamInfoByTeamID]]: A list of all the teams set up in-game.
:;[[/GetTournamentPlayerStats|GetTournamentPlayerStats]]: Stats about a particular player within a tournament.
+
:;[[WebAPI/GetTournamentPlayerStats|GetTournamentPlayerStats]]: Stats about a particular player within a tournament.
:;[[/GetTopLiveGame|GetTopLiveGame]]: TODO
+
:;[[WebAPI/GetTopLiveGame|GetTopLiveGame]]: TODO
  
 
;IEconDOTA2_<ID>: Methods relating to the Dota2 economy.
 
;IEconDOTA2_<ID>: Methods relating to the Dota2 economy.
:;[[/GetGameItems|GetGameItems]]: Dota 2 In-game items
+
:;[[WebAPI/GetGameItems|GetGameItems]]: Dota 2 In-game items
:;[[/GetItemIconPath|GetItemIconPath]]: TODO
+
:;[[WebAPI/GetItemIconPath|GetItemIconPath]]: TODO
:;[[/GetHeroes|GetHeroes]]: A list of heroes within Dota 2.
+
:;[[WebAPI/GetHeroes|GetHeroes]]: A list of heroes within Dota 2.
:;[[/GetRarities|GetRarities]]: Dota 2 item rarity list.
+
:;[[WebAPI/GetRarities|GetRarities]]: Dota 2 item rarity list.
:;[[/GetTournamentPrizePool|GetTournamentPrizePool]]: The current prizepool for specific tournaments.
+
:;[[WebAPI/GetTournamentPrizePool|GetTournamentPrizePool]]: The current prizepool for specific tournaments.
:;[[/GetEventStatsForAccount|GetEventStatsForAccount]]: TODO
+
:;[[WebAPI/GetEventStatsForAccount|GetEventStatsForAccount]]: TODO
  
 
;IDOTA2MatchStats_<ID>: TODO.
 
;IDOTA2MatchStats_<ID>: TODO.
:;[[/GetRealtimeStats|GetRealtimeStats]]: TODO
+
:;[[WebAPI/GetRealtimeStats|GetRealtimeStats]]: TODO
  
 
;IDOTA2Fantasy_<ID>: Methods relating to the Dota 2 fantasy team system.
 
;IDOTA2Fantasy_<ID>: Methods relating to the Dota 2 fantasy team system.
:;[[/GetFantasyPlayerStats|GetFantasyPlayerStats]]: TODO
+
:;[[WebAPI/GetFantasyPlayerStats|GetFantasyPlayerStats]]: TODO
:;[[/GetPlayerOfficialInfo|GetPlayerOfficialInfo]]: TODO
+
:;[[WebAPI/GetPlayerOfficialInfo|GetPlayerOfficialInfo]]: TODO
  
 
;IDOTA2StreamSystem_<ID>: Methods relating to the Dota 2 streaming system.
 
;IDOTA2StreamSystem_<ID>: Methods relating to the Dota 2 streaming system.
:;[[/GetBroadcasterInfo|GetBroadcasterInfo]]: TODO
+
:;[[WebAPI/GetBroadcasterInfo|GetBroadcasterInfo]]: TODO
  
 
;IDOTA2Teams_<ID>: Methods relating to Dota 2 teams.
 
;IDOTA2Teams_<ID>: Methods relating to Dota 2 teams.
:;[[/GetTeamInfo|GetTeamInfo]]: TODO
+
:;[[WebAPI/GetTeamInfo|GetTeamInfo]]: TODO
  
 
;IDOTA2AutomatedTourney_<ID>: TODO
 
;IDOTA2AutomatedTourney_<ID>: TODO
:;[[/GetActiveTournamentList|GetActiveTournamentList]]: TODO
+
:;[[WebAPI/GetActiveTournamentList|GetActiveTournamentList]]: TODO
  
 
;IDOTA2Ticket_<ID>: TODO
 
;IDOTA2Ticket_<ID>: TODO
:;[[/SetSteamAccountPurchased|SetSteamAccountPurchased]]: TODO
+
:;[[WebAPI/SetSteamAccountPurchased|SetSteamAccountPurchased]]: TODO
:;[[/SteamAccountValidForEvent|SteamAccountValidForEvent]]: TODO
+
:;[[WebAPI/SteamAccountValidForEvent|SteamAccountValidForEvent]]: TODO
  
 
==== Portal 2 ====
 
==== Portal 2 ====
 
;IPortal2Leaderboards_<ID>: Methods relating to Portal 2 Leaderboards.
 
;IPortal2Leaderboards_<ID>: Methods relating to Portal 2 Leaderboards.
:;[[/GetBucketizedData|GetBucketizedData]]: TODO
+
:;[[WebAPI/GetBucketizedData|GetBucketizedData]]: TODO
  
 
=== Other undocumented interfaces ===
 
=== Other undocumented interfaces ===
Line 143: Line 143:
  
 
{{anchor|appids}}
 
{{anchor|appids}}
''For a complete list, see [[/GetAppList|GetAppList]].''
+
''For a complete list, see [[WebAPI/GetAppList|GetAppList]].''
 
;240: Counter-Strike: Source
 
;240: Counter-Strike: Source
 
;260: Counter-Strike: Source Beta
 
;260: Counter-Strike: Source Beta
Line 157: Line 157:
  
 
=== Methods Requiring a 64-bit User ID ===
 
=== Methods Requiring a 64-bit User ID ===
Most API requests that take an ID parameter require a 64 bit ID, if one is not readily available a vanity URL part can be resolved via [[/ResolveVanityURL|ResolveVanityURL]].
+
Most API requests that take an ID parameter require a 64 bit ID, if one is not readily available a vanity URL part can be resolved via [[WebAPI/ResolveVanityURL|ResolveVanityURL]].
  
 
== Implementations ==
 
== Implementations ==
Line 163: Line 163:
 
* [https://github.com/koraktor/steam-condenser Steam Condenser] Ruby, PHP, and Java library.
 
* [https://github.com/koraktor/steam-condenser Steam Condenser] Ruby, PHP, and Java library.
 
* [https://github.com/Lagg/steamodd Steamodd] Python library, used by OPTF2.
 
* [https://github.com/Lagg/steamodd Steamodd] Python library, used by OPTF2.
* [[/Implementations|More]]
+
* [[WebAPI/Implementations|More]]
  
 
== See also ==
 
== See also ==

Latest revision as of 19:40, 3 June 2023

Contributing

If you would like to help in writing API documentation there is a tool available here (requires python) that can generate skeleton documentation pages that match the style guidelines and can be easily copied and pasted.

Otherwise be sure to follow the existing structure and format of the documentation to keep things consistent.

Common elements

Parameters

Most WebAPI methods take the following arguments in their URL:

key
Your Steam Web API key. Without this, the server will return an HTTP 403 (forbidden) error. A key can be generated here.
format (Optional)
The file format to return output in.
json (default)
The JavaScript Object Notation format
xml
Standard XML
vdf
Valve Data Format
language (Optional)
The ISO639-1 language code for the language all tokenized strings should be returned in. Not all strings have been translated to every language. If a language does not have a string, the English string will be returned instead. If this parameter is omitted the string token will be returned for the strings.

Terminology

A "tokenized string" refers to a string containing "#"-prefixed tokens that are replaced with the equivalent string in the game's VDF for the chosen language. For instance, "TF_Weapon_Jar" is defined as "Jar Based Karate" in tf/resource/tf_english.txt (as found in "team fortress 2 content.gcf").

Methods

General interfaces

ISteamApps
Methods relating to Steam Apps in general.
GetAppList
Full list of every publicly facing program in the store/library.
GetServersAtAddress
Shows all steam-compatible servers related to a IPv4 Address.
UpToDateCheck
Check if a given app version is the most current available.
ISteamEconomy
Methods relating to games' store's assets.
GetAssetClassInfo
Asset metadata
GetAssetPrices
Prices of items in the economy.
ISteamNews
Methods relating to Steam News.
GetNewsForApp
News feed for various games
ISteamRemoteStorage
Methods relating to stored files.
GetCollectionDetails
GetPublishedFileDetails
GetUGCFileDetails
UGC file size, local filename, and URL.
ISteamUser
Methods relating to Steam users.
GetFriendList
User friend list
GetPlayerBans
Player ban/probation status
GetPlayerSummaries
User profile data
GetUserGroupList
Lists Group ID(s) linked with 64 bit ID
ResolveVanityURL
Resolve vanity URL parts to a 64 bit ID.
ISteamUserStats
Methods relating to User stats.
GetGlobalAchievementPercentagesForApp
Statistics showing how much of the player base have unlocked various achievements.
GetGlobalStatsForGame
GetNumberOfCurrentPlayers
Returns the current number of players for an app.
GetPlayerAchievements
Game achievements
GetSchemaForGame
GetUserStatsForGame
IPlayerService
Methods relating to a Steam user's games.
GetRecentlyPlayedGames
GetOwnedGames
GetSteamLevel
GetBadges
GetCommunityBadgeProgress
ISteamWebAPIUtil
Methods relating to the WebAPI itself.
GetServerInfo
Returns WebAPI server time & checks server status.
GetSupportedAPIList
Lists all available WebAPI interfaces.

Game specific interfaces

Generic

IEconItems_<ID>
Methods relating to in-game items for supported games.
GetPlayerItems
Lists items in a player's backpack.
GetSchema
Information about the items in a supporting game.
GetSchemaURL
Returns a URL for the games' item_game.txt file.
GetStoreMetadata
Information about the game's store.
GetStoreStatus
The game's store status.
IGCVersion_<ID>
TODO.
GetClientVersion
TODO
GetClusterVersion
TODO
GetServerVersion
TODO
ITFPromos_<ID>
TODO.
GetItemID
TODO
GrantItem
TODO

Dota 2

IDOTA2Match_<ID>
Methods relating to Dota 2 matches.
GetLeagueListing
Information about DotaTV-supported leagues.
GetLiveLeagueGames
A list of in-progress league matches, as well as details of that match as it unfolds.
GetMatchDetails
Information about a particular match.
GetMatchHistory
A list of matches, filterable by various parameters.
GetMatchHistoryBySequenceNum
A list of matches ordered by their sequence num.
GetScheduledLeagueGames
A list of scheduled league games coming up.
GetTeamInfoByTeamID
A list of all the teams set up in-game.
GetTournamentPlayerStats
Stats about a particular player within a tournament.
GetTopLiveGame
TODO
IEconDOTA2_<ID>
Methods relating to the Dota2 economy.
GetGameItems
Dota 2 In-game items
GetItemIconPath
TODO
GetHeroes
A list of heroes within Dota 2.
GetRarities
Dota 2 item rarity list.
GetTournamentPrizePool
The current prizepool for specific tournaments.
GetEventStatsForAccount
TODO
IDOTA2MatchStats_<ID>
TODO.
GetRealtimeStats
TODO
IDOTA2Fantasy_<ID>
Methods relating to the Dota 2 fantasy team system.
GetFantasyPlayerStats
TODO
GetPlayerOfficialInfo
TODO
IDOTA2StreamSystem_<ID>
Methods relating to the Dota 2 streaming system.
GetBroadcasterInfo
TODO
IDOTA2Teams_<ID>
Methods relating to Dota 2 teams.
GetTeamInfo
TODO
IDOTA2AutomatedTourney_<ID>
TODO
GetActiveTournamentList
TODO
IDOTA2Ticket_<ID>
TODO
SetSteamAccountPurchased
TODO
SteamAccountValidForEvent
TODO

Portal 2

IPortal2Leaderboards_<ID>
Methods relating to Portal 2 Leaderboards.
GetBucketizedData
TODO

Other undocumented interfaces

ISteamGameServerAccount
TODO
ISteamOAuth2
TODO
ISteamUserAuth
TODO
ISteamWebUserPresenceOAuth
TODO

Notes

List of IDs

For a complete list, see GetAppList.

240
Counter-Strike: Source
260
Counter-Strike: Source Beta
440
Team Fortress 2
520
Team Fortress 2 Beta
570
Dota 2
620
Portal 2
710
Counter-Strike: Global Offensive Beta Dev
730
Counter-Strike: Global Offensive
816
Dota 2 Private Beta
841
Portal 2 Beta
205790
Dota 2 (Beta) Test

Methods Requiring a 64-bit User ID

Most API requests that take an ID parameter require a 64 bit ID, if one is not readily available a vanity URL part can be resolved via ResolveVanityURL.

Implementations

See also

  • Feedback for requests, suggestions, and issues.