Skip to Content
CSGOWINAPI
API v2 Coming soonLeaderboards

A creator's leaderboard, ready for an overlay

API v2 - coming soon.

Coming soon

API v2 is not open yet - every request to it answers 404 until it launches, and the details on this page may still change. Build on API v1 today - it keeps working. New keys and a one-step switch will arrive with v2.

No key needed

This read needs no key and nothing switched on for your code. If you do send a key, it must be the v2 key of the code's owner, or the read is refused.
GET
/api/v2/leaderboards/{code}

The live periods and the latest ended ones with their standings, the newest raffle state, and the embed page. The same answer for every caller, so a browser on any origin may poll it without a key (no cookie is read). A code that is not the board owner's main code resolves to the owner's board. Poll it every few seconds: it is cached for 5 seconds and secondsLeft is counted from serverTime. include adds the account ids (each player and the creator), exchanged and xpBonus to the rows.

Rate limits: 60 reads a minute per IP across /api/v2 and at most 25 to one path in 2 seconds (429 with Retry-After).

Authorization

partnerKey
headerx-apikey<token>

Your API v2 key (cgw2_...)

Path Parameters

code*string

The affiliate code (letter case ignored)

Length1 <= length <= 191

Query Parameters

limit?integer

Standings per period, 1 to 1000: a period ranks its top 100, or every place of a longer prize ladder

Range1 <= value <= 1000
Default10
include?string

Fields to add to each row, comma-separated: uuid, exchanged, xpBonus. Absent: none

Match^(uuid|exchanged|xpBonus)(,(uuid|exchanged|xpBonus))*$
currency?string

The currency of the answer's amounts: COINS (the default, the answer as it always was) or USD, EUR or GBP, converted at the rate the site shows and rounded to two decimals as the site writes them. Anything else is a 400 unknown_currency.

Default"COINS"
Value in"COINS""USD""EUR""GBP"

Response Body

OK

application/json
  1. response
code*string

The code the board belongs to (a creator other code resolves to it)

creator*|null
periods*array<>

The live periods, then the latest ended ones

raffle*|

The newest started raffle of the board, null when it has none

serverTime*string

When this answer was made (ISO 8601, UTC)

Formatdate-time
embed*

How to show this board on a stream or a page: the url with any of params as query parameters

currency?

What the amounts were converted to, when currency was USD, EUR or GBP. Absent for coins

Example Request
curl "https://api.csgowin.com/api/v2/leaderboards/YOUR_CODE"
Example Response
{  "code": "EXAMPLE-AFFILIATE",  "creator": {    "name": "example_creator",    "socials": [      {        "type": "kick",        "url": "https://example.invalid/kick/creator"      }    ]  },  "periods": [    {      "periodId": 50,      "status": "live",      "startsAt": "2026-11-09T00:00:00.000Z",      "endsAt": "2026-11-16T00:00:00.000Z",      "secondsLeft": 36000,      "paid": false,      "prizes": [        60,        40      ],      "prizePool": 100,      "standings": [        {          "place": 1,          "name": "example_player_one",          "avatar": null,          "level": 12,          "vipRank": 3,          "wagered": 1250.5,          "prize": 60        },        {          "place": 2,          "name": "Anonymous1234",          "avatar": null,          "level": 12,          "vipRank": 3,          "wagered": 900,          "prize": 40        }      ]    }  ],  "raffle": null,  "serverTime": "2026-11-15T14:00:00.000Z",  "embed": {    "url": "https://csgowin.com/embed/leaderboard/EXAMPLE-AFFILIATE",    "params": {      "top": {        "min": 1,        "max": 25,        "default": 10      },      "compact": {        "default": false      },      "transparent": {        "default": false      },      "lang": {        "values": [          "en",          "de"        ],        "default": "en"      }    }  }}

Errors

StatusWhenBody
400bad_request: an input outside its rules, a cookie sent, or a refusal by the site (the message says which). unknown_currency: currency is not one of COINS, USD, EUR, GBP.{"error":{"code":"bad_request","message":"limit: Too small: expected number to be >=1"}}{"error":{"code":"unknown_currency","message":"currency is one of COINS, USD, EUR, GBP"}}
401legacy_key: a v1 key - switch to API v2 for a v2 key. invalid_key: not a live API v2 key, or the code is not one of its account’s codes.{"error":{"code":"legacy_key","message":"this is a v1 key: switch to API v2 in Profile > Affiliates > API key to get a v2 key"}}{"error":{"code":"invalid_key","message":"the key is not a live API v2 key of this code"}}
403key_blocked: API v2 is blocked for the account - contact support (a new key does not lift it). account_restricted: the account is restricted - contact support.{"error":{"code":"key_blocked","message":"this key is blocked: contact support"}}{"error":{"code":"account_restricted","message":"this account is restricted: contact support"}}
404not_found: no such giveaway, case or period, or the code has no board or giveaways (also every request while API v2 is not open, and every action while actions are not open). leaderboard_inactive: the code’s board is not active.{"error":{"code":"not_found","message":"not found"}}{"error":{"code":"leaderboard_inactive","message":"this leaderboard is not active"}}
429rate_limited: past a rate limit - wait the Retry-After seconds.{"error":{"code":"rate_limited","message":"too many requests, please try again later."}}
503unavailable: not available for a moment and nothing was done - try again after the Retry-After seconds.{"error":{"code":"unavailable","message":"temporarily unavailable, please try again shortly."}}