# 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 for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/credits/csstats/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## 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/credits/csstats/get-ban-stats \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/csstats/get-leaderboard \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/csstats/get-match-details \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/csstats/get-player-matches \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/csstats/get-player-played-with \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/csstats/get-player-profile \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/csstats/get-round-history \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/csstats/search-player \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://paywithlocus.com/agent/index.md): every Locus agent page.