SweatHost
HTTP API Reference

Deathmatch

HTTP API reference for CS2 deathmatch — start matches, list sessions, get stats, and leaderboards

Deathmatch API

Start tracked deathmatch competitions and retrieve per-session player stats and leaderboards.

Base path: /api/v1/cs2/deathmatch

Starting a deathmatch match

Use POST /api/v1/matches with matchType: "deathmatch" to create a deathmatch server with whitelist, auto-start, callbacks, and auto-shutdown — all in a single call.

The endpoints below are for querying deathmatch session data and stats after a match has started.


List sessions

GET /api/v1/cs2/deathmatch/sessions

Scope: servers:read

Query parameters

ParameterTypeDefaultDescription
serverIdstringFilter by server ID
statusstringlive, finished, cancelled
dateFromstringISO 8601 — sessions started after this date
dateTostringISO 8601 — sessions started before this date
pagenumber1Page number
pageSizenumber20Items per page (max 100)
curl -X GET "https://api.sweathost.com/api/v1/cs2/deathmatch/sessions?status=finished&page=1&pageSize=20" \
  -H "Authorization: Bearer YOUR_API_KEY"

Filter by server and date range

curl -X GET "https://api.sweathost.com/api/v1/cs2/deathmatch/sessions?serverId=SERVER_ID&dateFrom=2026-03-01T00:00:00Z&dateTo=2026-03-12T00:00:00Z" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "page": 1,
  "pageSize": 20,
  "total": 12,
  "items": [
    {
      "id": "uuid",
      "sessionId": "uuid",
      "serverId": "uuid",
      "subMode": "ffa",
      "mapName": "de_dust2",
      "status": "finished",
      "startedAt": "2026-03-12T10:00:00.000Z",
      "finishedAt": "2026-03-12T10:15:00.000Z",
      "playerCount": 8
    }
  ]
}

Get session

Get a single deathmatch session with full player stats.

GET /api/v1/cs2/deathmatch/sessions/:sessionId

Scope: servers:read

curl -X GET "https://api.sweathost.com/api/v1/cs2/deathmatch/sessions/SESSION_ID" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "id": "uuid",
  "sessionId": "uuid",
  "serverId": "uuid",
  "subMode": "ffa",
  "mapName": "de_dust2",
  "status": "finished",
  "startedAt": "2026-03-12T10:00:00.000Z",
  "finishedAt": "2026-03-12T10:15:00.000Z",
  "duration": 900,
  "players": [
    {
      "id": "uuid",
      "sessionId": "uuid",
      "steamId": "76561198000000001",
      "name": "Player1",
      "team": 0,
      "kills": 42,
      "deaths": 10,
      "assists": 5,
      "headshots": 18,
      "damageDealt": 5200,
      "bulletsFired": 340,
      "bulletsHit": 120,
      "accuracyPercent": 35.3,
      "hsPercent": 42.9,
      "kdRatio": 4.2,
      "kpm": 2.8,
      "adr": null,
      "roundsPlayed": null,
      "kastPercent": null,
      "impactRating": null
    }
  ]
}

Player stats fields

FieldTypeDescription
steamIdstringSteam ID 64
namestringIn-game name
teamnumber2=T, 3=CT, 0=FFA
killsnumberKills
deathsnumberDeaths
assistsnumberAssists
headshotsnumberHeadshot kills
damageDealtnumberTotal damage
bulletsFirednumberBullets fired
bulletsHitnumberBullets hit
accuracyPercentnumber | nullAccuracy %
hsPercentnumber | nullHeadshot %
kdRationumber | nullK/D ratio
kpmnumber | nullKills per minute
utilityDamagenumber | nullUtility damage
flashAssistsnumber | nullFlash assists
firstKillsnumber | nullFirst kills
firstDeathsnumber | nullFirst deaths
entryKillsnumber | nullEntry kills
tradeKillsnumber | nullTrade kills
adrnumber | nullAverage damage per round
roundsPlayednumber | nullRounds played
kastPercentnumber | nullKAST %
impactRatingnumber | nullImpact rating

Get leaderboard

Get a sorted leaderboard for a deathmatch session.

GET /api/v1/cs2/deathmatch/sessions/:sessionId/leaderboard

Scope: servers:read

Query parameters

ParameterTypeDefaultDescription
sortBystringkillskills, kd, headshots, damage, kpm
curl -X GET "https://api.sweathost.com/api/v1/cs2/deathmatch/sessions/SESSION_ID/leaderboard?sortBy=kills" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "sessionId": "uuid",
  "sortBy": "kills",
  "players": [
    {
      "steamId": "76561198000000001",
      "name": "Player1",
      "kills": 42,
      "deaths": 10,
      "headshots": 18,
      "damageDealt": 5200,
      "kdRatio": 4.2,
      "kpm": 2.8
    }
  ]
}

Players are sorted descending by the sortBy field.

On this page