# Sportsbook API for DraftKings, FanDuel and BetRivers prices

GetOdds is a sportsbook API that returns moneyline, spread and total prices from DraftKings, native FanDuel game and futures markets, and BetRivers Pennsylvania markets through one REST key. Every row keeps the sportsbook's own IDs and the time the price was observed, so you can tell a fresh quote from a stale one before you show it.

Canonical page: https://getoddsapi.com/sportsbook-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
- **Leagues:** NFL, NBA, NHL, NCAAF, NCAAB, EPL, MLS
- **Delivery:** REST, WebSocket, MCP
- **Auth:** Bearer API key

## Which sportsbooks and markets the API covers

Three sportsbooks are live today. Each has its own endpoint because each source publishes a different contract: DraftKings prices arrive as normalized moneyline, spread and total rows; FanDuel and BetRivers keep their native market and selection structure, including market types we do not flatten. You choose which books your account reads, and each key only sees the sources it was granted.

Coverage is deliberately narrower than aggregators that list dozens of books. If you need Pinnacle, offshore or European books, GetOdds is not the right tool today. If you need the two largest US books plus a third regulated book with honest timestamps, it is.

| Sportsbook | Leagues | Markets | Endpoint |
| --- | --- | --- | --- |
| DraftKings (prices observed through ESPN) | NFL, NBA, NHL, NCAAF, NCAAB, EPL, MLS | Moneyline, spread, total | /api/v1/odds |
| FanDuel (native New Jersey feed) | NFL, NBA, NHL, NCAAF, NCAAB | Native game markets and futures | /api/v1/sportsbook/markets, /api/v1/outrights/odds |
| BetRivers (Pennsylvania, Kambi feed) | NBA, NFL, NHL | Native pregame markets, including player markets | /api/v1/betrivers/markets |

## Make your first sportsbook request

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.

The first call below lists the leagues with stored DraftKings events. The second returns current NBA spread prices captured within the last 15 minutes. fresh_only=true drops anything older, so an empty page means there was nothing recent to return rather than an error.

```bash
curl --fail-with-body "https://getoddsapi.com/api/v1/leagues?upcoming_only=true" \
  -H "Authorization: Bearer $GETODDS_API_KEY"

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"
```

## Add FanDuel and BetRivers to the same account

Accounts start with DraftKings selected. Select FanDuel and BetRivers once with the PUT call below, using a key that was granted those sources. After that, FanDuel game markets come from /api/v1/sportsbook/markets and BetRivers markets from /api/v1/betrivers/markets. Selection calls use the request allowance but no data credits.

```bash
# DraftKings is selected by default. FanDuel and BetRivers must be selected once per account.
curl --fail-with-body -X PUT \
  "https://getoddsapi.com/api/v1/bookmakers/selected/select?bookmakers=draftkings,fanduel,betrivers" \
  -H "Authorization: Bearer $GETODDS_API_KEY"

curl --fail-with-body "https://getoddsapi.com/api/v1/sportsbook/markets?league=NFL&status=open&limit=50" \
  -H "Authorization: Bearer $GETODDS_API_KEY"

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

## What a DraftKings odds row contains

Each row is one side of one market. A spread game produces a home row and an away row; a total produces over and under. Join the two sides on event_id, market, period and line before computing hold or a no-vig price.

| Field | Meaning |
| --- | --- |
| id, event_id | Source-native offer and event IDs, for example espn-draftkings:espn:NBA:401909287 |
| sport | League code: NFL, NBA, NHL, NCAAF, NCAAB, MLB, EPL or MLS |
| home, away, starts_at | Teams and scheduled start (UTC ISO 8601) |
| market, period, side | moneyline, spread or total; the period; home, away, draw, over or under |
| line | Spread or total number; null on a moneyline |
| american, decimal | The recorded price in both formats |
| observed_at, age_seconds, stale | When the price was captured, its age, and whether it is older than 900 seconds |

## What the API does not claim

Prices are recorded observations, not guaranteed executable bets. A sportsbook can move or pull a line between our capture and your request. Source IDs are native to each sportsbook; we do not invent a universal event ID, and a separate /api/v1/mappings route only links DraftKings and FanDuel events when both stores agree on teams and start time. Settlement results are provisional calculations from final scores, not official sportsbook grading.

## FAQ

### Which sportsbooks does the GetOdds sportsbook API include?

DraftKings, FanDuel and BetRivers Pennsylvania. DraftKings covers NFL, NBA, NHL, NCAAF, NCAAB, EPL and MLS moneylines, spreads and totals. FanDuel covers native game markets and futures for the major US leagues. BetRivers covers NBA, NFL and NHL pregame markets.

### Is there a free sportsbook API tier?

Yes. Every account gets a development allowance of 1,000 requests per UTC day and 60 per minute, shared across its keys. A successful data read uses one credit; failed reads use none.

### Does the API include Pinnacle or offshore books?

No. GetOdds does not carry Pinnacle, offshore or European sportsbooks. Use a broader aggregator if your model needs a sharp reference book.

### How fresh are the prices?

Each row carries observed_at and age_seconds. DraftKings rows older than 900 seconds are flagged stale, and fresh_only=true excludes them. FanDuel markets record changed_at and observed_at separately.

### Can I stream sportsbook odds instead of polling?

Yes for DraftKings. wss://getoddsapi.com/api/v1/odds/stream pushes retained price changes with sequence checkpoints. FanDuel and BetRivers are REST reads.

---

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