csgostats.gg APIcsgostats.gg ↗
Retrieve CS2 player stats, match history, weapon breakdowns, and leaderboards from csgostats.gg via a structured JSON API.
curl -X GET 'https://api.parse.bot/scraper/cc6a7862-b65e-4a6f-b3b7-fd13a5228d53/get_player_profile?player_id=76561198000000000' \ -H 'X-API-Key: $PARSE_API_KEY'
Get player profile overview including name, avatar, and current ranks across game modes.
| Param | Type | Description |
|---|---|---|
| player_idrequired | string | Steam ID of the player (e.g. 76561198779774220) |
{
"type": "object",
"fields": {
"name": "string, player display name",
"ranks": "array of rank objects with rank_image and type",
"avatar": "string, URL to Steam avatar image",
"steam_id": "string, the queried Steam ID"
},
"sample": {
"data": {
"name": "John Doe",
"ranks": [
{
"type": "rank",
"rank_image": "https://static.csstats.gg/images/ranks/faceit/level10.png"
},
{
"type": "best",
"rank_image": "https://static.csstats.gg/images/ranks/9.png"
}
],
"avatar": "https://avatars.steamstatic.com/a66c5b6685dabbd3d8ab0a493b1c57d0325f3a69_full.jpg",
"steam_id": "76561198779774220"
},
"status": "success"
}
}About the csgostats.gg API
The csgostats.gg API exposes 7 endpoints covering CS2 player profiles, detailed statistics, match history, and leaderboards. Use get_player_stats to retrieve per-weapon headshot percentages and accuracy figures, or get_match_details to pull full team scoreboards for any match ID. All responses return structured JSON keyed to Steam IDs, making it straightforward to cross-reference players across endpoints.
Player Profiles and Statistics
get_player_profile returns a player's display name, Steam avatar URL, Steam ID, and an array of rank objects — each with a rank_image and type field — covering multiple game modes. get_player_stats goes deeper, returning a summary object with aggregate fields like played, won, lost, kills, deaths, assists, headshots, damage, and rounds, plus a weapons array where each entry includes the weapon name, kill count, headshot count, hs_pct, and accuracy. Optional filters — date (e.g. 7d, 30d, 6mo, 12mo), maps, modes, source (e.g. cs2, csgo), and platforms — let you scope statistics to a specific time window or context.
Match History and Details
get_player_matches returns a paginated list of matches for a given Steam ID, controlled via an offset parameter. Each match object includes match_id, date, map, score, kills, deaths, assists, and a direct url. The match_id values are numeric strings you can pass directly into get_match_details, which returns the full scoreboard: map name, match date, and a teams array where each team has a team_name, score, and a players array with per-player stats.
Leaderboards and Global Feeds
get_leaderboard accepts a mode parameter (premier or competitive) and returns top players with rank, name, wins, steam_id, and current_rank (the numeric rating score). get_recent_matches requires no inputs and returns a rolling global feed of recent matches with map, score, kills, deaths, date, match_id, and a url. get_player_played_with returns an array of players associated with a given Steam ID, useful for building social graphs around frequent teammates or opponents.
- Track a player's win rate and KD ratio over the last 30 days using the
datefilter inget_player_stats. - Build a weapon performance dashboard showing per-weapon headshot percentage and accuracy from the
weaponsarray. - Display a player's ranked history by pulling
get_player_matcheswith pagination and rendering map-by-map results. - Populate a team scouting tool by combining
get_match_detailsscoreboards withget_player_profilerank data. - Monitor CS2 premier leaderboard standings by polling
get_leaderboardwithmode=premieron a schedule. - Identify frequent teammates or opponents for a given player using
get_player_played_with. - Feed a live match ticker by consuming the
get_recent_matchesglobal feed for maps, scores, and kill counts.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 250 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does csgostats.gg have an official developer API?+
What filters does get_player_stats support?+
get_player_stats accepts five optional filters: date (values like 7d, 30d, 6mo, 12mo), maps, modes, source (e.g. cs2 or csgo to separate game generations), platforms, and vac. These can be combined to narrow results to a specific time range, map pool, or game mode.How does match pagination work in get_player_matches?+
count field with the total number of matches and an array of up to N matches per call. Use the offset integer parameter to page through the full history. Each match object includes a match_id you can pass to get_match_details for the full scoreboard.Does the API return individual round-by-round data within a match?+
get_match_details returns per-player statistics aggregated at the match level along with team scores, map name, and match date. Round-by-round timelines are not included in the current response shape. You can fork the API on Parse and revise it to add an endpoint targeting that level of detail if the source exposes it.Are player statistics available for CSGO (pre-CS2) matches separately?+
get_player_stats includes a source filter that accepts values like cs2 and csgo, allowing you to separate statistics by game version. However, deep per-era breakdowns beyond what the summary and weapons objects expose are not currently available as distinct endpoints. You can fork the API on Parse and revise it to add further era-specific filtering.