Steam

Games

Get a list of games owned by a Steam user including playtime statistics and extended app info.

Endpoint

This endpoint returns a list of games owned by the specified user, including playtime statistics and extended application information. The user's game library must be set to public for this endpoint to return data.

GET   /v2/steam/users/{steamid}/games

Required parameters

steamid
string
The Steam ID of the user whose game library you want to fetch. Accepts various Steam ID formats.

Authentication

Include your API key as the x-api-key request header.

x-api-key: YourSecretAPIKey

Response fields

The response is an array of game objects.

Game object

FieldTypeDescription
appidnumberThe Steam application ID of the game
namestringThe name of the game
playtime_forevernumberTotal playtime in minutes
playtime_2weeksnumberPlaytime in the last 2 weeks in minutes (only present if played recently)
img_icon_urlstringHash for constructing the game icon URL
has_community_visible_statsbooleanWhether the game has visible community stats
playtime_windows_forevernumberTotal playtime on Windows in minutes
playtime_mac_forevernumberTotal playtime on Mac in minutes
playtime_linux_forevernumberTotal playtime on Linux in minutes
playtime_deck_forevernumberTotal playtime on Steam Deck in minutes
rtime_last_playednumberUnix timestamp of when the game was last played

The img_icon_url field contains a hash, not a full URL. To get the actual icon image, combine it with the appid using this pattern:

https://media.steampowered.com/steamcommunity/public/images/apps/{appid}/{img_icon_url}.jpg

For example, using the Counter-Strike 2 data from the response below:

https://media.steampowered.com/steamcommunity/public/images/apps/730/8dbc71957312bbd3baea65848b545be9eae2a355.jpg

Response example

Example output for this endpoint. For brevity's sake, some games were omitted.

response.json
{
  "success": true,
  "result": [
    {
      "appid": 730,
      "name": "Counter-Strike 2",
      "playtime_forever": 134068,
      "img_icon_url": "8dbc71957312bbd3baea65848b545be9eae2a355",
      "has_community_visible_stats": true,
      "playtime_windows_forever": 134068,
      "playtime_mac_forever": 0,
      "playtime_linux_forever": 0,
      "playtime_deck_forever": 0,
      "rtime_last_played": 1706000000
    },
    {
      "appid": 570,
      "name": "Dota 2",
      "playtime_forever": 2708,
      "playtime_2weeks": 120,
      "img_icon_url": "0bbb630d63262dd66d2fdd0f7d37e8661a410075",
      "has_community_visible_stats": true,
      "playtime_windows_forever": 2708,
      "playtime_mac_forever": 0,
      "playtime_linux_forever": 0,
      "playtime_deck_forever": 0,
      "rtime_last_played": 1706100000
    }
  ]
}