# Csstats (Guernsey) — 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.

> Access Counter-Strike 2 player statistics, match history, and leaderboard rankings from csstats.gg. Search players by Steam ID or name, retrieve detailed performance metrics and recent match results, explore scoreboard data, view played-with history, and check global ban statistics.

**Category:** Sports | **Website:** [csstats.gg/](https://csstats.gg/) | **Docs:** [parse.bot/marketplace/415d0bd9-9a9b-43ee-bf1b-ed12d76bb9fe/csstats-gg-api](https://parse.bot/marketplace/415d0bd9-9a9b-43ee-bf1b-ed12d76bb9fe/csstats-gg-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-gg-api-415d0bd9/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_ban_stats

Get global VAC and game ban statistics for the past 30 days. Returns the total number of bans detected across all tracked players.

**Estimated cost:** Metered

_No parameters required._

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

### get_leaderboard

Get current leaderboards for a specific game mode. Returns an object with an array of top players with rank, name, Steam ID, and elo rating. The premier mode is the default and most popular.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `mode` | string | No | Leaderboard mode: premier, wingman |

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

### get_match_scoreboard

Fetch the full scoreboard for a specific match. Returns two teams with player names, Steam IDs, kills, deaths, assists, and ratings. Standard matches contain 5 players per team.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `match_id` | string | Yes | Match ID (numeric string, obtainable from get_player_matches results) |

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

### get_player_matches

Get recent matches for a player. Returns an object containing an array of match objects with date, map, score, and individual performance stats. Matches are ordered most recent first.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `steam_id` | string | Yes | 64-bit Steam ID (17-digit numeric string, e.g. 76561198034202275) |

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

### get_player_played_with

Retrieve statistics for players who have played with or against a given player.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `offset` | integer | No | Pagination offset |
| `steam_id` | string | Yes | 64-bit Steam ID (17-digit numeric string) |

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

### get_player_stats

Fetch overall player statistics including K/D, HLTV Rating, Win Rate, HS%, ADR, and other overview stats for a given player. Stats are extracted from the player's profile page and include aggregated career data.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `steam_id` | string | Yes | 64-bit Steam ID (17-digit numeric string, e.g. 76561198034202275) |

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

### search_player

Search for a player by Steam ID, name, or profile URL. When a 17-digit Steam ID is provided, returns the resolved profile URL directly. Name-based queries resolve via the site's search form and may return multiple matching players.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Steam ID (17-digit numeric), player name, or Steam profile URL |

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