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
rosters
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/rosters"
Python (all pages, as a DataFrame)
import io, os, requests, pandas as pd
url = "https://api.granuleux.com/v1/data/rosters"
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":"rosters"}Preview (first 20 rows, from the free sample match)
| game_id | steamid | name_in_demo | team_id | team_name_in_demo | rounds_seen |
|---|---|---|---|---|---|
| 24000071 | 76561197960690195 | FalleN | 8297 | FURIA | 18 |
| 24000071 | 76561198058500492 | KSCERATO | 8297 | FURIA | 18 |
| 24000071 | 76561198059614402 | zorte | 12394 | BB TEAM | 18 |
| 24000071 | 76561198134401925 | YEKINDAR | 8297 | FURIA | 18 |
| 24000071 | 76561198146207066 | Boombl4 | 12394 | BB TEAM | 18 |
| 24000071 | 76561198164970560 | yuurih | 8297 | FURIA | 18 |
| 24000071 | 76561198167785069 | S1ren | 12394 | BB TEAM | 18 |
| 24000071 | 76561198200982290 | molodoy | 8297 | FURIA | 18 |
| 24000071 | 76561198372023214 | Magnojez | 12394 | BB TEAM | 18 |
| 24000071 | 76561198859428279 | d1Ledez | 12394 | BB TEAM | 18 |
| 24000072 | 76561197960690195 | FalleN | 8297 | FURIA | 23 |
| 24000072 | 76561198058500492 | KSCERATO | 8297 | FURIA | 23 |
| 24000072 | 76561198059614402 | zorte | 12394 | BB TEAM | 23 |
| 24000072 | 76561198134401925 | YEKINDAR | 8297 | FURIA | 23 |
| 24000072 | 76561198146207066 | Boombl4 | 12394 | BB TEAM | 23 |
| 24000072 | 76561198164970560 | yuurih | 8297 | FURIA | 23 |
| 24000072 | 76561198167785069 | S1ren | 12394 | BB TEAM | 23 |
| 24000072 | 76561198200982290 | molodoy | 8297 | FURIA | 23 |
| 24000072 | 76561198372023214 | Magnojez | 12394 | BB TEAM | 23 |
| 24000072 | 76561198859428279 | d1Ledez | 12394 | BB TEAM | 23 |