# HLTV — Wrapped API

> **You are on:** `https://api.beta.paywithlocus.com/api` | [llms.txt](https://beta.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 esports data from HLTV.org including match results, player and team statistics, team rankings, upcoming match schedules, tournament information, and fantasy league data.

**Category:** Sports | **Website:** [hltv.org/](https://hltv.org/) | **Docs:** [parse.bot/marketplace/b392d518-21a4-4ad2-b311-3872d34d62d6/hltv-org-api](https://parse.bot/marketplace/b392d518-21a4-4ad2-b311-3872d34d62d6/hltv-org-api)

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

## Access

**Base URL:** `https://api.beta.paywithlocus.com/api/wrapped/parse-hltv-org-api-b392d518/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### Get cct tournaments

List CCT-series tournaments from the HLTV events page, including ongoing and upcoming events. Returns event names, URLs, and dates.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/parse-hltv-org-api-b392d518/get_cct_tournaments \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get fantasy info

Get comprehensive fantasy league overview with current season info and all available events. Each event includes its state (finished, live, upcoming), participating teams, and the winner if finished.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/parse-hltv-org-api-b392d518/get_fantasy_info \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get fantasy leaderboard

Retrieve top 10 leaderboard for a specific fantasy event from the HLTV public league. Returns player rankings with detailed point breakdowns (role, boost, player, team points).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `fantasy_id` | string | Yes | The fantasy event ID (numeric string from get_fantasy_info events[*].fantasy_id). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/parse-hltv-org-api-b392d518/get_fantasy_leaderboard \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"fantasy_id":"<string>"}'
```

### Get match details

Get detailed information for a specific completed match including teams, map scores, and per-map player performance stats. Falls back to the main match page if the stats sub-page is unavailable.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `match_id` | string | Yes | The HLTV match ID (numeric string, e.g. '2395078'). |

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

### Get player stats

Retrieve player statistics for a given time window. Returns all players sorted by rating descending. The time window is defined by the days parameter counting backward from today.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `days` | integer | No | Number of days to look back for stats. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/parse-hltv-org-api-b392d518/get_player_stats \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"days":"<integer>"}'
```

### Get results

Fetch recent match results from HLTV in reverse chronological order. Each result includes the two teams, final score, event name, and a direct URL. No server-side pagination; limit caps the number of items returned from the single results page.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Maximum number of results to return. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/parse-hltv-org-api-b392d518/get_results \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>"}'
```

### Get team rankings

Get current HLTV world team rankings. Returns all ranked teams with position, name, and points. Rankings update weekly.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/parse-hltv-org-api-b392d518/get_team_rankings \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get team stats

Retrieve team statistics for a given time window. Returns all teams sorted by rating descending. The time window is defined by the days parameter counting backward from today.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `days` | integer | No | Number of days to look back for stats. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/parse-hltv-org-api-b392d518/get_team_stats \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"days":"<integer>"}'
```

### Get upcoming matches

Get upcoming and live match schedule. Returns all scheduled matches from the HLTV matches page. Optionally filter to CCT-series tournaments only.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `filter_cct` | boolean | No | If true, only return matches belonging to CCT-series tournaments. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/parse-hltv-org-api-b392d518/get_upcoming_matches \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"filter_cct":"<boolean>"}'
```
