Developers / API reference
API reference
JSON over HTTPS. Read a player's trust score, ranks and Steam facts, their recent matches, where they stand from parsed demos, and how to beat them. The same data is available to AI assistants through the MCP server.
https://cs2peek.com/api/v1Getting started
Go to Developers and sign in through Steam. Apps belong to your Steam account, up to 5.
Create an app: a name, what it does, and a website if it has one.
Copy the API key. It is shown once: we only keep a hash of it. Lost it? Rotate the key and update your app.
Make your first request with the key in the Authorization header.
curl "https://cs2peek.com/api/v1/players/76561198346708442" \
-H "Authorization: Bearer $CS2PEEK_KEY"Authentication
Every endpoint except the OpenAPI spec needs a key. Send it as a Bearer token:
Authorization: Bearer cs2p_your_keyFor a quick test in the browser you can also pass it as ?key=cs2p_…. Prefer the header in real code: query strings end up in logs and browser history. Keys are secrets: call the API from your server, not from a web page. If a key leaks, rotate or revoke it from your apps; the old key stops working at once.
Rate limits
Each app gets 60 requests per minute: a burst of 60, then one more every second. Requests to the MCP server count too. Every response carries the current state:
| Header | Meaning |
|---|---|
X-RateLimit-Limit | Requests allowed per minute (60). |
X-RateLimit-Remaining | Requests you can make right now. |
X-RateLimit-Reset | Seconds until the full limit is available again. |
Retry-After | On a 429 only: seconds to wait before the next request. |
Player data from Steam, Leetify and FACEIT is cached for up to 2 hours, so polling the same player more often returns the same answer.
Errors
Errors use standard HTTP status codes and always have the same JSON shape. Branch on code; message is for humans and may change.
Response
{
"error": {
"code": "invalid_steamid",
"message": "Expected a SteamID64 (17 digits starting with 7656119)."
}
}| Status | Code | When |
|---|---|---|
| 400 | invalid_steamid, invalid_map, invalid_limit, invalid_body, invalid_text, invalid_players, invalid_share_code | A parameter is missing or malformed. The message says which and why. |
| 401 | missing_key | No API key in the request. |
| 401 | invalid_key | The key is wrong, rotated or revoked. |
| 404 | not_found | No such player, Leetify profile, demo or endpoint. |
| 429 | rate_limited | More than 60 requests in a minute. Wait Retry-After seconds. |
| 502 | upstream_error | Steam, Leetify or FACEIT didn't answer. Retry in a moment. |
Endpoints
All paths are relative to https://cs2peek.com/api/v1. SteamIDs are SteamID64 strings. Responses are shortened here: "…" marks a cut. The full schemas are in the OpenAPI spec.
Get a player
GET/api/v1/players/{steamid}
The full report on one player: trust score with every signal behind it, ranks, Steam account facts, the in-game CS2 profile (commends, level, cooldown), Leetify mechanics, FACEIT lifetime stats, crosshair and the maps CS2Peek has demos of. Sources are cached for up to 2 hours.
Parameters
- steamidstring, pathrequired
- SteamID64 of the player (17 digits). Use /resolve to turn links or vanity names into ids.
MCP tool get_player
curl "https://cs2peek.com/api/v1/players/76561198346708442" \
-H "Authorization: Bearer $CS2PEEK_KEY"Response
{
"steamId": "76561198346708442",
"name": "sOrRy",
"avatar": "https://avatars.steamstatic.com/f61a1c2e9ee05236d6cbc89add14976eb05b6cd9_full.jpg",
"online": false,
"country": "SN",
"url": "https://cs2peek.com/player/76561198346708442",
"trust": {
"score": 100,
"level": "trusted",
"signals": []
},
"ranks": {
"premier": 16663,
"faceit": {
"level": 8,
"elo": 1562
},
"leetify": 2.33,
"wingman": 15,
"competitive": {
"de_mirage": 12,
"de_dust2": 13,
"de_inferno": 9
}
},
"steam": {
"accountAgeDays": 3652,
"createdAt": 1480250620,
"cs2Hours": 5328,
"level": 41,
"private": false,
"vacBans": 0,
"gameBans": 0,
"daysSinceLastBan": null,
"friends": {
"total": 15,
"banned": 1
}
},
"cs2": {
"commends": {
"friendly": 412,
"teacher": 198,
"leader": 233
},
"level": 31,
"cooldown": null
},
"leetify": {
"matches": 822,
"winrate": 0.5172,
"firstMatch": "2020-01-02T20:57:26.000Z",
"rating": {
"aim": 78.52,
"positioning": 62.17,
"utility": 42.31,
"clutch": 0.1216,
"opening": 0.0278
},
"stats": {
"reaction_time_ms": 546.12,
"preaim": 10.59,
"accuracy_head": 17.55,
"spray_accuracy": 45.75,
"…": "…"
},
"platformBans": []
},
"faceit": {
"nickname": "_s0rRy",
"matches": 181,
"winrate": 57,
"kd": 1.43,
"hs": 45,
"adr": 94.67
},
"crosshair": "CSvhLBF75D9sTC4em4HP3Wx33VixjkCG5aJ6fYsSWrwZCW",
"demoMaps": [
{
"map": "de_nuke",
"matches": 4
}
],
"lite": false,
"unavailable": []
}List recent matches
GET/api/v1/players/{steamid}/matches
The player's recent matches from Leetify, newest first, with their own line in each: K/D/A, ADR, headshots, Leetify rating and aim stats.
Parameters
- steamidstring, pathrequired
- SteamID64 of the player (17 digits). Use /resolve to turn links or vanity names into ids.
- limitinteger, queryoptional
- How many matches, 1 to 100. Default 20.
MCP tool get_player_matches
curl "https://cs2peek.com/api/v1/players/76561198346708442/matches?limit=2" \
-H "Authorization: Bearer $CS2PEEK_KEY"Response
{
"steamId": "76561198346708442",
"matches": [
{
"id": "d1f098b5-a758-48c1-a18b-cffc417ec45e",
"map": "de_inferno",
"finishedAt": "2026-11-25T20:45:47.000Z",
"source": "matchmaking",
"outcome": "loss",
"score": [
11,
13
],
"rating": 0.0115,
"kills": 22,
"deaths": 19,
"assists": 5,
"hsKills": 16,
"adr": 89.9,
"rounds": 24,
"mvps": 3,
"reactionMs": 586,
"preaim": 11.38,
"headAcc": 29.63,
"sprayAcc": 43.9,
"url": "https://cs2peek.com/match/d1f098b5-a758-48c1-a18b-cffc417ec45e"
},
"…"
]
}Get positions on a map
GET/api/v1/players/{steamid}/positions
Where the player stands on one map, per side, merged from up to 30 demos the CS2Peek bot parsed: heat cells, kill and death spots, seconds per callout before and after the plant, setups 20 s into the round, and their stats in each demo. Coordinates are pixels on the 1024x1024 radar image given in radar. A player with no demo on the map returns matches: 0.
Parameters
- steamidstring, pathrequired
- SteamID64 of the player (17 digits). Use /resolve to turn links or vanity names into ids.
- mapstring, queryrequired
- Map with a radar: de_mirage, de_nuke, or just nuke. Unknown maps are a 400 that lists the valid ones.
MCP tool get_player_positions
curl "https://cs2peek.com/api/v1/players/76561198346708442/positions?map=de_nuke" \
-H "Authorization: Bearer $CS2PEEK_KEY"Response
{
"steamId": "76561198346708442",
"map": "de_nuke",
"matches": 4,
"radar": "https://cs2peek.com/radars/de_nuke.png",
"t": {
"heat": [
[
568,
312,
0.088
],
[
584,
312,
0.105
],
"…"
],
"kills": [
[
549,
591,
0
],
"…"
],
"deaths": [
[
599,
615,
0
],
"…"
]
},
"ct": {
"heat": [
"…"
],
"kills": [
"…"
],
"deaths": [
"…"
]
},
"zones": {
"t": {
"rounds": 60,
"time": {
"Outside": [
199.3,
0
],
"Lobby": [
30.8,
0
],
"Squeaky": [
33.5,
6.3
],
"…": "…"
},
"setup": {
"Outside": 24,
"Squeaky": 8,
"Silo": 4
}
},
"ct": {
"rounds": 60,
"time": {
"Ramp": [
244.1,
12
],
"…": "…"
},
"setup": {
"Ramp": 21,
"Hut": 18
}
}
},
"demos": [
{
"shareCode": "CSGO-q3biy-5D4EV-8pYW5-AhuRd-ciQZQ",
"playedAt": 1795642020,
"premier": 16721,
"stats": {
"rounds": 30,
"kills": 12,
"deaths": 21,
"rating": 0.71,
"…": "…"
}
}
]
}Get anti-strat tips
GET/api/v1/players/{steamid}/tips
How to play against the player: weaknesses to exploit and strengths to respect, each with the stat behind it and a concrete action. With a map, their record on it counts too. Built from their Leetify averages; players without Leetify data return a 404.
Parameters
- steamidstring, pathrequired
- SteamID64 of the player (17 digits). Use /resolve to turn links or vanity names into ids.
- mapstring, queryoptional
- Optional map, e.g. de_inferno, to include their record there.
MCP tool get_anti_strat_tips
curl "https://cs2peek.com/api/v1/players/76561198346708442/tips?map=de_mirage" \
-H "Authorization: Bearer $CS2PEEK_KEY"Response
{
"steamId": "76561198346708442",
"map": "de_mirage",
"tips": [
{
"kind": "respect",
"title": "Strong spray control",
"stat": "46% spray",
"action": "Don't let fights drag on. Win the first bullets or reposition."
},
{
"kind": "respect",
"title": "Wins opening duels on CT",
"stat": "58% won",
"action": "Don't take the first peek on their spot. Clear it with utility."
},
{
"kind": "exploit",
"title": "Little utility",
"stat": "42 utility",
"action": "Push through their area: they rarely stop rushes with nades."
}
]
}Resolve players
POST/api/v1/resolve
Finds SteamID64s in any text: steamcommunity.com links (vanity /id/ links are resolved through Steam), SteamID64, SteamID3 [U:1:x], SteamID2 STEAM_0:x:y, Leetify links, or the output of the CS2 console status command. Also picks up a map name.
JSON body
- textstring
- Anything pasted.
MCP tool resolve_players
curl -X POST "https://cs2peek.com/api/v1/resolve" \
-H "Authorization: Bearer $CS2PEEK_KEY" \
-H "Content-Type: application/json" \
-d '{"text":"https://steamcommunity.com/id/cs2peek [U:1:386442714] on de_ancient"}'Response
{
"ids": [
"76561198346708442",
"76561198599063179"
],
"map": "de_ancient",
"unresolved": []
}Scan a lobby
POST/api/v1/lobby
Reports on up to 10 players in one call, the way the lobby scan on the site works. Faster than one /players call each: inventory, Steam comments and the in-game CS2 profile are skipped (lite: true, cs2: null). With a map, each player also gets their anti-strat tips for it.
JSON body
- playersarray
- SteamID64s.
- mapstring
- Optional map being played.
MCP tool scan_lobby
curl -X POST "https://cs2peek.com/api/v1/lobby" \
-H "Authorization: Bearer $CS2PEEK_KEY" \
-H "Content-Type: application/json" \
-d '{"players":["76561198346708442","76561198599063179"],"map":"de_nuke"}'Response
{
"map": "de_nuke",
"players": [
{
"steamId": "76561198346708442",
"name": "sOrRy",
"avatar": "https://avatars.steamstatic.com/f61a1c2e9ee05236d6cbc89add14976eb05b6cd9_full.jpg",
"online": false,
"country": "SN",
"url": "https://cs2peek.com/player/76561198346708442",
"trust": {
"score": 100,
"level": "trusted",
"signals": []
},
"ranks": {
"premier": 16663,
"faceit": {
"level": 8,
"elo": 1562
},
"leetify": 2.33,
"wingman": 15,
"competitive": {
"de_mirage": 12,
"de_dust2": 13,
"de_inferno": 9
}
},
"steam": {
"accountAgeDays": 3652,
"createdAt": 1480250620,
"cs2Hours": 5328,
"level": 41,
"private": false,
"vacBans": 0,
"gameBans": 0,
"daysSinceLastBan": null,
"friends": {
"total": 15,
"banned": 1
}
},
"cs2": null,
"leetify": {
"matches": 822,
"winrate": 0.5172,
"firstMatch": "2020-01-02T20:57:26.000Z",
"rating": {
"aim": 78.52,
"positioning": 62.17,
"utility": 42.31,
"clutch": 0.1216,
"opening": 0.0278
},
"stats": {
"reaction_time_ms": 546.12,
"preaim": 10.59,
"accuracy_head": 17.55,
"spray_accuracy": 45.75,
"…": "…"
},
"platformBans": []
},
"faceit": {
"nickname": "_s0rRy",
"matches": 181,
"winrate": 57,
"kd": 1.43,
"hs": 45,
"adr": 94.67
},
"crosshair": "CSvhLBF75D9sTC4em4HP3Wx33VixjkCG5aJ6fYsSWrwZCW",
"demoMaps": [
{
"map": "de_nuke",
"matches": 4
}
],
"lite": true,
"unavailable": [],
"tips": [
{
"kind": "exploit",
"title": "Little utility",
"stat": "42 utility",
"action": "Push through their area: they rarely stop rushes with nades."
},
"…"
]
},
{
"steamId": "76561198599063179",
"name": "CS2Peek",
"trust": {
"score": 75,
"level": "trusted",
"signals": [
{
"points": 20,
"text": "Account created 12 days ago",
"kind": "account"
},
{
"points": 5,
"text": "Steam level 0",
"kind": "account"
}
]
},
"ranks": {
"premier": null,
"faceit": {
"level": null,
"elo": null
},
"leetify": null,
"wingman": null,
"competitive": {}
},
"leetify": null,
"lite": true,
"tips": [],
"…": "…"
}
]
}Get a parsed demo
GET/api/v1/demos/{shareCode}
A match demo parsed by the CS2Peek bot: score, players with full stats (K/D/A, ADR, KAST, HLTV 1.0 rating, openings, trades, clutches, utility, per side), rounds, every kill and grenade with positions, and the damage matrix. Player indexes in rounds, kills, nades and dmg point into players. The 2D replay frames (about 1 MB) are left out unless you ask.
Parameters
- shareCodestring, pathrequired
- Match share code, CSGO-xxxxx-xxxxx-xxxxx-xxxxx-xxxxx.
- framesboolean, queryoptional
- 1 to include the 2D replay frames.
MCP tool get_demo
curl "https://cs2peek.com/api/v1/demos/CSGO-q3biy-5D4EV-8pYW5-AhuRd-ciQZQ" \
-H "Authorization: Bearer $CS2PEEK_KEY"Response
{
"v": 1,
"shareCode": "CSGO-q3biy-5D4EV-8pYW5-AhuRd-ciQZQ",
"map": "de_nuke",
"playedAt": 1795642020,
"score": [
15,
15
],
"players": [
{
"id": "76561198846722695",
"name": "rinn",
"premier": null,
"start": "ct",
"stats": {
"rounds": 30,
"kills": 31,
"deaths": 18,
"assists": 3,
"damage": 2828,
"kast": 25,
"rating": 1.4,
"…": "…"
}
},
"…"
],
"rounds": [
{
"n": 1,
"start": 1761,
"end": 5611,
"winner": "t",
"reason": "ct_killed",
"plant": {
"t": 40.2,
"site": "A",
"by": 1,
"x": 587,
"y": 522
},
"ct": [
0,
4,
5,
6,
7
],
"equip": [
850,
200,
"…"
]
},
"…"
],
"kills": [
{
"r": 0,
"t": 19.7,
"k": 4,
"v": 8,
"a": -1,
"w": "usp_silencer",
"hs": true,
"kp": [
560,
320
],
"vp": [
513,
472
],
"kPlace": "Ramp",
"vPlace": "Trophy",
"opening": true,
"trade": false,
"flash": false,
"smoke": false,
"afterPlant": false
},
"…"
],
"nades": [
{
"r": 0,
"t": 19.2,
"p": 8,
"type": "smoke",
"from": [
509,
475
],
"at": [
563,
319
],
"fromPlace": "Trophy"
},
"…"
],
"dmg": [
[
0,
550,
543,
523,
0,
0,
0,
0,
703,
509
],
"…"
]
}MCP server
CS2Peek speaks the Model Context Protocol, so AI assistants can scout players for you: "Who is the most suspicious player in this lobby?", "How do I play against this guy on Mirage?". The tools mirror the endpoints above and use the same key and rate limit.
https://cs2peek.com/api/mcpStreamable HTTP transport (MCP 2025-06-18), stateless, JSON responses. Auth: the same Bearer key.
Connect a client
Claude Code
claude mcp add --transport http cs2peek https://cs2peek.com/api/mcp \
--header "Authorization: Bearer YOUR_KEY"Claude Desktop
Settings → Connectors → Add custom connector, with the server URL followed by ?key=YOUR_KEY. Or, in claude_desktop_config.json, through the mcp-remote bridge (needs Node.js):
{
"mcpServers": {
"cs2peek": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://cs2peek.com/api/mcp",
"--header",
"Authorization:${CS2PEEK_AUTH}"
],
"env": {
"CS2PEEK_AUTH": "Bearer YOUR_KEY"
}
}
}
}Cursor, VS Code and other clients
Any client that supports remote HTTP servers with headers. The config key may be named differently (VS Code uses servers).
{
"mcpServers": {
"cs2peek": {
"type": "http",
"url": "https://cs2peek.com/api/mcp",
"headers": {
"Authorization": "Bearer YOUR_KEY"
}
}
}
}Test it with curl
curl -X POST https://cs2peek.com/api/mcp \
-H "Authorization: Bearer $CS2PEEK_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"curl","version":"1.0"}}}'
# then
-d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'
-d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"get_player","arguments":{"steamid":"76561198346708442"}}}'Tools
| Tool | Arguments | What it does |
|---|---|---|
| get_player | steamid | Full CS2Peek report on one Counter-Strike 2 player: trust score (0-100, 100 = no red flag) with every signal that lowered it, ranks (Premier, FACEIT level and Elo, Leetify, Wingman, Competitive per map), Steam account facts (age, CS2 hours, level, VAC/game bans, banned friends), in-game CS2 commends, level and cooldown, Leetify mechanics, crosshair code and the maps CS2Peek has demos of. |
| get_player_matches | steamid, limit? | A player's recent CS2 matches from Leetify, newest first: map, date, outcome, score, Leetify rating, K/D/A, ADR, headshots and aim stats per match. |
| get_player_positions | steamid, map | Where a player stands on one map, per side (T and CT), from the demos CS2Peek parsed: time spent in each callout before and after the plant, where they set up 20 s into the round, heat map cells and kill/death spots (radar pixels on a 1024x1024 radar), plus their stats in each of those demos. Use get_player first to see which maps have demo data (demoMaps). |
| get_anti_strat_tips | steamid, map? | How to play against a player: their weaknesses to exploit and strengths to respect, each with the stat behind it and a concrete in-game action, from their Leetify stats and their record on the map when one is given. |
| resolve_players | text | Extracts SteamID64s from any text: steamcommunity.com profile links (including /id/ vanity links), SteamID64, SteamID3 [U:1:x], SteamID2 STEAM_0:x:y, Leetify links, or the output of the CS2 console `status` command. Also detects a map name. Returns at most 20 ids. |
| scan_lobby | players, map? | Quick reports on up to 10 players at once (a whole CS2 lobby): trust score, ranks and account facts for each, plus anti-strat tips when a map is given. Faster than get_player: it skips the inventory, Steam comments and CS2 in-game profile. |
| get_demo | share_code | A CS2 match demo parsed by CS2Peek, by its share code: score, the 10 players with full stats (K/D/A, ADR, KAST, HLTV 1.0 rating, openings, trades, clutches, utility, per side), every round (winner, reason, plant, equipment), every kill and grenade with positions, and the damage matrix. Large response. |
Data and fair use
- Data comes from public Steam, Leetify and FACEIT profiles, and from the demos the CS2Peek bot parses for its users.
- When you show Leetify data, credit Leetify, as this site does. Leetify stats are passed on as Leetify sends them.
- A trust score is a statistical signal built from public data, not proof of cheating. Don't present it as a verdict.
- Keep to the rate limit, cache what you can, and don't resell the data. Keys that abuse the API get revoked.