# API Public Docs Cs Prod Leetify — 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 CS2 player statistics, match history, and individual game performance data from Leetify's competitive database. Look up player profiles by Steam64 ID or Leetify user ID and retrieve comprehensive match details including per-round metrics and performance breakdowns.

**Category:** Sports | **Website:** [api-public-docs.cs-prod.leetify.com/](https://api-public-docs.cs-prod.leetify.com/) | **Docs:** [parse.bot/marketplace/56988d37-5025-4e3b-a799-a307235ba2f4/api-public-docs-cs-prod-leetify-com-api](https://parse.bot/marketplace/56988d37-5025-4e3b-a799-a307235ba2f4/api-public-docs-cs-prod-leetify-com-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-api-public-docs-cs-prod-leetify-com-api-56988d37/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_match_by_data_source

Retrieves detailed match data for all players in a match using a data source type and its specific match ID. An alternative to get_match_by_game_id when only the source-specific identifier is known. Returns the same full match data including team scores, map, and comprehensive per-player statistics.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `api_key` | string | No | Optional Leetify API key for authenticated access. |
| `data_source` | string | Yes | Data source type (e.g. 'matchmaking', 'faceit'). |
| `data_source_id` | string | Yes | Data source specific match ID (e.g. 'CSGO-unDnP-jd7LE-tBc3E-PMJve-PjNpP' for matchmaking). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-api-public-docs-cs-prod-leetify-com-api-56988d37/get_match_by_data_source \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"api_key":"<string>","data_source":"<string>","data_source_id":"<string>"}'
```

### get_match_by_game_id

Retrieves detailed match data for all players in a match using a Leetify game ID (UUID). Returns the full match including team scores, map, data source, and comprehensive per-player statistics for every participant (kills, deaths, accuracy, utility, trade performance, ratings).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `api_key` | string | No | Optional Leetify API key for authenticated access. |
| `game_id` | string | Yes | Leetify Game ID in UUID format. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-api-public-docs-cs-prod-leetify-com-api-56988d37/get_match_by_game_id \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"api_key":"<string>","game_id":"<string>"}'
```

### get_player_match_history

Retrieves a player's detailed match history including per-match stats for each game. At least one of steam64_id or id must be provided. Returns an object with a matches array, each entry containing team scores, map, data source, and the requesting player's detailed per-match statistics (kills, deaths, accuracy, utility usage, trade performance).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `api_key` | string | No | Optional Leetify API key for authenticated access. |
| `id` | string | No | Leetify User ID (UUID format). Either this or steam64_id must be provided. |
| `steam64_id` | string | No | Steam64 ID of the player (17-digit numeric string). Either this or id must be provided. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-api-public-docs-cs-prod-leetify-com-api-56988d37/get_player_match_history \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"api_key":"<string>","id":"<string>","steam64_id":"<string>"}'
```

### get_player_profile

Retrieves a player's full profile including stats, ranks, rating, recent matches, and recent teammates. At least one of steam64_id or id must be provided. Returns comprehensive player data: lifetime statistics (accuracy, reaction time, utility usage), current ranks across multiple systems (Premier, Faceit, Leetify), skill ratings by category (aim, positioning, utility, clutch, opening), recent match summaries, and recent teammates.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `api_key` | string | No | Optional Leetify API key for authenticated access. |
| `id` | string | No | Leetify User ID (UUID format). Either this or steam64_id must be provided. |
| `steam64_id` | string | No | Steam64 ID of the player (17-digit numeric string). Either this or id must be provided. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-api-public-docs-cs-prod-leetify-com-api-56988d37/get_player_profile \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"api_key":"<string>","id":"<string>","steam64_id":"<string>"}'
```

### validate_api_key

Validates the provided API key against the Leetify API. Returns whether the key is valid and a human-readable message. Useful as a connectivity check before making data calls.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `api_key` | string | Yes | The Leetify API key to validate. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-api-public-docs-cs-prod-leetify-com-api-56988d37/validate_api_key \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"api_key":"<string>"}'
```
