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

## Access

**Base URL:** `https://api.beta.paywithlocus.com/api/wrapped/credits/hltv/`
**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 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/credits/hltv/get-cct-tournaments \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/hltv/get-fantasy-info \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/hltv/get-fantasy-leaderboard \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/hltv/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 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/credits/hltv/get-player-stats \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/hltv/get-results \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/hltv/get-team-rankings \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/hltv/get-team-stats \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/hltv/get-upcoming-matches \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"filter_cct":"<boolean>"}'
```

## Next steps

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