Steamworks Documentation
Error Codes & Responses

Response Formats

Every method in the Steamworks Web API is able to return responses in multiple formats. By default, all responses are returned JSON encoded. However, each request can optionally contain a format parameter to specify one of the following response formats.

Example:
http://api.steampowered.com/ISteamNews/GetNewsForApp/v0002/?appid=440&count=1&format=xml

The following values can be passed for this parameter:
  • JSON

    • The API always 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.
    • Null is represented as JSON's null.
    • 64 bit numbers are returned as a string.
    • Example:
      { "appnews": { "appid": 440, "newsitems": [ { "gid": "1904306376092568991", "title": "Prince of Prolander Event ", "url": "http://store.steampowered.com/news/externalpost/tf2_blog/1904306376092568991", "is_external_url": true, "author": "", "contents": "<a href=/"http://rgl.gg/default.aspx/"><img src=/"https://steamcdn-a.akamaihd.net/steam/news/29555/prince.png?t=1495219023/"></a><br><br>/n<p><b>This Sunday at 4:30pm EST</b> <a href=/"http://rgl.gg/default.aspx/" target=\"_blank\">RGL.gg</a> is hosting their Prince of Prolander event. See legendary players <a href=/"https://www.youtube.com/user/stabbyvideo/" target=\"_blank\">Stabby</a> and <a href=/"https://www.youtube.com/user/danethebrain/" target=\"_blank\">Uncle Dane</a> duke it out to answer the age old question: Who is better? Spies or Engies? Come see them settle the score once and for all in the new competitive TF2 format, Pick/Ban Prolander. Be sure to tune in to <a href=/"https://www.twitch.tv/extvesports/" target=\"_blank\">Twitch</a> this Sunday, and witness this historic event!</p><br>", "feedlabel": "TF2 Blog", "date": 1495218420, "feedname": "tf2_blog", "feed_type": 0, "appid": 440 } ], "count": 2385 } }
  • XML

    • 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.
    • Example:
      <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE appnews> <appnews> <appid>440</appid> <newsitems> <newsitem> <gid>1904306376092568991</gid> <title>Prince of Prolander Event </title> <url>http://store.steampowered.com/news/externalpost/tf2_blog/1904306376092568991</url> <is_external_url>true</is_external_url> <author/> <contents>&lt;a href="http://rgl.gg/default.aspx"&gt;&lt;img src="https://steamcdn-a.akamaihd.net/steam/news/29555/prince.png?t=1495219023"&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt; &lt;p&gt;&lt;b&gt;This Sunday at 4:30pm EST&lt;/b&gt; &lt;a href="http://rgl.gg/default.aspx" target="_blank"&gt;RGL.gg&lt;/a&gt; is hosting their Prince of Prolander event. See legendary players &lt;a href="https://www.youtube.com/user/stabbyvideo" target="_blank"&gt;Stabby&lt;/a&gt; and &lt;a href="https://www.youtube.com/user/danethebrain" target="_blank"&gt;Uncle Dane&lt;/a&gt; duke it out to answer the age old question: Who is better? Spies or Engies? Come see them settle the score once and for all in the new competitive TF2 format, Pick/Ban Prolander. Be sure to tune in to &lt;a href="https://www.twitch.tv/extvesports" target="_blank"&gt;Twitch&lt;/a&gt; this Sunday, and witness this historic event!&lt;/p&gt;&lt;br&gt;</contents> <feedlabel>TF2 Blog</feedlabel> <date>1495218420</date> <feedname>tf2_blog</feedname> <feed_type>0</feed_type> <appid>440</appid> </newsitem> </newsitems> <count>2385</count> </appnews>
  • VDF (Valve Data Format)

    • This is Valve's internal data format as used in the Source Engine games. TF2's GetSchema returns data similar to "items/items_game.txt" (although qualities are not expanded into objects with a "value" field).
    • Documentation is available on the Valve Developer Community wiki and on the Official Team Fortress 2 wiki.
    • 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.
    • Example:
      "appnews" { "appid" "440" "newsitems" { "0" { "gid" "1904306376092568991" "title" "Prince of Prolander Event " "url" "http://store.steampowered.com/news/externalpost/tf2_blog/1904306376092568991" "is_external_url" "1" "author" "" "contents" "<a href=/"http://rgl.gg/default.aspx/"><img src=/"https://steamcdn-a.akamaihd.net/steam/news/29555/prince.png?t=1495219023/"></a><br><br> <p><b>This Sunday at 4:30pm EST</b> <a href=/"http://rgl.gg/default.aspx/" target=\"_blank\">RGL.gg</a> is hosting their Prince of Prolander event. See legendary players <a href=/"https://www.youtube.com/user/stabbyvideo/" target=\"_blank\">Stabby</a> and <a href=/"https://www.youtube.com/user/danethebrain/" target=\"_blank\">Uncle Dane</a> duke it out to answer the age old question: Who is better? Spies or Engies? Come see them settle the score once and for all in the new competitive TF2 format, Pick/Ban Prolander. Be sure to tune in to <a href=/"https://www.twitch.tv/extvesports/" target=\"_blank\">Twitch</a> this Sunday, and witness this historic event!</p><br>" "feedlabel" "TF2 Blog" "date" "1495218420" "feedname" "tf2_blog" "feed_type" "0" "appid" "440" } } "count" "2385" }

A flexible solution should be used to parse Web API results as each method may return results in an arbitrary order.

HTTP Status Codes

The Steamworks Web API attempts to return appropriate HTTP status codes when possible.

Some of the common ones are:
CodeTextDescription
200OKSuccess!
400Bad RequestPlease verify that all required parameters are being sent.
401UnauthorizedAccess is denied. Retrying will not help. Please verify your key= parameter.
403ForbiddenAccess is denied. Retrying will not help. Please verify your key= parameter.
404Not FoundThe API requested does not exists.
405Method Not AllowedThis API has been called with a the wrong HTTP method like GET or PUSH.
429Too Many RequestsYou are being rate limited.
500Internal Server ErrorAn unrecoverable error has occurred, please try again. If this continues to persist then please post to the Steamworks developer discussion with additional details of your request.
503Service UnavailableServer is temporarily unavailable, or too busy to respond. Please wait and try again later.