SweatHost
HTTP API Reference

Matches

HTTP API reference for CS2 series and match data

Matches API

Access CS2 series (e.g. BO3) and individual maps (matches). All endpoints are organization-scoped.

Base path: /api/v1/cs2


List series

GET /api/v1/cs2/series

Scope: servers:read

Query parameters

ParameterTypeDefaultDescription
pagenumber1Page number
pageSizenumber20Items per page (max 100)
statusstringlive, finished, upcoming, cancelled
serverIdstringFilter by server ID
dateFromstringISO 8601 start date
dateTostringISO 8601 end date
curl -X GET "https://api.sweathost.com/api/v1/cs2/series?status=finished&page=1&pageSize=10" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "page": 1,
  "pageSize": 10,
  "total": 5,
  "items": [
    {
      "id": "uuid",
      "seriesId": "SERIES-2026-001",
      "serverId": "uuid",
      "serverName": "My CS2 Server",
      "format": "bo3",
      "team1Name": "Alpha",
      "team2Name": "Beta",
      "team1MapsWon": 2,
      "team2MapsWon": 1,
      "status": "finished",
      "gameMode": "competitive",
      "startedAt": "2026-03-12T10:00:00.000Z",
      "finishedAt": "2026-03-12T12:00:00.000Z",
      "duration": 7200,
      "winnerTeam": "Alpha",
      "maps": [
        { "id": "uuid", "mapNumber": 1, "mapName": "de_dust2", "status": "finished" }
      ]
    }
  ]
}

Get series

GET /api/v1/cs2/series/:seriesId

Scope: servers:read

curl -X GET "https://api.sweathost.com/api/v1/cs2/series/SERIES_ID" \
  -H "Authorization: Bearer YOUR_API_KEY"

Returns series detail with full maps array including round scores and player counts.


List series by server

GET /api/v1/cs2/servers/:serverId/series

Scope: servers:read

curl -X GET "https://api.sweathost.com/api/v1/cs2/servers/SERVER_ID/series" \
  -H "Authorization: Bearer YOUR_API_KEY"

List matches (maps)

GET /api/v1/cs2/matches

Scope: servers:read

Query parameters

ParameterTypeDefaultDescription
pagenumber1Page number
pageSizenumber20Items per page (max: 100)
limitnumberAlias for pageSize
mapstringFilter by map name (e.g. de_dust2)
statusstringFilter by status
serverIdstringFilter by server ID
dateFromstringISO 8601 start date
dateTostringISO 8601 end date
curl -X GET "https://api.sweathost.com/api/v1/cs2/matches?map=de_dust2&status=finished" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response item fields

FieldTypeDescription
idstringMap (match) ID — use for get and getStats
serverIdstringServer ID
serverNamestringServer name
mapstringMap name
gameModestringGame mode
team1Namestring | nullTeam 1 name
team2Namestring | nullTeam 2 name
team1ScorenumberTeam 1 round score
team2ScorenumberTeam 2 round score
statusstringe.g. finished, live
startedAtstringISO 8601
finishedAtstring | nullISO 8601
durationnumber | nullSeconds
playerCountnumberPlayer count

Get match

GET /api/v1/cs2/matches/:mapId

Scope: servers:read

curl -X GET "https://api.sweathost.com/api/v1/cs2/matches/MAP_UUID" \
  -H "Authorization: Bearer YOUR_API_KEY"

Returns match metadata plus players array with per-player stats.


Get match events

Timeline events for a match (kills, round ends, etc.).

GET /api/v1/cs2/matches/:mapId/events

Scope: servers:read

Query parameters

ParameterTypeDefaultDescription
afterSeqnumber0Return events after this sequence number (for polling)
limitnumber100Max events to return
curl -X GET "https://api.sweathost.com/api/v1/cs2/matches/MAP_UUID/events?limit=50" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "mapId": "uuid",
  "afterSeq": 0,
  "limit": 50,
  "nextAfterSeq": 42,
  "items": [
    { ... }
  ]
}

Use nextAfterSeq as afterSeq in subsequent requests to poll for new events.


Get match leaderboard

Betting-friendly per-player leaderboard with utility and weapon breakdowns.

GET /api/v1/cs2/matches/:mapId/leaderboard

Scope: servers:read

Query parameters

ParameterTypeDefaultDescription
sortBystringkillskills, damage, headshots, accuracy, utility, plants, defuses
limitnumber10Max players to return (max 32)
curl -X GET "https://api.sweathost.com/api/v1/cs2/matches/MAP_UUID/leaderboard?sortBy=kills&limit=10" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "mapId": "uuid",
  "seriesId": "SERIES-2026-001",
  "mapNumber": 1,
  "mapName": "de_dust2",
  "status": "finished",
  "startedAt": "2026-03-12T10:00:00.000Z",
  "finishedAt": "2026-03-12T10:45:00.000Z",
  "players": [
    {
      "name": "Player1",
      "team": 2,
      "kills": 28,
      "deaths": 15,
      "assists": 4,
      "headshots": 12,
      "damageDealt": 3200,
      "bulletsFired": 420,
      "bulletsHit": 140,
      "accuracyPercent": 33.33,
      "utility": {
        "total": 15,
        "he": 3,
        "flash": 6,
        "smoke": 4,
        "molly": 2,
        "decoy": 0
      },
      "bombPlants": 2,
      "bombDefuses": 0,
      "topWeapon": {
        "weaponName": "weapon_ak47",
        "kills": 18
      }
    }
  ]
}

Map endpoints (aliases)

These are alternative endpoints that return the same data as the match endpoints above:

GET /api/v1/cs2/maps/:mapId          → same as GET /api/v1/cs2/matches/:mapId
GET /api/v1/cs2/maps/:mapId/events   → same as GET /api/v1/cs2/matches/:mapId/events
curl -X GET "https://api.sweathost.com/api/v1/cs2/maps/MAP_UUID" \
  -H "Authorization: Bearer YOUR_API_KEY"

On this page