Steam Web API empty match data: why, and the fix.
The Steam Web API never returns CS2 match details such as scores, kills or players. Its only match method, GetNextMatchSharingCode, returns a share code or "n/a" when there is no newer match. Match details come from the replay demo, or for pro matches from a CS2 API.
- "n/a" = no newer code
- No scores in Steam
- Pro data: 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/GetNextMatchSharingCode/v1/?key=...&steamid=...&steamidkey=...&knowncode=...
{"result":{"nextcode":"n/a"}}What does an empty or n/a response mean?
"n/a" from GetNextMatchSharingCode means there is no match newer than the knowncode you sent; it is a normal answer, not a failure. Some client implementations also treat HTTP 202 from this method as "no new match yet". An empty body elsewhere usually means the data is not exposed through the Web API at all.
Why is there no match data?
The Steam Web API's CS2 interfaces (ICSGOPlayers_730, ICSGOServers_730, ICSGOTournaments_730, IEconItems_730) expose share codes, server status, Major pick'em layouts and items. None of them return a scoreboard. A share code decodes to a match ID, a reservation ID and a TV port, which identify a replay but contain no stats.
How do I get the match details?
For your own matchmaking games: walk share codes with GetNextMatchSharingCode, then download and parse each replay demo. For professional matches: call a CS2 esports API, which already holds the scores, maps and player lines.
import os, requests
H = {"x-api-key": os.environ["CITO_API_KEY"]}
API = "https://api.citoapi.com/api/v1/cs2"
match = requests.get(f"{API}/matches/results", params={"limit": 1}, headers=H).json()["data"][0]
print(match["team1Name"], match["team1Score"], "-", match["team2Score"], match["team2Name"])
stats = requests.get(f"{API}/matches/{match['id']}/player-stats", headers=H).json()["data"]
print(stats) # kills, deaths, ADR, KAST and rating per player, per mapWhat about my own matchmaking games?
Those are only available through Steam: the share-code walk needs your Steam ID, your game authentication code and one known share code, and every match after it has to come from its demo. The CS2 API covers professional matches, not personal matchmaking history.
How does the CS2 API make this error impossible?
For professional matches you never call Steam, so there is no n/a and no empty body: every finished match already has its maps, scores and per-player lines. A match that is not indexed yet returns data_available: false with a reason, never a silent empty response.
curl -s "https://api.citoapi.com/api/v1/cs2/matches/results?limit=5" -H "x-api-key: $CITO_API_KEY"Frequently asked questions
Something missing? Email support@citoapi.com.
Why does GetNextMatchSharingCode return n/a?
There is no match newer than the knowncode you sent. Wait for the next game to finish, then call it again with the same knowncode.
Can the Steam Web API return CS2 scores or kills?
No. No Steam Web API method returns a CS2 scoreboard; match details come from the replay demo or, for pro matches, a CS2 esports API.
Does the CS2 API have my matchmaking games?
No. It covers professional matches: scores, maps, rounds and player stats. Your own matchmaking games are only reachable through Steam share codes and demos.
Related
- How to get CS2 match dataResults, maps and player lines for any pro match in three requests.
- CS2 match results APIFinal series scores, map scores and box scores.
- Steam Web API for CS2 tutorialStep by step through Steam's CS2 methods, and where they stop.
- CS2 match history not foundThere is no Steam match history endpoint for CS2. What to call instead.
- CS2 share code decode failedThe share code alphabet, the decode algorithm and the usual mistakes.
- CS2 player stats APIRating, ADR, KAST and K/D per map, career and form.
Build CS2 live score apps
Free is for building and testing. Paid plans add commercial use, real-time live data and the full archive.