# Draftkings — 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 data from Draftkings.com.

**Category:** Sports | **Website:** [draftkings.com/](https://draftkings.com/) | **Docs:** [parse.bot/marketplace/b9d147f9-49ce-4072-9e54-7aa671aa1e08/draftkings-com-api](https://parse.bot/marketplace/b9d147f9-49ce-4072-9e54-7aa671aa1e08/draftkings-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-draftkings-com-api-b9d147f9/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_league_navigation

Returns the navigation structure and available bet categories for a specific league. Shows available subcategories (game lines, player props, futures, etc.) with their IDs needed to query odds. Use the subcategoryId from the parameters field of results to query specific odds via get_league_odds.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `league_id` | string | No | League ID from get_sports_categories (e.g. 84240 for MLB, 94682 for WNBA, 42648 for NBA, 88808 for NFL, 42133 for NHL, 189706 for Golf/PGA Tour). |
| `template_id` | string | No | Template ID for the league page layout. If omitted, a known template is used for common leagues (MLB, WNBA, NBA, NFL, NHL, Golf). Obtain from get_sports_categories results for other leagues. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-draftkings-com-api-b9d147f9/get_league_navigation \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"league_id":"<string>","template_id":"<string>"}'
```

### get_league_odds

Returns current game odds for a specific league and subcategory. For team sports includes moneyline, spread/run line, and over/under totals for each scheduled game. For golf includes tournament winner futures, top 5/10 finishers, group winners, and head-to-head matchups depending on subcategory. Each game/event lists participants, start time, status, and all available market odds with American, decimal, and fractional formats.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `league_id` | string | No | League ID (e.g. 84240 for MLB, 94682 for WNBA, 42648 for NBA, 88808 for NFL, 42133 for NHL, 189706 for Golf/PGA Tour). Obtain from get_sports_categories. |
| `subcategory_id` | string | No | Subcategory ID for the bet type. If omitted, defaults to game lines for team sports (4519 for MLB, 4511 for basketball/football/hockey) or tournament futures for golf (4508). Obtain from get_league_navigation parameters. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-draftkings-com-api-b9d147f9/get_league_odds \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"league_id":"<string>","subcategory_id":"<string>"}'
```

### get_sports_categories

Lists all available sports and leagues from the DraftKings sportsbook manifest. Returns sport IDs, league IDs, sport names, league names, and template IDs. Use the league_id from results to query odds or navigation for a specific league.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-draftkings-com-api-b9d147f9/get_sports_categories \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```
