GAMING STATS API · 3.8.3

Steam API

Overview

Base path: /steam Read cached Steam profile, API-visible library, playtime, catalog facts and artwork, recent activity, badges/XP, achievements, global rarity, game-specific stats, and current-player observations for the configured owner. Website requests never call Steam or trigger refreshes. All examples below are illustrative, not live account data.

Authentication

Every data endpoint requires X-API-Key from the website server or another trusted backend. Never put API_KEYS or STEAM_WEB_API_KEY in browser JavaScript. Documentation is public. Missing or invalid read keys return HTTP 401. Data responses use Cache-Control: private, no-store. No HTTP refresh, credential, or account-selection endpoint exists.

Requests

GET /steam/profile — public profile fields, all avatar sizes, persona state, Steam level, and current game when visible GET /steam/library — owned/free-subscription games, playtime, capabilities, catalog facts, and artwork GET /steam/recent — games and playtime reported for Steam's recent two-week window GET /steam/badges — Steam level/XP, owned badges, and Community badge quests GET /steam/games/:appId — one owned game plus achievement schema/state, global rarity, title stats, and current players Use the numeric appId/providerGameId from the library. No request body or pagination parameter is accepted.

Request example

Set API_BASE_URL to the deployment origin. STEAM_API_KEY is one of this service's API_KEYS read keys, not the Steam Web API key.

curl --fail-with-body "$API_BASE_URL/steam/library" \
  -H "X-API-Key: $STEAM_API_KEY"

Profile response

communityVisibility is public, private, or unknown. personaState maps Steam's public state enum. currentGame is null unless Steam reports an active game. Private profiles can omit optional fields. Steam ID remains a string so 64-bit precision is never lost.

{
  "schemaVersion": 1,
  "provider": "steam",
  "accountRef": "owner",
  "status": "ready",
  "stale": false,
  "lastAttemptAt": "2026-09-16T12:00:00.000Z",
  "lastSuccessAt": "2026-09-16T12:00:00.000Z",
  "nextRefreshAt": "2026-09-16T12:15:00.000Z",
  "steamId": "76561198000000000",
  "personaName": "Example Player",
  "profileUrl": "https://steamcommunity.com/profiles/76561198000000000/",
  "avatarUrl": null,
  "avatarUrls": {
    "small": null,
    "medium": null,
    "full": null
  },
  "avatarHash": null,
  "communityVisibility": "public",
  "communityVisibilityCode": 3,
  "profileState": 1,
  "commentPermission": 1,
  "personaState": "online",
  "personaStateCode": 1,
  "personaStateFlags": 0,
  "lastLogoffAt": null,
  "createdAt": null,
  "countryCode": null,
  "steamLevel": 42,
  "currentGame": {
    "providerGameId": "570",
    "appId": 570,
    "name": "Example Game"
  }
}

Library response

This is Steam's API-visible owned-game list with played free games and free subscriptions included. Privacy settings can hide the list. Game rows retain source playtime splits, Steam Deck/disconnected time, capability flags, content descriptors, catalog facts, reviews and platform compatibility. artwork includes Steam's icon/background and 1×/2× small, main, header, hero, library-capsule and library-hero variants when published. originalArtwork retains the non-override set when Steam is serving temporary artwork. screenshots separates all-ages and mature-content lists. coverUrl remains the best 600×900 library capsule for compatibility. Missing source values remain null or empty arrays.

{
  "schemaVersion": 1,
  "provider": "steam",
  "accountRef": "owner",
  "status": "ready",
  "stale": false,
  "lastAttemptAt": "2026-09-16T12:00:00.000Z",
  "lastSuccessAt": "2026-09-16T12:00:00.000Z",
  "nextRefreshAt": "2026-09-16T12:15:00.000Z",
  "coverage": {
    "kind": "owned-games",
    "complete": true,
    "includePlayedFreeGames": true,
    "includeFreeSubscriptions": true,
    "privacyDependent": true
  },
  "totals": {
    "gameCount": 1,
    "playedGameCount": 1,
    "totalPlaytimeMinutes": 600,
    "windowsPlaytimeMinutes": 500,
    "macPlaytimeMinutes": 0,
    "linuxPlaytimeMinutes": 100,
    "deckPlaytimeMinutes": 10,
    "disconnectedPlaytimeMinutes": 0,
    "gamesWithCommunityStats": 1
  },
  "games": [
    {
      "providerGameId": "570",
      "appId": 570,
      "name": "Example Game",
      "playtimeMinutes": 600,
      "playtimeTwoWeeksMinutes": 30,
      "playtimeWindowsMinutes": 500,
      "playtimeMacMinutes": 0,
      "playtimeLinuxMinutes": 100,
      "playtimeDeckMinutes": 10,
      "playtimeDisconnectedMinutes": null,
      "lastPlayedAt": "2026-09-15T12:00:00.000Z",
      "hasCommunityVisibleStats": true,
      "hasWorkshop": true,
      "hasMarket": true,
      "hasDlc": true,
      "hasLeaderboards": false,
      "contentDescriptorIds": [],
      "capsuleFilename": null,
      "iconUrl": "https://media.steampowered.com/steamcommunity/public/images/apps/570/example.jpg",
      "coverUrl": "https://shared.fastly.steamstatic.com/store_item_assets/steam/apps/570/library_600x900_2x.jpg",
      "store": {
        "visible": true,
        "unlisted": false,
        "itemType": 0,
        "type": 0,
        "isFree": false,
        "urlPath": "app/570/example_game",
        "urlSlug": "example_game",
        "url": "https://store.steampowered.com/app/570/example_game",
        "shortDescription": "An example store description.",
        "developers": [
          {
            "name": "Example Studio",
            "creatorClanAccountId": 123
          }
        ],
        "publishers": [
          {
            "name": "Example Publisher",
            "creatorClanAccountId": 456
          }
        ],
        "franchises": [],
        "tagIds": [
          1
        ],
        "tags": [
          {
            "tagId": 1,
            "weight": 100
          }
        ],
        "categories": {
          "supportedPlayerCategoryIds": [
            1
          ],
          "featureCategoryIds": [
            22
          ]
        },
        "reviews": {
          "allLanguages": {
            "count": 100,
            "percentPositive": 90,
            "score": 8,
            "label": "Very Positive"
          },
          "selectedLanguage": null
        },
        "releaseAt": "2026-01-01T00:00:00.000Z",
        "contentDescriptorIds": [],
        "platforms": {
          "windows": true,
          "mac": false,
          "linux": true,
          "steamDeckCompatibilityCategory": 3,
          "steamOsCompatibilityCategory": null,
          "steamFrameCompatibilityCategory": null,
          "steamMachineCompatibilityCategory": null,
          "vrSupport": null
        },
        "artwork": {
          "libraryCapsuleUrl": "https://shared.fastly.steamstatic.com/store_item_assets/steam/apps/570/library_600x900_2x.jpg",
          "libraryCapsule1xUrl": null,
          "libraryCapsule2xUrl": "https://shared.fastly.steamstatic.com/store_item_assets/steam/apps/570/library_600x900_2x.jpg",
          "mainCapsuleUrl": null,
          "mainCapsule2xUrl": null,
          "smallCapsuleUrl": null,
          "smallCapsule2xUrl": null,
          "headerUrl": null,
          "header2xUrl": null,
          "packageHeaderUrl": null,
          "heroCapsuleUrl": null,
          "heroCapsule2xUrl": null,
          "libraryHeroUrl": null,
          "libraryHero2xUrl": null,
          "libraryHeaderUrl": null,
          "libraryLogoUrl": null,
          "libraryLogo2xUrl": null,
          "verticalCapsuleUrl": null,
          "verticalCapsule2xUrl": null,
          "communityIconUrl": null,
          "pageBackgroundUrl": null,
          "rawPageBackgroundUrl": null,
          "pageBackgroundPath": null,
          "lastModifiedAt": null
        },
        "originalArtwork": null,
        "screenshots": {
          "allAges": [
            {
              "ordinal": 0,
              "filename": "ss_example.jpg",
              "url": "https://shared.fastly.steamstatic.com/store_item_assets/steam/apps/570/ss_example.jpg"
            }
          ],
          "matureContent": []
        }
      }
    }
  ]
}

Recent response

Steam defines this as a recent two-week window. A missing playtimeTwoWeeksMinutes is unknown, not zero. The lifetime playtime fields are repeated from Steam's recent-game records when available.

{
  "schemaVersion": 1,
  "provider": "steam",
  "accountRef": "owner",
  "status": "ready",
  "stale": false,
  "lastAttemptAt": "2026-09-16T12:00:00.000Z",
  "lastSuccessAt": "2026-09-16T12:00:00.000Z",
  "nextRefreshAt": "2026-09-16T12:15:00.000Z",
  "windowDays": 14,
  "totals": {
    "gameCount": 1,
    "playtimeMinutes": 30
  },
  "games": [
    {
      "providerGameId": "570",
      "appId": 570,
      "name": "Example Game",
      "playtimeMinutes": 600,
      "playtimeTwoWeeksMinutes": 30,
      "playtimeWindowsMinutes": 500,
      "playtimeMacMinutes": 0,
      "playtimeLinuxMinutes": 100,
      "playtimeDeckMinutes": 10,
      "playtimeDisconnectedMinutes": null,
      "lastPlayedAt": "2026-09-15T12:00:00.000Z",
      "hasCommunityVisibleStats": true,
      "hasWorkshop": true,
      "hasMarket": true,
      "hasDlc": true,
      "hasLeaderboards": false,
      "contentDescriptorIds": [],
      "capsuleFilename": null,
      "iconUrl": "https://media.steampowered.com/steamcommunity/public/images/apps/570/example.jpg",
      "coverUrl": "https://shared.fastly.steamstatic.com/store_item_assets/steam/apps/570/library_600x900_2x.jpg",
      "store": {
        "visible": true,
        "unlisted": false,
        "itemType": 0,
        "type": 0,
        "isFree": false,
        "urlPath": "app/570/example_game",
        "urlSlug": "example_game",
        "url": "https://store.steampowered.com/app/570/example_game",
        "shortDescription": "An example store description.",
        "developers": [
          {
            "name": "Example Studio",
            "creatorClanAccountId": 123
          }
        ],
        "publishers": [
          {
            "name": "Example Publisher",
            "creatorClanAccountId": 456
          }
        ],
        "franchises": [],
        "tagIds": [
          1
        ],
        "tags": [
          {
            "tagId": 1,
            "weight": 100
          }
        ],
        "categories": {
          "supportedPlayerCategoryIds": [
            1
          ],
          "featureCategoryIds": [
            22
          ]
        },
        "reviews": {
          "allLanguages": {
            "count": 100,
            "percentPositive": 90,
            "score": 8,
            "label": "Very Positive"
          },
          "selectedLanguage": null
        },
        "releaseAt": "2026-01-01T00:00:00.000Z",
        "contentDescriptorIds": [],
        "platforms": {
          "windows": true,
          "mac": false,
          "linux": true,
          "steamDeckCompatibilityCategory": 3,
          "steamOsCompatibilityCategory": null,
          "steamFrameCompatibilityCategory": null,
          "steamMachineCompatibilityCategory": null,
          "vrSupport": null
        },
        "artwork": {
          "libraryCapsuleUrl": "https://shared.fastly.steamstatic.com/store_item_assets/steam/apps/570/library_600x900_2x.jpg",
          "libraryCapsule1xUrl": null,
          "libraryCapsule2xUrl": "https://shared.fastly.steamstatic.com/store_item_assets/steam/apps/570/library_600x900_2x.jpg",
          "mainCapsuleUrl": null,
          "mainCapsule2xUrl": null,
          "smallCapsuleUrl": null,
          "smallCapsule2xUrl": null,
          "headerUrl": null,
          "header2xUrl": null,
          "packageHeaderUrl": null,
          "heroCapsuleUrl": null,
          "heroCapsule2xUrl": null,
          "libraryHeroUrl": null,
          "libraryHero2xUrl": null,
          "libraryHeaderUrl": null,
          "libraryLogoUrl": null,
          "libraryLogo2xUrl": null,
          "verticalCapsuleUrl": null,
          "verticalCapsule2xUrl": null,
          "communityIconUrl": null,
          "pageBackgroundUrl": null,
          "rawPageBackgroundUrl": null,
          "pageBackgroundPath": null,
          "lastModifiedAt": null
        },
        "originalArtwork": null,
        "screenshots": {
          "allAges": [
            {
              "ordinal": 0,
              "filename": "ss_example.jpg",
              "url": "https://shared.fastly.steamstatic.com/store_item_assets/steam/apps/570/ss_example.jpg"
            }
          ],
          "matureContent": []
        }
      }
    }
  ]
}

Badges response

Badge records retain Steam's badge ID, level, completion time, XP, scarcity, optional app/community-item IDs, and border color. XP threshold values are source fields; the API does not calculate a replacement progress score. communityBadgeQuests specifically describes Steam Community badge ID 2.

{
  "schemaVersion": 1,
  "provider": "steam",
  "accountRef": "owner",
  "status": "ready",
  "stale": false,
  "lastAttemptAt": "2026-09-16T12:00:00.000Z",
  "lastSuccessAt": "2026-09-16T12:00:00.000Z",
  "nextRefreshAt": "2026-09-16T12:15:00.000Z",
  "playerXp": 4200,
  "playerLevel": 42,
  "playerXpNeededToLevelUp": 300,
  "playerXpNeededCurrentLevel": 200,
  "communityBadgeId": 2,
  "communityBadgeQuestStatus": "available",
  "badges": [
    {
      "badgeId": 1,
      "level": 2,
      "completedAt": "2026-09-01T12:00:00.000Z",
      "xp": 100,
      "scarcity": 500,
      "appId": null,
      "communityItemId": null,
      "borderColor": null
    }
  ],
  "communityBadgeQuests": [
    {
      "questId": 1,
      "completed": true
    }
  ]
}

Game detail response

Known owned games return HTTP 200 while background enrichment is pending or when a title lacks community stats. achievementStatus, statsStatus, and currentPlayersStatus report each independent source. Locked hidden achievements conceal their name, description, and both icon states. globalPercent is Steam's global unlock percentage normalized to a number from 0 through 100; malformed, non-finite, and out-of-range source values become null, while zero is valid. Raw title stats retain their API name, optional display name, schema default, and numeric value. currentPlayers is Steam's online observation at the detail snapshot time.

{
  "schemaVersion": 1,
  "provider": "steam",
  "accountRef": "owner",
  "status": "ready",
  "stale": false,
  "lastAttemptAt": "2026-09-16T12:00:00.000Z",
  "lastSuccessAt": "2026-09-16T12:00:00.000Z",
  "nextRefreshAt": "2026-09-16T12:15:00.000Z",
  "game": {
    "providerGameId": "570",
    "appId": 570,
    "name": "Example Game",
    "playtimeMinutes": 600,
    "playtimeTwoWeeksMinutes": 30,
    "playtimeWindowsMinutes": 500,
    "playtimeMacMinutes": 0,
    "playtimeLinuxMinutes": 100,
    "playtimeDeckMinutes": 10,
    "playtimeDisconnectedMinutes": null,
    "lastPlayedAt": "2026-09-15T12:00:00.000Z",
    "hasCommunityVisibleStats": true,
    "hasWorkshop": true,
    "hasMarket": true,
    "hasDlc": true,
    "hasLeaderboards": false,
    "contentDescriptorIds": [],
    "capsuleFilename": null,
    "iconUrl": "https://media.steampowered.com/steamcommunity/public/images/apps/570/example.jpg",
    "coverUrl": "https://shared.fastly.steamstatic.com/store_item_assets/steam/apps/570/library_600x900_2x.jpg",
    "store": {
      "visible": true,
      "unlisted": false,
      "itemType": 0,
      "type": 0,
      "isFree": false,
      "urlPath": "app/570/example_game",
      "urlSlug": "example_game",
      "url": "https://store.steampowered.com/app/570/example_game",
      "shortDescription": "An example store description.",
      "developers": [
        {
          "name": "Example Studio",
          "creatorClanAccountId": 123
        }
      ],
      "publishers": [
        {
          "name": "Example Publisher",
          "creatorClanAccountId": 456
        }
      ],
      "franchises": [],
      "tagIds": [
        1
      ],
      "tags": [
        {
          "tagId": 1,
          "weight": 100
        }
      ],
      "categories": {
        "supportedPlayerCategoryIds": [
          1
        ],
        "featureCategoryIds": [
          22
        ]
      },
      "reviews": {
        "allLanguages": {
          "count": 100,
          "percentPositive": 90,
          "score": 8,
          "label": "Very Positive"
        },
        "selectedLanguage": null
      },
      "releaseAt": "2026-01-01T00:00:00.000Z",
      "contentDescriptorIds": [],
      "platforms": {
        "windows": true,
        "mac": false,
        "linux": true,
        "steamDeckCompatibilityCategory": 3,
        "steamOsCompatibilityCategory": null,
        "steamFrameCompatibilityCategory": null,
        "steamMachineCompatibilityCategory": null,
        "vrSupport": null
      },
      "artwork": {
        "libraryCapsuleUrl": "https://shared.fastly.steamstatic.com/store_item_assets/steam/apps/570/library_600x900_2x.jpg",
        "libraryCapsule1xUrl": null,
        "libraryCapsule2xUrl": "https://shared.fastly.steamstatic.com/store_item_assets/steam/apps/570/library_600x900_2x.jpg",
        "mainCapsuleUrl": null,
        "mainCapsule2xUrl": null,
        "smallCapsuleUrl": null,
        "smallCapsule2xUrl": null,
        "headerUrl": null,
        "header2xUrl": null,
        "packageHeaderUrl": null,
        "heroCapsuleUrl": null,
        "heroCapsule2xUrl": null,
        "libraryHeroUrl": null,
        "libraryHero2xUrl": null,
        "libraryHeaderUrl": null,
        "libraryLogoUrl": null,
        "libraryLogo2xUrl": null,
        "verticalCapsuleUrl": null,
        "verticalCapsule2xUrl": null,
        "communityIconUrl": null,
        "pageBackgroundUrl": null,
        "rawPageBackgroundUrl": null,
        "pageBackgroundPath": null,
        "lastModifiedAt": null
      },
      "originalArtwork": null,
      "screenshots": {
        "allAges": [
          {
            "ordinal": 0,
            "filename": "ss_example.jpg",
            "url": "https://shared.fastly.steamstatic.com/store_item_assets/steam/apps/570/ss_example.jpg"
          }
        ],
        "matureContent": []
      }
    }
  },
  "gameName": "Example Game",
  "gameVersion": "1",
  "currentPlayers": 12345,
  "currentPlayersStatus": "available",
  "achievementStatus": "available",
  "achievementCoverage": {
    "defined": 1,
    "playerRows": 1,
    "unlocked": 1,
    "unlockedWithKnownGlobalPercent": 1
  },
  "achievements": [
    {
      "apiName": "FIRST_WIN",
      "name": "First Win",
      "description": "Win once.",
      "hidden": false,
      "defaultValue": 0,
      "achieved": true,
      "unlockedAt": "2026-09-01T12:00:00.000Z",
      "iconUrl": null,
      "unlockedIconUrl": null,
      "lockedIconUrl": null,
      "globalPercent": 12.5
    }
  ],
  "rarestUnlock": {
    "apiName": "FIRST_WIN",
    "name": "First Win",
    "description": "Win once.",
    "hidden": false,
    "defaultValue": 0,
    "achieved": true,
    "unlockedAt": "2026-09-01T12:00:00.000Z",
    "iconUrl": null,
    "unlockedIconUrl": null,
    "lockedIconUrl": null,
    "globalPercent": 12.5
  },
  "rarityComparison": "unlocked-achievements-with-known-global-percent",
  "statsStatus": "available",
  "stats": [
    {
      "name": "kills",
      "displayName": "Kills",
      "defaultValue": 0,
      "value": 99
    }
  ]
}

Freshness and errors

Successful resources include schemaVersion, provider, accountRef, status, stale, lastAttemptAt, lastSuccessAt, and nextRefreshAt. HTTP 200 serves ready or bounded stale core resources and known owned-game details. Detail status can be pending while enrichment runs. HTTP 400 means malformed appId. HTTP 401 means missing/invalid service read key. HTTP 404 means the app is not in the cached owned library. HTTP 503 means disabled, unavailable, private, or expired data. Never render unavailable as an empty library or zero playtime.

Refresh and privacy

Profile, library, recent activity, and badges refresh every 15 minutes by default. Per-game detail snapshots refresh every 12 hours, one game per background job. Non-presence snapshots can remain stale for 24 hours by default after a transient failure. Steam profile and Game details privacy settings control availability. Friends, groups, real name, exact location, bans, server addresses, wishlists, followed games, commerce data, and credentials are intentionally excluded. An empty or private response is never converted into invented data. These jobs do not consume Valorant scraping quota.

Owner setup

Use a standard Steam user Web API key from https://steamcommunity.com/dev/apikey and the owner's exact 17-digit SteamID64. Keep STEAM_WEB_API_KEY in server secrets; the provider sends it in the x-webapi-key header rather than request URLs. Configure STEAM_ID, GAMING_DATA_DIR on persistent storage, optional refresh settings, and deploy with ENABLE_STEAM=false. Run npm run steam:refresh privately, inspect npm run steam:status, then enable and redeploy. The integration stores sanitized JSON snapshots only; no Steam password, session cookie, or rotating user token is collected.

export STEAM_ID=76561198000000000
export STEAM_WEB_API_KEY=your-private-32-character-key
npm run steam:refresh
npm run steam:status
ENABLE_STEAM=true npm start