API Directory › 🎮 Games › Steam Web API
API KeyHTTPS

Steam Web API

Access Steam player stats, achievements, game data and the store.

Category
Auth
API Key
HTTPS
Yes
CORS
Unknown
Open Steam Web API docs ↗

What it does

The Steam Web API exposes public Steam data: a user’s owned games and playtime, achievements and stats, friend lists, the store app list, player counts, and news for any app. It’s a set of REST-ish endpoints grouped into interfaces like ISteamUser and IPlayerService.

Base URL

https://api.steampowered.com

Authentication

Get a key instantly at steamcommunity.com/dev/apikey (you need a Steam account with a small amount of spend). Pass it as key. User data is only returned when that user’s profile and game details are set to public. Steam IDs are 64-bit — resolve vanity URLs with ISteamUser/ResolveVanityURL.

Code examples

curl
curl "https://api.steampowered.com/IPlayerService/GetOwnedGames/v1/?key=YOUR_KEY&steamid=76561197960434622&include_appinfo=1&format=json"
Python
import requests

r = requests.get(
    "https://api.steampowered.com/IPlayerService/GetOwnedGames/v1/",
    params={
        "key": "YOUR_KEY",
        "steamid": "76561197960434622",
        "include_appinfo": 1,
        "format": "json",
    },
    timeout=10,
)
games = r.json()["response"]["games"]
top = sorted(games, key=lambda g: g["playtime_forever"], reverse=True)[:5]
for g in top:
    print(g["name"], round(g["playtime_forever"] / 60, 1), "h")
JavaScript
const p = new URLSearchParams({
  key: "YOUR_KEY",
  steamid: "76561197960434622",
  include_appinfo: "1",
  format: "json",
});
const res = await fetch(
  `https://api.steampowered.com/IPlayerService/GetOwnedGames/v1/?${p}`
);
const { response } = await res.json();
console.log(response.games.length, "games");

Rate limits & quotas

Steam allows roughly 100,000 calls per day per key. There is no published per-second limit, but bursts will get you temporary 429s or 403s — keep it to a few requests per second and cache app lists and profile data. The store API (store.steampowered.com/api) is separate, undocumented and more aggressively throttled.

Key response fields

response.game_countNumber of owned games (public profiles only)
response.games[].appidSteam app ID — use for store links and images
response.games[].nameOnly present when include_appinfo=1
response.games[].playtime_foreverTotal minutes played
response.games[].playtime_2weeksMinutes in the last 2 weeks (omitted if zero)
response.games[].img_icon_urlHash for media.steampowered.com/steamcommunity/public/images/apps/{appid}/{hash}.jpg

Common errors

401 / 403Bad key, or the target profile / game details are private.
429Too many requests — slow down and cache.
500Steam’s side. Retry with backoff; Steam has occasional outages.

When to use it (and alternatives)

Use the Steam Web API for anything tied to a Steam account or app — playtime trackers, achievement showcases, “what are my friends playing” tools. For richer game metadata (genres, screenshots, reviews) combine it with IGDB or RAWG. For pricing and deals across stores, use a deals API rather than scraping the store endpoint.

FAQ

Do I need a paid Steam account for an API key?

You need an account that has spent at least about $5 on Steam (the same requirement that unlocks the Market and other features). The key itself is free.

Why is GetOwnedGames returning an empty response?

The user’s Game details privacy setting is not Public. Steam only returns owned games and playtime for public profiles.

What is the Steam ID format?

The API uses the 64-bit SteamID64 (a 17-digit number). Convert a vanity URL name with ISteamUser/ResolveVanityURL/v1/.

New to APIs?

Short guides for working with this API — and any other.

🛠️ Handy LarzOS tools

Free tools to help you work with this API.

JSON Formatter

Related Games APIs

← Back

More Games APIs · All 196 APIs