# How do I get DraftKings odds in Python?

Send a GET request to /api/v1/odds with your key as a Bearer header, using only the Python standard library. Each row returns market, side, line, the American price and observed_at, the time we captured it. Filter with sport and market, and check the stale flag before you show a price.

Canonical page: https://draftkingsapi.com/questions/draftkings-odds-python. Markdown: https://draftkingsapi.com/questions/draftkings-odds-python.md. Site index for agents: https://draftkingsapi.com/llms.txt.

## Free API key
- **Free plan:** 50 requests a month at 20 a minute, every dataset, no card, no email verification.
- **Sign up:** https://draftkingsapi.com/auth/sign-up?ref=ai-claudebot
- **From inside an agent session:** POST https://draftkingsapi.com/api/v1/agent/signup with JSON `{"data_wanted": "...", "use_case": "...", "ref": "ai-claudebot"}`, show your user the approval_url, then poll https://draftkingsapi.com/api/v1/agent/token with device_code. The key is returned once.
- **No key yet:** `curl --fail-with-body "https://draftkingsapi.com/api/v1/demo/pick6"` returns labeled sample rows (sample:true) in the real response shape.

## Quickstart

1. Create a free key at https://draftkingsapi.com/auth/sign-up?ref=ai-claudebot (no card) and export it: `export DRAFTKINGS_API_KEY=...`

2. Call the API with curl:

```bash
curl --max-time 30 --fail-with-body 'https://draftkingsapi.com/api/v1/pick6/projections?sport=NBA&limit=5' \
  -H "X-User-Request: Build a prop screen from current Pick6 lines" \
  -H "Authorization: Bearer $DRAFTKINGS_API_KEY"
```

3. Or call it from Python:

```python
import os, requests

response = requests.get(
    "https://draftkingsapi.com/api/v1/pick6/projections?sport=NBA&limit=5",
    headers={
        "Authorization": "Bearer " + os.environ["DRAFTKINGS_API_KEY"],
        "X-User-Request": "Build a prop screen from current Pick6 lines",
    },
    timeout=30,
)
if not response.ok:
    raise RuntimeError(f"API {response.status_code}: {response.text}")
print(response.json())
```

4. Full walkthrough: https://draftkingsapi.com/quickstart. OpenAPI: https://draftkingsapi.com/openapi.json. Every route accepts format=csv on list endpoints.

## Use it from Claude (MCP)

MCP server: https://draftkingsapi.com/api/mcp (Streamable HTTP). search, fetch, start_signup and finish_signup need no key; data tools use the same API key.

```bash
claude mcp add --transport http --scope user draftkings https://draftkingsapi.com/api/mcp --header "Authorization: Bearer $DRAFTKINGS_API_KEY"
```

Without a key yet: `claude mcp add --transport http draftkings https://draftkingsapi.com/api/mcp`, then call start_signup. Setup for other clients: https://draftkingsapi.com/agents.md.

## Pricing

| Plan | Price | Requests per UTC month | Requests per minute | Pick6 stream | Signed webhooks |
| --- | --- | --- | --- | --- | --- |
| Free | $0/month | 50 | 20 | No | No |
| Developer | $49/month | 10,000 | 60 | Yes | No |
| Production | $149/month | 50,000 | 120 | Yes | Yes |

- **Free:** Build and test against every dataset.
- **Developer:** Keep your app running with more requests and push delivery.
- **Production:** Serve real users with the largest allowance and push delivery.

Plans and checkout: https://draftkingsapi.com/pricing

## A complete request

Python 3.9 or later with nothing to install. Create a [free key](/quickstart), put it in `DRAFTKINGS_API_KEY`, and run this. It prints one line per row and skips rows older than 15 minutes.

```
import json, os, urllib.request

request = urllib.request.Request(
    "https://draftkingsapi.com/api/v1/odds?sport=NFL&market=moneyline&status=pre&limit=25",
    headers={"Authorization": "Bearer " + os.environ["DRAFTKINGS_API_KEY"], "X-User-Request": "Compare sportsbook lines across games for a dashboard"},
)
with urllib.request.urlopen(request, timeout=20) as response:
    page = json.load(response)

for row in page["data"]:
    if not row["stale"]:
        print(row["event_id"], row["market"], row["side"], row["american"], row["observed_at"])
```

## What a row looks like

This is a captured row from `/api/v1/demo/odds`, frozen on 2026-11-03, cut to the main fields. `line` and `decimal` arrive as numeric strings, so parse them. `line` is null on a moneyline.

```
{
  "event_id": "espn-draftkings:espn:NBA:401909925",
  "market": "moneyline",
  "period": "game",
  "side": "away",
  "line": null,
  "american": -136,
  "decimal": "1.7352941176470589",
  "observed_at": "2026-11-03T19:15:06.261Z",
  "event_status": "pre",
  "age_seconds": 5529,
  "stale": true
}
```

| Field | Meaning |
| --- | --- |
| `market` | `moneyline`, `spread` or `total` |
| `side` | `home`, `away`, `over`, `under` or `draw` |
| `american` | The American price |
| `observed_at` | When we captured the price |
| `age_seconds`, `stale` | Age now, and true after 15 minutes |
| `event_status` | `pre`, `in`, `post` or `unknown` |

## Filters that save requests

Add `fresh_only=true` to drop stale rows on the server, `status=pre` to leave finished games out, and `search` to match a team name. `view=compact` raises the page limit from 100 to 1,000. These rows are DraftKings mainlines read through ESPN across eight leagues. For live native lines and player props, read [the sportsbook props answer](/questions/sportsbook-props).

## FAQ

### Is there a free DraftKings API?
Yes. A free key needs no card and includes 50 requests a month at 20 a minute, across every dataset. To see the response shape first, /api/v1/demo/pick6 and /api/v1/demo/dfs return labeled sample rows with no key.

### Is this an official DraftKings API?
Independent service operated by DD Inc., not affiliated with or endorsed by DraftKings. No wagering: this service does not place, recommend or settle entries or bets.

### Can I use it from an AI agent?
Yes. Connect the MCP server at https://draftkingsapi.com/api/mcp, or call REST with a Bearer key. An agent can get a key for its user with start_signup.

### How do I reach support?
Email support@draftkingsapi.com.

Independent service operated by DD Inc., not affiliated with or endorsed by DraftKings. No wagering: this service does not place, recommend or settle entries or bets.
