Steam Web API

From Valve Developer Community
Revision as of 01:10, 3 July 2010 by Alph Tech STUART (talk | contribs) (Formats)

Jump to: navigation, search


Every method can return its results in 3 different formats: JSON, XML, and VDF. Each format represents the data described herein differently:


  • The API returns an object containing the named object with the result data.
  • Arrays are represented as an array with the name of the type of the objects in the array (ie. an object named "items" containing an array of objects of type "item" would be represented as an object named "items" containing an array named "item" containing several objects following the "item" structure).
  • Null is represented as JSON's null.


  • XML Attributes are not used.
  • Arrays are represented as a series of sub-elements in the containing element of the type of the array.
  • Null is represented by the word "null" between the element's tags.

VDF (Valve Data Format)

  • This is Valve's internal data format, as seen in uses like TF2's "scripts" folder (available in "team fortress 2 client content.gcf"). TF2's GetSchema returns data similar to "items/items_game.txt" (although qualities are not expanded into objects with a "value" field).
  • It appears to be undocumented, but it works similarly to JSON's objects:
    • A member is represented by a quoted string, followed by a newline and an open brace.
    • A value is represented as a key-value pair of quoted strings on the same line separated by a tab character. Each sub-object is indented by one tab character.
  • Arrays in the data are represented as a VDF array with the name of the type of the objects in the array, with a VDF array being an object with each item being prefixed with its numeric key as a quoted string.
  • Null is represented as an empty string.

If no format is specified, the API will default to JSON.

Game interfaces and methods

Team Fortress 2 functions are described at

Other interfaces and methods

GetNewsForApp (v0001)

GetNewsForApp returns the latest of a game specified by its appID.

Example URL:


  • appid
    • AppID of the game you want the news of.
  • count
    • How many news enties you want to get returned.
  • maxlength
    • Maximum length of each news entry.

Result layout

An appnews object containing:

GetGlobalAchievementPercentagesForApp (v0001)

Returns on global achievements overview of a specific game in percentages.



  • gameid
    • AppID of the game you want the news of.