# Coolbet — 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 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. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-coolbet-ee-api-b560c96b/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## 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.paywithlocus.com/api/wrapped/parse-coolbet-ee-api-b560c96b/get_event_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-coolbet-ee-api-b560c96b/get_events_by_category \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-coolbet-ee-api-b560c96b/get_live_events \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-coolbet-ee-api-b560c96b/get_promotions \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-coolbet-ee-api-b560c96b/get_recommendations \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-coolbet-ee-api-b560c96b/get_sports_tree \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```
