TutorialCS2 API tutorials

How to get CS2 match data.

Get a free key at citoapi.com, then call GET /cs2/matches/results for finished matches, GET /cs2/matches/{matchId}/maps for each map's score, and GET /cs2/matches/{matchId}/player-stats for kills, ADR, KAST and rating per player. Three requests, JSON out.

  • 3 requests
  • Professional matches
  • 500 free requests / month
GET /cs2/matches/results?limit=2200 OK
$ curl "https://api.citoapi.com/api/v1/cs2/matches/results?limit=2" \ -H "x-api-key: $CITO_API_KEY"
{  "success": true,  "data": [    {      "id": "cs2-match-2398974",      "eventName": "ROG JOURNEY Autumn 2026",      "bestOf": 3,      "team1Name": "Ninjas in Pyjamas",      "team2Name": "Eternal Fire",      "score": { "team1": 2, "team2": 0 }    },    {      "id": "cs2-match-2398896",      "eventName": "FOX Legacy Season 1",      "bestOf": 3,      "team1Name": "SAW",      "team2Name": "Lazer Cats",      "score": { "team1": 2, "team2": 0 }    }    ...  ]}

Step 1: How do I get an API key?

Sign up at citoapi.com and the key is shown immediately; it starts with cito_. Keep it in an environment variable and send it in the x-api-key header. The free plan is 500 requests a month, enough to follow this tutorial many times over.

Shell
export CITO_API_KEY="cito_..."   # from citoapi.com/signup

Step 2: How do I list finished CS2 matches?

GET /cs2/matches/results returns finished matches newest first, each with its event, format, teams and final series score. Use limit and page to move through the list; meta.hasNext says whether there is another page.

curl
curl -s "https://api.citoapi.com/api/v1/cs2/matches/results?limit=5" -H "x-api-key: $CITO_API_KEY"
Latest finished matches from GET /cs2/matches/results. Fetched from the production CS2 API on 3 Oct 2026, 19:54 UTC.
MatchScoreEventFormat
Ninjas in Pyjamas vs Eternal Fire2–0ROG JOURNEY Autumn 2026Bo3
SAW vs Lazer Cats2–0FOX Legacy Season 1Bo3
Lavked vs Nexus0–2CCT 2026 Europe Series 10Bo3
FURIA vs BETBOOM2–0ESL Pro League Season 24Bo3
Wildcard vs INFINITE0–2FOX Legacy Season 1Bo3
Astralis vs fnatic2–0Stake Ranked Episode 4Bo3
G2 vs Natus Vincere0–2ESL Pro League Season 24Bo3
Mira vs Bounty Hunters0–2CCT 2026 South America Series 6Bo3
MOUZ vs M802–0ESL Pro League Season 24Bo3
Luminosity vs Nemiga0–2Stake Ranked Episode 4Bo3

Step 3: How do I get each map's score?

Take a match id from step 2 and call GET /cs2/matches/{matchId}/maps. Each map comes back with its name, both scores, the winner and the team that picked it.

curl
curl -s "https://api.citoapi.com/api/v1/cs2/matches/cs2-match-2398974/maps" -H "x-api-key: $CITO_API_KEY"

Step 4: How do I get player stats for the match?

GET /cs2/matches/{matchId}/player-stats returns every player's line for each map: kills, deaths, assists, ADR, KAST and rating. That is the box score most CS2 sites show.

Python: the whole flow
import os, requests

API = "https://api.citoapi.com/api/v1/cs2"
H = {"x-api-key": os.environ["CITO_API_KEY"]}

def get(path, **params):
    r = requests.get(f"{API}{path}", headers=H, params=params, timeout=10)
    r.raise_for_status()
    return r.json()["data"]

match = get("/matches/results", limit=1)[0]
print(match["eventName"], "|", match["team1Name"], match["team1Score"], "-", match["team2Score"], match["team2Name"])

for m in get(f"/matches/{match['id']}/maps"):
    print(m)

for line in get(f"/matches/{match['id']}/player-stats"):
    print(line)

Can I get the same data from Steam?

Not for professional matches: the Steam Web API has no endpoints for pro results, maps or player stats. Steam only exposes share codes for your own matchmaking games, and their stats have to be parsed out of the replay demo.

Frequently asked questions

Something missing? Email support@citoapi.com.

What is the easiest way to get CS2 match data?

Call a CS2 API: GET /cs2/matches/results for finished matches, then /maps and /player-stats for one match. No Steam keys, demos or parsing.

How far back does CS2 match data go?

The CS2 API indexes 15,000 matches. Free keys get 30 days of in-depth history, Starter 90 days, Pro and above the full archive.

Can I get live CS2 match data the same way?

Yes. GET /cs2/matches/live lists matches in progress; /cs2/live/{matchId}/scoreboard has the round, the score and each player's line.

See pricing

Build CS2 live score apps

Free is for building and testing. Paid plans add commercial use, real-time live data and the full archive.