# Csstats — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Track Counter-Strike 2 player performance with detailed statistics, match history, and leaderboard rankings from csstats.gg. Search players, view their profiles, analyze individual matches, check ban records, and see who they've played with.

**Category:** Sports | **Website:** [csstats.org/](https://csstats.org/) | **Docs:** [parse.bot/marketplace/084b9bc7-d7b0-43b1-a218-2cd7b53ea935/csstats-org-api](https://parse.bot/marketplace/084b9bc7-d7b0-43b1-a218-2cd7b53ea935/csstats-org-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-csstats-org-api-084b9bc7/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_ban_stats

Retrieve global VAC and Game Ban statistics showing daily ban counts for the past 30 days. Each entry has a date (YYYY-MM-DD) and num (ban count as string).

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-csstats-org-api-084b9bc7/get_ban_stats \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_leaderboard

Retrieve the CS2 leaderboard. Only the 'premier' type is reliably supported and returns a ranked list of players with their rank, steam_id, and username.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `type` | string | No | Leaderboard type: premier |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-csstats-org-api-084b9bc7/get_leaderboard \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"type":"<string>"}'
```

### get_match_details

Retrieve details for a specific match, including heatmap data with kill/death/shot/damage coordinates and basic match info. Match IDs can be obtained from get_player_matches results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `match_id` | string | Yes | Match ID to retrieve details for (e.g. 139794175, from get_player_matches results) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-csstats-org-api-084b9bc7/get_match_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"match_id":"<string>"}'
```

### get_player_matches

Retrieve a list of recent match IDs for a player along with total match count. The matches array contains match_id and url for each match. Players without CS2 match data will return total_matches 0 and empty matches array.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `steam_id` | string | Yes | SteamID64 of the player (e.g. 76561198088771412) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-csstats-org-api-084b9bc7/get_player_matches \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"steam_id":"<string>"}'
```

### get_player_played_with

Retrieve the list of players that a given player has played with, along with shared stats.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `offset` | integer | No | Pagination offset |
| `steam_id` | string | Yes | Steam ID of the player |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-csstats-org-api-084b9bc7/get_player_played_with \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"offset":"<integer>","steam_id":"<string>"}'
```

### get_player_profile

Retrieve a player's full profile including overall stats, weapon stats, map stats, and rank history by SteamID64. Players without CS2 match data will return empty stats and rank_history.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `steam_id` | string | Yes | SteamID64 of the player (e.g. 76561198088771412) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-csstats-org-api-084b9bc7/get_player_profile \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"steam_id":"<string>"}'
```

### get_round_history

Retrieve the round-by-round win history for a specific player in a specific match. Returns each round's outcome (win/loss), the player's side (T/CT), running scores, and win reason. The player must have participated in the match.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `match_id` | string | Yes | Match ID to retrieve round history for (from get_player_matches results) |
| `steam_id` | string | Yes | SteamID64 of the player whose round history to extract |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-csstats-org-api-084b9bc7/get_round_history \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"match_id":"<string>","steam_id":"<string>"}'
```

### search_player

Search for a player by Steam ID, Steam Profile Link, or Custom Steam URL. Returns the player's full profile including stats, weapon stats, map stats, and rank history. The query is resolved to a SteamID64 and the full profile is fetched. Players without CS2 match data will return empty stats and rank_history.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Steam ID (e.g. 76561198088771412), Steam Profile Link, or Custom Steam URL |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-csstats-org-api-084b9bc7/search_player \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```
