Skip to content
This repository has been archived by the owner on Feb 21, 2024. It is now read-only.

Description of how CS2 client fetches its leaderboard data

License

Notifications You must be signed in to change notification settings

zer0k-z/cs2-leaderboard-api-description

Repository files navigation

Counter-Strike 2 Leaderboard Web API

Endpoints:

Example result

{
	"result": {
		"data": 267117,
		"entries": [
			{
				"rank": 2,
				"score": 906461930,
				"detailData": "1f2a040810104b2a04081210042a0708131090e6c4082a08081410d4bcdda706",
				"name": "Kurosaki"
			},
			{
				"rank": 3,
				"score": 899482336,
				"detailData": "1e2a04081010472a04081210022a06081310a2c4082a08081410e0fddaa70600",
				"name": "月光"
			}
		]
	}
}

What data is available (and how)

  • Name

  • Leaderboard size

  • Rank (absolute)

  • CS Rating = score >> 15

  • Data related to detailData:

    • Data is almost a ScoreLeaderboardData protobuf message. The first bytes is the header, indicating the protobuf length.
    • In matchentries, each tag corresponds to a certain field, see image below. Winrate is calculated from the win/draw/loss fields.

    • For RankWindowStats, it corresponds to the map spider graph indicating player's map "preferences" (maybe derived from wins). It's a 32 bit value, each 4 bits correspond to a map.
    • TimeAchieved is probably when the player gets into the leaderboard.
  • Rank% (hidden from cs2 global LB) = Rank / data. It's an integer always capped between 1 and 99.

About

Description of how CS2 client fetches its leaderboard data

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages