# A sports betting API for odds, player lines and betting analysis

GetOdds is a sports betting API that combines sportsbook prices (DraftKings, FanDuel, BetRivers), pick'em player lines (PrizePicks, Underdog, DraftKings Pick6, FanDuel), seven days of line history, conditional arbitrage and value feeds, and final-score evidence for grading. One key reads all of them, scoped to the sources you grant it.

Canonical page: https://getoddsapi.com/sports-betting-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

- **Price sources:** DraftKings, FanDuel, BetRivers
- **Player-line sources:** PrizePicks, Underdog, Pick6, FanDuel
- **History:** 7-day line changes, retained archive
- **Agents:** Hosted MCP server

## What you can build with it

A betting product usually needs four kinds of data, and they rarely come from the same place. GetOdds keeps them in one account so the identities and timestamps line up.

| Need | Endpoint | Notes |
| --- | --- | --- |
| Current sportsbook prices | /api/v1/odds, /api/v1/sportsbook/markets, /api/v1/betrivers/markets | One endpoint per book; native IDs preserved |
| Pick'em player lines | /api/v1/markets?source=prizepicks | Also underdog, draftkings (Pick6) and fanduel. Lines, not odds |
| Line movement | /api/v1/history, /api/v1/odds/replay, /api/v1/dropping-odds | History needs an event_id or offer_id; 7-day window |
| Cross-book analysis | /api/v1/arbitrage-bets, /api/v1/value-bets | DraftKings vs FanDuel; NFL, NBA, NCAAF, NCAAB |
| Results | /api/v1/events/{id}/result, /api/v1/settlements/grade | Provisional grading from verified final scores |

## Read sportsbook prices and pick'em lines with one key

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 Python script below uses only the standard library. It reads FanDuel pick'em player lines and DraftKings NFL totals in two bounded requests and prints how many rows each returned. Pick'em rows have a line and odds set to null, because a pick'em line is not a sportsbook price; keep the two apart in your schema.

```python
import json, os
from urllib.request import Request, urlopen

KEY = os.environ["GETODDS_API_KEY"]
BASE = "https://getoddsapi.com/api/v1"

def get(path):
    req = Request(BASE + path, headers={"Authorization": f"Bearer {KEY}", "Accept": "application/json"})
    with urlopen(req, timeout=20) as res:
        return json.load(res)

lines = get("/markets?source=fanduel&limit=25")      # player lines, odds is null
totals = get("/odds?sport=NFL&market=total&fresh_only=true&limit=50")

print("player lines:", len(lines["data"]), "observed", lines["meta"]["observed_at"])
for row in totals["data"][:6]:
    print(row["away"], "@", row["home"], row["side"], row["line"], row["american"], f'{row["age_seconds"]}s old')
```

## Built for honest numbers

Betting data fails quietly. A cached price looks live, an empty board looks like no games, and a computed edge looks like a guarantee. GetOdds returns errors instead of empty successes when a source is down, flags rows older than 15 minutes, and labels every derived number with the assumptions behind it. Arbitrage rows, for example, carry the policy completed-normal-game-v1 and guaranteed_profit=false.

## FAQ

### What is a sports betting API?

A sports betting API returns machine-readable betting data such as sportsbook odds, player prop lines, line history and results, so software can display, compare or model it. GetOdds serves that data over REST, WebSocket and MCP.

### Does GetOdds let me place bets?

No. It is a read-only data API. It does not accept wagers, connect to sportsbook accounts or provide picks.

### Which leagues are supported?

Sportsbook prices cover NFL, NBA, NHL, college football and basketball, and EPL and MLS on DraftKings. Pick'em lines follow whatever each operator posts.

### How much does it cost?

Development use is free up to 1,000 requests per UTC day and 60 per minute. The Developer Bundle is $149 per month.

---

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