Skip to Content
CSGOWINAPI
API v1 (legacy)Leaderboard

Your leaderboard

API v1 (legacy).

API v1 (legacy)

This endpoint keeps working and nothing expires. New integrations should use API v2 once it opens - it is coming soon. Its counterpart there is the v2 leaderboard read.

What you keep if you do not switch

No opt-in needed

This endpoint works today for any code with a leaderboard, with or without your key - nothing has to be switched on for your code.
GET
/leaderboard/{code}

Retrieves all active and recently ended leaderboard periods for the affiliate identified by code. Prizes and wagered amounts are returned in USD.

Authorization

ApiKeyAuth
headerx-apikey<token>

Your unique API key. Pass it in the x-apikey request header.

Path Parameters

code*string

Your affiliate code.

Response Body

Successful response with leaderboard data.

application/json
  1. response
leaderboards*array<>
Example Request
curl "https://api.csgowin.com/api/leaderboard/YOUR_CODE" \  -H "x-apikey: YOUR_API_KEY"
Example Response
{  "leaderboards": [    {      "active": true,      "affiliate": {        "code": "YOUR_CODE"      },      "dateStart": "2025-03-01T00:00:00.000Z",      "dateEnd": "2025-03-08T00:00:00.000Z",      "days": 7,      "id": 10,      "paid": false,      "periodId": 42,      "prizes": [        100,        50,        25      ],      "users": [        {          "exchanged": 0,          "xpBonus": 0,          "hidden": false,          "level": 12,          "name": "example_player_one",          "prize": 100,          "rank": "gold",          "avatar_selected": "https://example.invalid/avatars/1.webp",          "roles": [],          "uuid": "example-player-id",          "wagered": 500        }      ],      "user": {        "uuid": "example-creator-id",        "name": "example_creator",        "socials": [          {            "type": "twitch",            "url": "https://example.invalid/twitch/creator"          }        ]      }    }  ]}

Errors

StatusWhenBody
400No leaderboard runs on this code. A key that does not match the code is not refused: the response is then the public view of the leaderboard, marked by an extra viewerOnCode field.{"error":"requested leaderboard not found"}
500Internal server error.