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
| Field | Type | Description |
|---|---|---|
appid | number | The Steam application ID of the game |
name | string | The name of the game |
playtime_forever | number | Total playtime in minutes |
playtime_2weeks | number | Playtime in the last 2 weeks in minutes (only present if played recently) |
img_icon_url | string | Hash for constructing the game icon URL |
has_community_visible_stats | boolean | Whether the game has visible community stats |
playtime_windows_forever | number | Total playtime on Windows in minutes |
playtime_mac_forever | number | Total playtime on Mac in minutes |
playtime_linux_forever | number | Total playtime on Linux in minutes |
playtime_deck_forever | number | Total playtime on Steam Deck in minutes |
rtime_last_played | number | Unix 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
}
]
}