Datasets
Every dataset is one endpoint, /v1/data/<dataset>, with the same filters, column choice (fields and preset), paging and json, csv or parquet output. Pick one to build a query and preview it. Column definitions: docs.
state
- player_state · per game
- team_state · per game
player_game
One row is one player in one game. Key: game_id, steamid.
Request
curl -H "Authorization: Bearer $CS2API_KEY" \ "https://api.granuleux.com/v1/data/player_game"
Python (all pages, as a DataFrame)
import io, os, requests, pandas as pd
url = "https://api.granuleux.com/v1/data/player_game"
params = {"limit": 1000,"format": "parquet"}
params = {k: v for k, v in params.items() if v is not None}
headers = {"Authorization": f"Bearer {os.environ['CS2API_KEY']}"}
frames = []
while True:
r = requests.get(url, params=params, headers=headers)
r.raise_for_status()
frames.append(pd.read_parquet(io.BytesIO(r.content)))
cursor = r.headers.get("X-Next-Cursor")
if not cursor:
break
params["cursor"] = cursor
df = pd.concat(frames, ignore_index=True)MCP (query_dataset arguments)
{"dataset":"player_game"}Preview (first 20 rows, from the free sample match)
| game_id | steamid | team_id | rounds_played | kills | deaths | assists | flash_assists | headshot_kills | damage | util_damage | adr | hs_pct | kast | first_kills | first_deaths |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 24000071 | 76561197960690195 | 8297 | 18 | 10 | 15 | 1 | 0 | 6 | 1170 | 104 | 65 | 0.600 | 0.444 | 0 | 3 |
| 24000071 | 76561198058500492 | 8297 | 18 | 10 | 17 | 1 | 0 | 5 | 1101 | 2 | 61.170 | 0.500 | 0.556 | 0 | 2 |
| 24000071 | 76561198059614402 | 12394 | 18 | 25 | 7 | 6 | 1 | 13 | 2545 | 51 | 141.390 | 0.520 | 0.944 | 2 | 2 |
| 24000071 | 76561198134401925 | 8297 | 18 | 13 | 17 | 1 | 0 | 7 | 1469 | 1 | 81.610 | 0.538 | 0.667 | 4 | 4 |
| 24000071 | 76561198146207066 | 12394 | 18 | 10 | 10 | 9 | 1 | 5 | 1345 | 198 | 74.720 | 0.500 | 0.889 | 2 | 1 |
| 24000071 | 76561198164970560 | 8297 | 18 | 6 | 15 | 6 | 3 | 1 | 927 | 37 | 51.500 | 0.167 | 0.556 | 1 | 2 |
| 24000071 | 76561198167785069 | 12394 | 18 | 11 | 9 | 3 | 1 | 3 | 1104 | 108 | 61.330 | 0.273 | 0.889 | 1 | 1 |
| 24000071 | 76561198200982290 | 8297 | 18 | 10 | 13 | 3 | 1 | 6 | 1182 | 87 | 65.670 | 0.600 | 0.556 | 0 | 2 |
| 24000071 | 76561198372023214 | 12394 | 18 | 15 | 12 | 5 | 0 | 8 | 1288 | 122 | 71.560 | 0.533 | 0.778 | 1 | 0 |
| 24000071 | 76561198859428279 | 12394 | 18 | 16 | 11 | 8 | 0 | 8 | 1706 | 179 | 94.780 | 0.500 | 1 | 7 | 1 |
| 24000072 | 76561197960690195 | 8297 | 23 | 11 | 14 | 4 | 0 | 8 | 1407 | 29 | 61.170 | 0.727 | 0.696 | 1 | 5 |
| 24000072 | 76561198058500492 | 8297 | 23 | 12 | 15 | 6 | 0 | 9 | 1612 | 349 | 70.090 | 0.750 | 0.696 | 2 | 0 |
| 24000072 | 76561198059614402 | 12394 | 23 | 18 | 12 | 5 | 0 | 3 | 1586 | 239 | 68.960 | 0.167 | 0.696 | 2 | 2 |
| 24000072 | 76561198134401925 | 8297 | 23 | 19 | 17 | 5 | 1 | 8 | 1932 | 78 | 84 | 0.421 | 0.696 | 4 | 3 |
| 24000072 | 76561198146207066 | 12394 | 23 | 19 | 16 | 8 | 0 | 5 | 2251 | 190 | 97.870 | 0.263 | 0.739 | 4 | 1 |
| 24000072 | 76561198164970560 | 8297 | 23 | 15 | 13 | 6 | 1 | 11 | 1587 | 37 | 69 | 0.733 | 0.783 | 1 | 1 |
| 24000072 | 76561198167785069 | 12394 | 23 | 13 | 14 | 3 | 0 | 7 | 1401 | 14 | 60.910 | 0.538 | 0.783 | 2 | 1 |
| 24000072 | 76561198200982290 | 8297 | 23 | 14 | 13 | 4 | 3 | 4 | 1251 | 69 | 54.390 | 0.286 | 0.696 | 3 | 3 |
| 24000072 | 76561198372023214 | 12394 | 23 | 12 | 16 | 8 | 0 | 7 | 1544 | 150 | 67.130 | 0.583 | 0.609 | 2 | 7 |
| 24000072 | 76561198859428279 | 12394 | 23 | 10 | 13 | 4 | 0 | 5 | 1075 | 55 | 46.740 | 0.500 | 0.739 | 2 | 0 |