Building a live CS2 stats dashboard is one of the most common integration projects for developers working with esports data. Whether you are building an overlay for a broadcast, a fan-facing stats tracker, a sportsbook data display, or an internal analytics tool, the core challenge is the same: getting reliable, low-latency CS2 match data into your application and keeping it updated in real time as the match progresses.
This guide walks through how to do that using the PandaScore Stats API. It covers which endpoints to use at each stage of a match, how the WebSocket live feeds work, what the data structure looks like for CS2-specific events, and a few practical considerations for building a robust integration.
Understanding the CS2 Data Model
Before writing any code, it helps to understand how PandaScore structures CS2 match data. There are three layers, each with its own endpoint family and data depth.
Fixtures data covers match schedules, team rosters, tournament context, and results. This is available on the free plan and is the starting point for any CS2 application: you need to know which matches exist, when they are played, and which teams are involved before you can pull any game-level data.
Post-game statistics cover detailed player and team performance data after a game ends, typically available within 15 minutes of match completion. This includes kills, deaths, assists, headshots, weapon kills, and round-by-round performance breakdowns. This data is available on the Historical plan and above.
Live data is the real-time layer, delivered via WebSocket. Two feeds are available: Frames (game-state snapshots every two seconds, covering health, economy, and K/D/A) and Events (timeline of key in-game moments including kills, bomb events, round starts and ends). The Events feed and advanced Frames fields require the Pro Live plan.
Step 1: Find Your Match
The starting point for any CS2 dashboard is retrieving the match you want to display. Use the matches endpoint filtered to CS2 and your target status.
To find upcoming or live CS2 matches with live data support, filter by live_supported=true to ensure the match has a real-time data feed available. The response includes the match ID, team information, scheduled start time, and tournament context. Note the match ID, you will need it to pull game-level data.
A useful filter for dashboard applications is /csgo/matches/running to retrieve all currently live CS2 matches, which gives you the real-time match list to populate a dashboard front page.
Step 2: Connect to the Live WebSocket Feed
Once you have a live match, connect to the PandaScore WebSocket to receive real-time updates. The WebSocket endpoint follows the pattern:
wss://live.pandascore.co/csgo/matches/{match_id}/events
On connection, you receive an initial payload with the current game state. From that point, the stream pushes event objects as they occur in the game. Each event has a type field identifying the event category and a timestamp for ordering.
For CS2, the key event types to handle in your application are: kill (player kill events with attacker, victim, weapon, and headshot flag), round_start and round_end (round lifecycle events with current score), bomb_plant and bomb_defuse (objective events), and game_end (match conclusion with final scores).
The Frames feed at wss://live.pandascore.co/csgo/matches/{match_id}/frames delivers game-state snapshots every two seconds. Each frame contains the current K/D/A for all players, economy values (cash available, equipment value), player health, and team round score. This is the feed to use if you want a continuously updating player stats table or economy tracker.
Step 3: Structure Your Data Model
For a CS2 live dashboard, the minimal data model you need to maintain in your application state is: current round number and score for both teams, per-player kill/death/assist counts updated on each kill event, current economy values per team from the Frames feed, recent events list for a live feed display, and map name and current half (CT/T sides).
A practical implementation pattern is to initialise your state from the first WebSocket payload (which includes the current match state), then apply event deltas as they arrive. Kill events increment the attacker's kill count and the victim's death count. Round end events update the score. This is simpler than re-fetching the full state on every event and significantly more performant under load.
Step 4: Add Post-Game Statistics
When the game ends (on receipt of a game_end event), switch from the live WebSocket to the post-game endpoints to fetch comprehensive match statistics. The /csgo/games/{game_id}/players endpoint returns full player performance data for the completed game, including weapon-specific kill counts, headshot percentage, and multi-kill rounds.
For a dashboard that covers multiple games in a series (best-of-three or best-of-five), aggregate post-game data across all completed games alongside the live feed for the current game. This gives users both the series context and the live game view simultaneously.
Practical Considerations for a Robust Integration
WebSocket connections drop. Build reconnection logic with exponential backoff and re-fetch the current match state on reconnect to resynchronise your application state. Do not assume you can reconstruct state purely from events if you have missed a window.
Handle the live_supported flag carefully. Not all CS2 matches in the PandaScore database have live data available. Filter your match list to live_supported=true before attempting WebSocket connections to avoid unnecessary failed connections.
For dashboards displaying multiple concurrent matches, manage WebSocket connections per match and implement connection pooling if your deployment environment has connection limits. Large tournaments like PGL Astana can have several matches running simultaneously during the group stage.
Frequently Asked Questions
What is the PandaScore CS2 live stats API?
The PandaScore CS2 live stats API is a WebSocket-based real-time data feed that delivers in-game events and game-state snapshots from live CS2 matches. It provides two feeds: Events (discrete in-game events like kills and round ends, pushed as they occur) and Frames (full game-state snapshots every two seconds). The API covers all major CS2 tournaments with live data support and is used by sportsbooks, media platforms, and developer tools to power real-time CS2 applications.
How do I know if a CS2 match has live data available?
Use the live_supported boolean field on match and tournament objects. A value of true indicates that the PandaScore live data feed is available for that match. You can filter the matches endpoint with filter[live_supported]=true to retrieve only matches with live data coverage.
What CS2 data is available post-game?
Post-game CS2 data includes per-player statistics (kills, deaths, assists, headshots, weapon kills, multi-kill rounds), per-team statistics (round wins per half, economy efficiency), round-by-round breakdown, and match metadata (map played, match duration, final score). This data is available via REST endpoints approximately 15 minutes after game completion and requires the Historical plan or above.
Can I test my integration without waiting for a live match?
Yes. PandaScore provides a sandbox environment for CS2 and League of Legends that simulates the live WebSocket feed using historical match data. The sandbox supports playback speed control (1x, 1.5x, 2x) and allows you to start from a specific round number, making it straightforward to test your event handling logic without waiting for a live event.
Start Building
The PandaScore Stats API documentation covers all CS2 endpoints and WebSocket specifications in full detail, with request and response examples for every endpoint. The sandbox environment is available to all accounts for integration testing.
If you want to talk through a specific CS2 integration use case or need help with endpoint selection for your application, join our customer Slack community where our team and other developers are active daily.
What are you building with CS2 data? Share your project in the comments.
