CS2 match history not found: what to call instead.
The Steam Web API has no match history endpoint for CS2; GetMatchHistory exists only for Dota 2. For your own games, Steam offers a share-code walk that needs your game authentication code. For professional match history, use a CS2 API's team and player match endpoints.
- No CS2 GetMatchHistory
- Own games: share codes
- Pro games: CS2 API
{ "success": true, "data": [ { "id": "cs2-match-2400634", "eventName": "CCT 2026 Europe Series 15 Closed Qualifier", "bestOf": 3, "team1Name": "G2 Ares", "team2Name": "megoshort", "score": { "team1": 1, "team2": 0 } }, { "id": "cs2-match-2400618", "eventName": "GLuck Yungstar 2026 Wildcard", "bestOf": 3, "team1Name": "Butterfly", "team2Name": "PRIVATE", "score": { "team1": 0, "team2": 1 } } ... ]}The error
GET https://api.steampowered.com/ICSGOPlayers_730/GetMatchHistory/v1/
404 Not FoundWhy is there no CS2 match history endpoint?
In Valve's catalogue of Steam Web API methods, GetMatchHistory exists only under the Dota 2 interfaces (IDOTA2Match_570). CS2 never got an equivalent, so any URL that guesses one returns 404.
How do I get my own CS2 match history?
Call ICSGOPlayers_730/GetNextMatchSharingCode with your Steam ID, your game authentication code (steamidkey, created in Steam's help pages) and the share code of one known match. It returns the next code; repeat until it returns n/a. Each code then has to be decoded and its demo downloaded for stats.
import requests
def share_codes(key, steamid, auth_code, known_code):
url = "https://api.steampowered.com/ICSGOPlayers_730/GetNextMatchSharingCode/v1/"
code = known_code
while True:
r = requests.get(url, params={"key": key, "steamid": steamid,
"steamidkey": auth_code, "knowncode": code}, timeout=10)
if r.status_code == 202: # some clients see this for "no newer match"
return
r.raise_for_status()
nxt = r.json()["result"]["nextcode"]
if nxt == "n/a":
return
yield nxt
code = nxtHow does the CS2 API make this error impossible?
Professional matches are not in Steam at all, so a 404 on a guessed Steam URL is the end of that road. The CS2 API keeps them indexed by team, player and tournament: the history is one request, with scores, events and maps.
import os, requests
H = {"x-api-key": os.environ["CITO_API_KEY"]}
API = "https://api.citoapi.com/api/v1/cs2"
team = requests.get(f"{API}/teams/vitality/results", headers=H, params={"limit": 10}).json()["data"]
player = requests.get(f"{API}/players/zywoo/matches", headers=H, params={"limit": 10}).json()["data"]
for m in team:
print(m["startsAt"][:10], m["team1Name"], m["team1Score"], "-", m["team2Score"], m["team2Name"])| Match | Score | Event | Format |
|---|---|---|---|
| G2 Ares vs megoshort | 1–0 | CCT 2026 Europe Series 15 Closed Qualifier | Bo3 |
| Butterfly vs PRIVATE | 0–1 | GLuck Yungstar 2026 Wildcard | Bo3 |
| PRIVATE vs Enjoy | 1–2 | GLuck Yungstar 2026 Wildcard | Bo3 |
| SEGA DLL vs ABT | 0–2 | Master League Portugal Season 19 | Bo3 |
| Nemesis vs 33 | 0–2 | NODWIN Clutch Series 14 | Bo3 |
| NT vs BAKS | 0–2 | CCT 2026 Europe Series 14 | Bo3 |
| Balkan Outlaws vs FORZE Reload | 0–2 | European Pro League Series 10 | Bo3 |
| Walczaki vs Noir Verse | 0–1 | CCT 2026 Europe Series 15 Closed Qualifier | Bo3 |
| Black Phoenix vs Butterfly | 1–0 | GLuck Yungstar 2026 Wildcard | Bo3 |
| FarmVille vs EMPIRE | 2–1 | CROSSFIRE Season 7 | Bo3 |
Frequently asked questions
Something missing? Email support@citoapi.com.
Does the Steam API have CS2 match history?
No. GetMatchHistory exists only for Dota 2. CS2 has GetNextMatchSharingCode, which returns your own share codes one at a time.
What is a CS2 game authentication code?
A code you create in Steam's help pages that lets an app read your match share codes through GetNextMatchSharingCode. Treat it like a password.
Where do I get pro CS2 match history?
From a CS2 esports API. The CS2 API returns history per team (/cs2/teams/{slug}/results), per player (/cs2/players/{slug}/matches) and per tournament.
Related
- Steam Web API for CS2 tutorialStep by step through Steam's CS2 methods, and where they stop.
- CS2 match results APIFinal series scores, map scores and box scores.
- How to get CS2 match dataResults, maps and player lines for any pro match in three requests.
- Steam Web API empty match dataWhy Steam returns no CS2 match details, and where match data lives.
- CS2 share code decode failedThe share code alphabet, the decode algorithm and the usual mistakes.
- CS2 API documentationAuth, the response envelope, errors, rate limits and every endpoint.
Build CS2 live score apps
Free is for building and testing. Paid plans add commercial use, real-time live data and the full archive.