# Coolbet — 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 sports betting data from Coolbet, including live and upcoming events, betting markets, odds, popular event recommendations, and active promotions. Browse the full sports navigation tree organized by sport, region, and league.

**Category:** Sports | **Website:** [coolbet.ee/](https://coolbet.ee/) | **Docs:** [parse.bot/marketplace/b560c96b-5664-4bbd-91e5-2b90259302a4/coolbet-ee-api](https://parse.bot/marketplace/b560c96b-5664-4bbd-91e5-2b90259302a4/coolbet-ee-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/coolbet/`
**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 event details

Fetch full details and all markets/odds for a single event by match ID. Returns match metadata, market groups (foGroups), and all available markets with outcomes. If no match_id is provided, automatically fetches details for a popular event from recommendations.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `match_id` | integer | No | Match/event ID obtained from get_events_by_category, get_live_events, or get_recommendations results. If omitted, a popular event is auto-selected from recommendations. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/coolbet/get-event-details \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"match_id":"<integer>"}'
```

### Get events by category

Fetch matches/events for a specific category ID from the sports tree. Returns league category objects each containing their matches with summary markets and odds. Category IDs are obtained from the sports tree leaf nodes.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category_id` | integer | Yes | Category ID from the sports tree leaf nodes (e.g. 18975 for Premier League, 19104 for La Liga, 18925 for Premium Liiga). |
| `limit` | integer | No | Maximum number of events to return. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/coolbet/get-events-by-category \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"category_id":"<integer>","limit":"<integer>"}'
```

### Get live events

Fetch all currently live/in-play events with their markets and odds. Returns categories containing live matches grouped by league. May return an empty categories array when no events are live. Offset-based manual pagination.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Maximum number of events to return. |
| `offset` | integer | No | Pagination offset for live events. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/coolbet/get-live-events \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","offset":"<integer>"}'
```

### Get promotions

Retrieve active promotions and bonus offers available publicly on Coolbet. Returns campaign details including bonus type, promotional codes, validity periods, and localized descriptions.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/coolbet/get-promotions \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get recommendations

Fetch recommended/popular events with their odds, sorted by popularity. Returns matches with summary markets and a mapping of market type definitions per league category.

**Estimated cost:** Metered

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

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/coolbet/get-recommendations \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>"}'
```

### Get sports tree

Retrieve the full sports navigation tree with categories and subcategories. Returns a hierarchical tree rooted at a single node with nested children representing sports, regions, and leagues. Each leaf node has an id usable as category_id in get_events_by_category.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/coolbet/get-sports-tree \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

## 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.