# NBA odds API for nightly spreads, totals and moneylines

GetOdds serves NBA spreads, totals and moneylines from DraftKings, FanDuel's native NBA markets and BetRivers Pennsylvania, with capture timestamps on every price. NBA lines move most in the hours before tip-off as injury reports land, so the API lets you request only quotes observed in the last 15 minutes and fetch just the rows that changed.

Canonical page: https://getoddsapi.com/nba-odds-api

**Price.** Free development allowance: 1,000 requests per UTC day and 60 per minute per account, with no payment step. Paid: the Developer Bundle at $149 per month, with 10,000 monthly requests or credits on each of four sources.

## Free API key

Get a free GetOdds API key: **1,000 requests per UTC day and 60 per minute, no card**. One key covers REST and the hosted MCP server.

Sign up: https://getoddsapi.com/sign-up?ref=ai-claudebot

## Quickstart

1. Create an account at https://getoddsapi.com/sign-up?ref=ai-claudebot, open https://getoddsapi.com/dashboard and issue a key with the sources you need (draftkings, fanduel, betrivers, prizepicks or underdog). Keep it in a server environment variable named GETODDS_API_KEY.
2. Read current DraftKings NBA spreads with curl:

```bash
curl --fail-with-body "https://getoddsapi.com/api/v1/odds?sport=NBA&market=spread&fresh_only=true&limit=50" \
  -H "Authorization: Bearer $GETODDS_API_KEY"
```

3. The same request in Python (standard library only):

```python
import json, os, urllib.request

req = urllib.request.Request(
    "https://getoddsapi.com/api/v1/odds?sport=NBA&market=spread&fresh_only=true&limit=50",
    headers={"Authorization": "Bearer " + os.environ["GETODDS_API_KEY"]},
)
with urllib.request.urlopen(req) as res:
    rows = json.load(res)["data"]
for row in rows:
    print(row["away"], "at", row["home"], row["side"], row["line"], row["american"], row["observed_at"])
```

4. Check `observed_at`, `age_seconds` and `stale` on every row before using a price. Full reference: https://getoddsapi.com/docs

## Use with Claude (MCP)

```bash
claude mcp add --transport http getodds https://getoddsapi.com/api/mcp \
  --header "Authorization: Bearer $GETODDS_API_KEY"
```

The MCP tools follow the key's source grants and share its allowance. Setup guide: https://getoddsapi.com/use-with-claude

## Pricing

| Plan | Allowance | Price |
| --- | --- | --- |
| Free key | 1,000 requests a day, 60 a minute | $0, no card |
| Developer Bundle | 10,000 requests or credits a month on each of four sources | $149 a month |

Free development allowance: 1,000 requests per UTC day and 60 per minute per account, with no payment step. Paid: the Developer Bundle at $149 per month, with 10,000 monthly requests or credits on each of four sources.
Details: https://getoddsapi.com/bundle

## Facts

- **Sportsbooks:** DraftKings, FanDuel, BetRivers
- **Markets:** Spread, total, moneyline
- **Arbitrage feed:** Moneylines, spreads, totals
- **Free tier:** 1,000 requests a day

## Read tonight's NBA board

Create an account at /sign-up, open /dashboard and issue a key with the source grants you need (draftkings, fanduel, betrivers, prizepicks or underdog). Keep the key in a server environment variable named GETODDS_API_KEY and send it as a bearer token. Never put it in a URL or in browser code.

An NBA night rarely exceeds 15 games, so one request with limit=200 usually returns the whole DraftKings slate for all three markets. Check pagination.has_more anyway.

```bash
curl --fail-with-body "https://getoddsapi.com/api/v1/odds?sport=NBA&fresh_only=true&limit=200" \
  -H "Authorization: Bearer $GETODDS_API_KEY"
```

## React to injury news without re-reading everything

Late scratches move NBA totals and spreads fast. /api/v1/dropping-odds returns same-line prices that fell by at least min_drop_pct (default 1, minimum 0.1) in the retained window. Polling it every few minutes is a cheap way to surface steam without downloading the board each time. A drop is an observation, not a recommendation.

```javascript
const res = await fetch(
  "https://getoddsapi.com/api/v1/dropping-odds?sport=NBA&min_drop_pct=3&limit=50",
  { headers: { Authorization: `Bearer ${process.env.GETODDS_API_KEY}` }, signal: AbortSignal.timeout(20000) }
);
if (!res.ok) throw new Error(`GetOdds HTTP ${res.status}`);
const { data } = await res.json();
for (const row of data) console.log(row.event_id, row.market, row.side, row.line, row.previous_decimal, "->", row.decimal, Number(row.drop_pct).toFixed(1) + "%");
```

## Two-book NBA comparisons

The NBA is the best-supported league for cross-book analysis here. Basketball moneylines have exactly two outcomes because overtime decides every game, so /api/v1/arbitrage-bets and /api/v1/value-bets evaluate NBA moneylines as well as half-point spreads and totals between DraftKings and FanDuel. Both books must be granted to the key and selected on the account.

```bash
curl --fail-with-body "https://getoddsapi.com/api/v1/value-bets?league=NBA&event_match=bounded_time&bookmaker=draftkings&min_edge_percent=1" \
  -H "Authorization: Bearer $GETODDS_API_KEY"
```

## BetRivers NBA markets

BetRivers league views return the offers the native list endpoint supplies, which is a partial board. Take a returned event.id and request it as event_id to see that game's full native market list, including player markets with BetRivers participant IDs.

```bash
curl --fail-with-body "https://getoddsapi.com/api/v1/betrivers/markets?league=NBA&limit=50" \
  -H "Authorization: Bearer $GETODDS_API_KEY"

curl --fail-with-body "https://getoddsapi.com/api/v1/betrivers/markets?event_id=BETRIVERS_EVENT_ID&limit=100" \
  -H "Authorization: Bearer $GETODDS_API_KEY"
```

## FAQ

### Does the NBA odds API include player props?

BetRivers NBA event detail includes native player markets. Pick'em player lines from PrizePicks, Underdog, Pick6 and FanDuel come from /api/v1/markets. DraftKings sportsbook player props are not included.

### How quickly do NBA prices update?

Each row reports observed_at and age_seconds. Rows older than 900 seconds are flagged stale. The WebSocket stream checks for retained DraftKings changes every five seconds.

### Can I get NBA first-half or quarter lines?

The period field shows which period each stored DraftKings offer covers; use /api/v1/market-types to see the market and period combinations currently stored. The arbitrage feed only uses full-game markets.

### Is college basketball included?

Yes. Use sport=NCAAB on DraftKings and league=NCAAB on FanDuel.

---

GetOdds is an independent developer product and is not affiliated with any sportsbook or pick’em operator. Prices describe data, not betting advice.
