Skip to main content
POST
/
v1
/
leaderboard.previewAccountRank
Preview account rank
curl --request POST \
  --url https://api.steamsets.com/v1/leaderboard.previewAccountRank \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "leaderboard": "apps",
  "id": {
    "accountId": 1,
    "steamId64": "<string>"
  },
  "value": 1,
  "vanity": {
    "type": "steam",
    "value": "<string>"
  }
}
'
{
  "$schema": "<string>",
  "ownAccount": {
    "appCost": 1,
    "apps": 1,
    "avatar": "<string>",
    "awardsGiven": 1,
    "awardsReceived": 1,
    "badges": 1,
    "bans": 1,
    "createdAt": "2023-11-07T05:31:56Z",
    "differenceToUs": 1,
    "donated": 1,
    "economyBan": "<string>",
    "foilBadgeCost": 1,
    "foilBadges": 1,
    "friends": 1,
    "gameBans": 1,
    "level": 1,
    "name": "<string>",
    "normalBadgeCost": 1,
    "normalBadges": 1,
    "playtime": 1,
    "pointsGiven": 1,
    "pointsReceived": 1,
    "privacy": "public",
    "rank": 1,
    "roles": [
      {
        "extras": {},
        "rating": 123,
        "role": "user"
      }
    ],
    "score": 1,
    "steamId": "<string>",
    "steamSetsScore": 1,
    "steamSetsVanity": "<string>",
    "steamVanity": "<string>",
    "vacBans": 1,
    "xp": 1,
    "city": {
      "name": "<string>"
    },
    "country": {
      "name": "<string>",
      "code": "<string>"
    },
    "region": {
      "name": "<string>"
    },
    "state": {
      "name": "<string>"
    }
  },
  "rankedAbove": {
    "appCost": 1,
    "apps": 1,
    "avatar": "<string>",
    "awardsGiven": 1,
    "awardsReceived": 1,
    "badges": 1,
    "bans": 1,
    "createdAt": "2023-11-07T05:31:56Z",
    "differenceToUs": 1,
    "donated": 1,
    "economyBan": "<string>",
    "foilBadgeCost": 1,
    "foilBadges": 1,
    "friends": 1,
    "gameBans": 1,
    "level": 1,
    "name": "<string>",
    "normalBadgeCost": 1,
    "normalBadges": 1,
    "playtime": 1,
    "pointsGiven": 1,
    "pointsReceived": 1,
    "privacy": "public",
    "rank": 1,
    "roles": [
      {
        "extras": {},
        "rating": 123,
        "role": "user"
      }
    ],
    "score": 1,
    "steamId": "<string>",
    "steamSetsScore": 1,
    "steamSetsVanity": "<string>",
    "steamVanity": "<string>",
    "vacBans": 1,
    "xp": 1,
    "city": {
      "name": "<string>"
    },
    "country": {
      "name": "<string>",
      "code": "<string>"
    },
    "region": {
      "name": "<string>"
    },
    "state": {
      "name": "<string>"
    }
  },
  "rankedBelow": {
    "appCost": 1,
    "apps": 1,
    "avatar": "<string>",
    "awardsGiven": 1,
    "awardsReceived": 1,
    "badges": 1,
    "bans": 1,
    "createdAt": "2023-11-07T05:31:56Z",
    "differenceToUs": 1,
    "donated": 1,
    "economyBan": "<string>",
    "foilBadgeCost": 1,
    "foilBadges": 1,
    "friends": 1,
    "gameBans": 1,
    "level": 1,
    "name": "<string>",
    "normalBadgeCost": 1,
    "normalBadges": 1,
    "playtime": 1,
    "pointsGiven": 1,
    "pointsReceived": 1,
    "privacy": "public",
    "rank": 1,
    "roles": [
      {
        "extras": {},
        "rating": 123,
        "role": "user"
      }
    ],
    "score": 1,
    "steamId": "<string>",
    "steamSetsScore": 1,
    "steamSetsVanity": "<string>",
    "steamVanity": "<string>",
    "vacBans": 1,
    "xp": 1,
    "city": {
      "name": "<string>"
    },
    "country": {
      "name": "<string>",
      "code": "<string>"
    },
    "region": {
      "name": "<string>"
    },
    "state": {
      "name": "<string>"
    }
  },
  "rankedOutOf": 0
}
This endpoint supports API key authentication for external integrations

API Access

This endpoint can be accessed using:
  • API Keys: For external applications and integrations
  • User Sessions: For web application access
See our API documentation for authentication details.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
leaderboard
enum<string>
required

The leaderboard to get

Available options:
apps,
awards_given,
awards_received,
bans,
game_bans,
vac_bans,
donations,
foil_badges,
normal_badges,
badges,
playtime,
points_given,
points_received,
steam_sets,
xp
id
object
value
integer<int64> | null

What their leaderboard score would be, will use their current rank if not set

Required range: x >= 0
vanity
object

Response

OK

$schema
string<uri>

A URL to the JSON Schema for this object.

ownAccount
object

Either the logged in user or the requested steamId, otherwise just contains the rank and score

rankedAbove
object

The account ranked above the account (rank-1)

rankedBelow
object

The account ranked below the account (rank+1)

rankedOutOf
integer<int32>
default:0

The number of accounts that are ranked in the leaderboard

Required range: x >= 0