csgostats APIcsgostats.gg ↗
Retrieve CS2 player stats, match history, weapon breakdowns, and leaderboards from csgostats.gg via a structured JSON API with 6 endpoints.
What is the csgostats API?
The csgostats.gg API provides access to CS2 player and match data across 6 endpoints, covering player profiles, detailed weapon statistics, paginated match history, full match scoreboards, and global leaderboards. The get_player_stats endpoint alone returns over 10 summary fields plus a per-weapon breakdown, while get_match_details delivers full team rosters and per-player scoreboard data for any given match ID.
curl -X GET 'https://api.parse.bot/scraper/cc6a7862-b65e-4a6f-b3b7-fd13a5228d53/get_player_profile?player_id=76561199221466189' \ -H 'X-API-Key: $PARSE_API_KEY'
Get a player's profile overview by Steam ID in one page fetch: display name, Steam avatar URL, the numeric CS2 Premier rating, and current rank images across game modes (Competitive, Wingman, CS:GO legacy, etc.). premier_rating is the current Premier rating as the site displays it (a formatted string with thousands separator, one shape being "36,314"); it is null when the player has no rating in the current Premier season. The premier object carries the current season label, Premier wins, current_rating (same value as premier_rating) and best_rating for that season, each null when the site shows no value. Each rank entry includes a rank_image URL and a type class. A Steam ID the site does not know returns an upstream error with status 404.
| Param | Type | Description |
|---|---|---|
| player_idrequired | string | Steam ID of the player (17-digit numeric string, e.g. 76561198779774220) |
{
"type": "object",
"fields": {
"name": "string, player display name",
"ranks": "array of rank objects with rank_image (URL) and type (CSS class of the rank cell)",
"avatar": "string, URL to Steam avatar image",
"premier": "object with season (string label), wins (string), current_rating (string or null), best_rating (string or null) for the current Premier season",
"steam_id": "string, the queried Steam ID",
"premier_rating": "string or null, current CS2 Premier rating as displayed (e.g. \"36,314\"); null when unrated this season"
},
"sample": {
"data": {
"name": "lzt.market/user/2302547",
"ranks": [
{
"type": "rk-v",
"rank_image": "https://static.csstats.gg/images/ranks/10.png"
},
{
"type": "rk-v",
"rank_image": "https://static.csstats.gg/images/ranks/wingman/wingman15.svg"
}
],
"avatar": "https://avatars.steamstatic.com/REDACTED_SECRET_full.jpg",
"premier": {
"wins": "115",
"season": "Season 5",
"best_rating": "36,314",
"current_rating": "36,314"
},
"steam_id": "76561199221466189",
"premier_rating": "36,314"
},
"status": "success"
}
}About the csgostats API
Player Profiles and Statistics
The get_player_profile endpoint accepts a 17-digit Steam ID and returns the player's display name, Steam avatar URL, and an array of rank objects. Each rank object includes a rank_image URL and a type field indicating whether it represents the player's current rank or their best achieved rank across modes such as CS2, Premier, and Wingman.
The get_player_stats endpoint returns a summary object with aggregate fields — played, won, lost, tied, kills, deaths, assists, headshots, damage, and rounds — alongside a weapons array. Each weapon entry includes kills, headshots, hs_pct, and accuracy. Optional filter parameters let you scope results by date range (7d, 30d, 6mo, 12mo), map, game mode, source (cs2 or csgo), and platform.
Match History and Details
get_player_matches returns a paginated list of matches for a given Steam ID. Each match entry includes match_id, date, map, score, kills, deaths, assists, and a url. The count field in the response gives the total number of recorded matches for that player. Pagination is controlled by the offset parameter.
get_match_details accepts a match_id (obtainable from player match history or the recent matches feed) and returns the full scoreboard: map name, date, and a teams array where each team has a team_name, score, and a players array. Each player entry includes name, steam_id, avatar, rank_image, and a stats array of numeric performance values.
Leaderboards and Recent Matches
get_leaderboard accepts an optional mode parameter (premier or competitive) and returns the top-ranked players with their rank position, name, steam_id, wins, and current_rank score. get_recent_matches requires no inputs and returns the 50 most recent matches globally, each with a match_id, date, map, score, and a url linking to the full match page.
The csgostats API is a managed, monitored endpoint for csgostats.gg — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when csgostats.gg changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official csgostats.gg API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Display a CS2 player's rank history and current standing by Steam ID using
get_player_profile - Analyze weapon-level accuracy and headshot rates over the last 30 days with
get_player_statsdate filters - Build a match history viewer showing map, score, and K/D/A per game via
get_player_matches - Render full team scoreboards and individual player stats for any match using
get_match_details - Track top-rated players in Premier or competitive mode using
get_leaderboardwith mode filtering - Monitor the global stream of newly recorded matches with
get_recent_matchesas a live feed input - Compare aggregate win rate and damage output across multiple Steam IDs for squad performance tracking
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 200 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
| Team | $300/mo | 20,000 | 300 req/min |
| Company | $1,000/mo | 100,000 | 500 req/min |
Each endpoint has a fixed posted price per successful call — most fall between 1 and 10 credits — shown on this API's page before you run it. 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, and how do they affect the response?+
date (7d, 30d, 6mo, 12mo), maps, modes, platforms, source (cs2 or csgo), and vac. All are optional. Each filter narrows the match sample used to calculate the returned summary aggregate and weapons breakdown. Omitting all filters returns lifetime stats.How does pagination work in `get_player_matches`?+
offset parameter is a 0-based page number. Each page returns up to approximately 50 matches. The count field in the response gives the total number of matches on record for that player, so you can calculate the number of pages needed to walk the full history.Does the API return head-to-head matchup data or records between two specific players?+
get_player_matches results for two Steam IDs and then calling get_match_details on overlapping match IDs. If you need a dedicated head-to-head endpoint, you can fork this API on Parse and revise it to add that endpoint.Are CS:GO (pre-CS2) stats accessible, or only CS2 data?+
get_player_stats endpoint includes a source filter that accepts csgo in addition to cs2, so historical CS:GO stats can be requested where csgostats.gg has records for that player. The get_player_profile endpoint returns rank images across modes but does not separately expose a legacy CSGO rank field.