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-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 } } ... ]}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 |
|---|---|---|---|
| Ninjas in Pyjamas vs Eternal Fire | 2–0 | ROG JOURNEY Autumn 2026 | Bo3 |
| SAW vs Lazer Cats | 2–0 | FOX Legacy Season 1 | Bo3 |
| Lavked vs Nexus | 0–2 | CCT 2026 Europe Series 10 | Bo3 |
| FURIA vs BETBOOM | 2–0 | ESL Pro League Season 24 | Bo3 |
| Wildcard vs INFINITE | 0–2 | FOX Legacy Season 1 | Bo3 |
| Astralis vs fnatic | 2–0 | Stake Ranked Episode 4 | Bo3 |
| G2 vs Natus Vincere | 0–2 | ESL Pro League Season 24 | Bo3 |
| Mira vs Bounty Hunters | 0–2 | CCT 2026 South America Series 6 | Bo3 |
| MOUZ vs M80 | 2–0 | ESL Pro League Season 24 | Bo3 |
| Luminosity vs Nemiga | 0–2 | Stake Ranked Episode 4 | 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.