# FanDuel API SDKs: Python, JavaScript and MCP packages

FanDuel API (https://fanduelapi.com) is an independent API for FanDuel Sportsbook data: every player prop and game market FanDuel lists in NBA, NFL, NHL, MLB, college basketball and college football, and soccer (the Premier League, La Liga, Serie A, the Bundesliga, Ligue 1, the Champions League, MLS and international matches), with every match market and yes-only player markets such as anytime goalscorer, shots, shots on target, assists and goalkeeper saves, normalized per player and stat with over and under prices in American and decimal odds, plus every line and price move with its timestamp, over REST, webhooks and MCP with one key. FanDuel API is an independent data service operated by Stunning Couches LLC. It is not affiliated with, endorsed by or sponsored by FanDuel.

Source page: https://fanduelapi.com/sdks (this is its markdown version, https://fanduelapi.com/sdks.md).

## Free offer

- Free plan: 100 credits a month, data delayed 5 minutes, no card. REST and MCP on every plan.
- Real-time data starts at Developer, $49 a month for 10,000 credits.
- Get a free key: https://fanduelapi.com/sign-up?ref=ai-claudebot

## Quickstart

1. Create a free account at https://fanduelapi.com/sign-up?ref=ai-claudebot and create an API key in the dashboard (https://fanduelapi.com/dashboard/keys). Keys start with `fd_`. Store it as `FANDUEL_API_KEY`.
2. Make a first call with curl:

```bash
curl "https://fanduelapi.com/api/v1/props?sport=nba&stat=points&limit=5" \
  -H "Authorization: Bearer $FANDUEL_API_KEY"
```

3. Or with Python (`pip install requests`):

```python
import os
import time
from datetime import datetime, timezone

import requests

BASE = "https://fanduelapi.com/api/v1"
SESSION = requests.Session()
SESSION.headers["Authorization"] = f"Bearer {os.environ['FANDUEL_API_KEY']}"


def get(path, **params):
    """GET one endpoint and return its data list, waiting out rate limits."""
    while True:
        r = SESSION.get(f"{BASE}{path}", params=params, timeout=10)
        if r.status_code == 429:
            time.sleep(int(r.headers.get("Retry-After", "5")))
            continue
        r.raise_for_status()
        return r.json()["data"]


def price(odds):
    """American odds as text. A suspended market can come back with no price."""
    return "off" if odds is None else f"{odds:+d}"

props = get("/props", sport="nba", stat="points")
for p in props:
    print(f"{p['player']:<26} {str(p['line']):>5}  over {price(p['over_american']):>5}  under {price(p['under_american']):>5}")
```

4. Or use a client: `pip install fanduelapi` (https://pypi.org/project/fanduelapi/) or `npm install fanduelapi` (https://www.npmjs.com/package/fanduelapi); source at https://github.com/fanduelapi, examples at https://fanduelapi.com/sdks.
5. Stay current with `GET /api/v1/changes?since=<cursor>` instead of re-reading every prop. Full reference: https://fanduelapi.com/openapi.json and https://fanduelapi.com/llms-full.txt.

## Use it from Claude (MCP)

Claude Code, with your key read from the shell:

```bash
claude mcp add --transport http --scope user fanduelapi https://fanduelapi.com/api/mcp \
  --header "Authorization: Bearer $FANDUEL_API_KEY"
```

Claude on the web or desktop: Settings, Connectors, Add custom connector, then paste https://fanduelapi.com/api/mcp. Without a key it gives the keyless tools (search_docs, fetch_doc, get_sample_props). Clients that only run local stdio servers: `npx -y fanduelapi-mcp` (https://www.npmjs.com/package/fanduelapi-mcp). Setup for other agents: https://fanduelapi.com/mcp.

## Pricing

| Plan | Price | Credits a month | Calls a minute | Includes |
| --- | --- | --- | --- | --- |
| Free | Free | 100 | 20 | REST and MCP access, Data delayed 5 minutes, Last 24 hours of line move history |
| Developer | $49/month | 10,000 | 60 | Real-time data, Line move history, Graded results and hit rates, Game logs, Exports and training set, Change stream |
| Production | $149/month | 50,000 | 120 | Real-time data, Line move history, Graded results and hit rates, Webhooks, Priority support |
| Scale | $499/month | 250,000 | 180 | Real-time data, Full line move history, Graded results and hit rates, Webhooks, Bulk export, Priority support |

Cancel paid plans any time from the billing page in your dashboard, or through the API (an agent can do it with your reason). Details: https://fanduelapi.com/pricing

## This page

[FanDuel API](https://fanduelapi.com/)/[Docs](https://fanduelapi.com/docs) / SDKs

Docs

# SDKs for FanDuel API

Three open-source packages wrap the same REST API and MCP server: a Python client on PyPI, a JavaScript and TypeScript client on npm, and a stdio MCP server you run with npx. Each is MIT licensed, has no dependencies, and lives in the github.com/fanduelapi GitHub organization.

[Get a free API key](https://fanduelapi.com/sign-up)[Read the docs](https://fanduelapi.com/docs)

FanDuel API is an independent data service operated by Stunning Couches LLC. It is not affiliated with, endorsed by or sponsored by FanDuel.

## Install

Python (PyPI)

```
pip install fanduelapi
```

JavaScript and TypeScript (npm)

```
npm install fanduelapi
```

MCP server over stdio (npm)

```
npx -y fanduelapi-mcp
```

- **Python client**: Standard library only, Python 3.8 and later. Retries short 429s, follows the change feed, and exposes the credit headers. [PyPI](https://pypi.org/project/fanduelapi/) · [GitHub](https://github.com/fanduelapi/fanduelapi-python)
- **JavaScript and TypeScript client**: No dependencies, types included. Node 18 and later, Deno, Bun, edge runtimes and browsers with fetch. [npm](https://www.npmjs.com/package/fanduelapi) · [GitHub](https://github.com/fanduelapi/fanduelapi-js)
- **MCP server (stdio)**: A small relay for clients that only run local stdio servers: each message goes to the hosted MCP server with your key. [npm](https://www.npmjs.com/package/fanduelapi-mcp) · [GitHub](https://github.com/fanduelapi/fanduelapi-mcp)

All source: [github.com/fanduelapi](https://github.com/fanduelapi). Official MCP Registry entry: [com.fanduelapi/server](https://registry.modelcontextprotocol.io/v0/servers?search=com.fanduelapi).

## Get a key

A free key needs no card: [sign up](https://fanduelapi.com/sign-up), create a key in the dashboard and export it. Every client reads it from the environment.

Shell

```
export FANDUEL_API_KEY="fd_..."
```

Two Python helpers need no key at all, so you can check the data before signing up:

Python, no key

```
import fanduelapi

# No key: a small delayed sample of real props, and the credit cost of any call
print(fanduelapi.sample_props("nba")[:3])
print(fanduelapi.credit_costs("/api/v1/props?league=nba&limit=200"))
```

## Python

NBA points props, then one prop's history

```
from fanduelapi import FanDuelAPI

fd = FanDuelAPI()  # reads FANDUEL_API_KEY

props = fd.props(league="nba", stat="points", limit=50)
for p in props:
    print(p["player"], p["line"], p["over_american"], p["under_american"])

history = fd.prop_history(props[0]["id"])  # every recorded move of one prop
```

The full method list and the change-feed follower are in the [fanduelapi-python README](https://github.com/fanduelapi/fanduelapi-python). The same calls with requests alone are on the [Python guide](https://fanduelapi.com/fanduel-api-python).

## JavaScript and TypeScript

Node 18+, Deno, Bun or the edge

```
import { FanDuelAPI } from "fanduelapi";

const fd = new FanDuelAPI(); // reads FANDUEL_API_KEY

const props = await fd.props({ league: "nba", stat: "points", limit: 50 });
for (const p of props) console.log(p.player, p.line, p.over_american, p.under_american);

const history = await fd.propHistory(props[0].id);
```

A monthly stop throws `FanDuelAPIError` with `code === "QUOTA_EXCEEDED"` and a link for the person to click; the client never buys anything. More in the [fanduelapi-js README](https://github.com/fanduelapi/fanduelapi-js) and the [JavaScript guide](https://fanduelapi.com/guides/javascript).

## MCP server for stdio clients

Clients that take a remote URL can use the hosted server directly; see [MCP setup](https://fanduelapi.com/mcp). For a client that only runs local servers, the package relays each message to the hosted server with your key.

Claude Code

```
claude mcp add fanduelapi --env FANDUEL_API_KEY=fd_... -- npx -y fanduelapi-mcp
```

claude\_desktop\_config.json, .cursor/mcp.json

```
{
  "mcpServers": {
    "fanduelapi": {
      "command": "npx",
      "args": [
        "-y",
        "fanduelapi-mcp"
      ],
      "env": {
        "FANDUEL_API_KEY": "fd_..."
      }
    }
  }
}
```

The tool list comes from the hosted server, so it stays current. Details in the [fanduelapi-mcp README](https://github.com/fanduelapi/fanduelapi-mcp).

## Questions

## Related

- [First call Your first FanDuel API request step by step: the key, the header, one props call, reading the response and meta, and the three calls to make next.](https://fanduelapi.com/docs/first-call)
- [Python example Working Python code for FanDuel Sportsbook player props: authenticate with a key, list props, read a prop's move history and poll for changes.](https://fanduelapi.com/fanduel-api-python)
- [JavaScript guide Working JavaScript and TypeScript for FanDuel props: fetch with a key, page the board, read a prop's history, follow the change feed and consume the stream.](https://fanduelapi.com/guides/javascript)
- [MCP server One URL and a key give an agent the props, moves and changes tools.](https://fanduelapi.com/mcp)

## Make your first call in a few minutes

Sign up, create a key in the dashboard, and send it as a Bearer token. The free plan needs no card and reads the same data five minutes behind.

[Get a free API key](https://fanduelapi.com/sign-up)

## FAQ

### Is there a free plan?

Yes. Free includes the current board over REST and MCP with data delayed 5 minutes, the change feed and the last 24 hours of line-move history. Graded results, hit rates, game logs, older history, exports and the training set come with Developer and up.

### Is this affiliated with FanDuel?

No. This is an independent data service operated by Stunning Couches LLC and is not affiliated with or endorsed by FanDuel.

### Which sports are covered?

NBA, NFL, NHL, MLB and college sports with player props, and soccer (Premier League, La Liga, Serie A, Bundesliga, Ligue 1, Champions League, MLS and internationals) with every match market and goalscorer and shots markets, as FanDuel lists them.

### How does the price compare with other odds APIs?

Checked 15 November 2026: real time here is $49 a month for FanDuel only, with every prop and every line move kept. ParlayAPI starts at $5 a month and The Odds API at $30, for many sportsbooks, and their free plans give 1,000 and 500 credits against 100 here. The side-by-side table with sources is at /fanduel-odds-api-comparison, and general questions are answered at /answers.

### How do I cancel?

From the billing page in your dashboard, or through the API, at any time. We ask why you are leaving, and the plan runs to the end of the paid period.

### How do I get a free key?

Sign up at https://fanduelapi.com/sign-up?ref=ai-claudebot. Free plan: 100 credits a month, data delayed 5 minutes, no card. REST and MCP on every plan.

### Can an AI agent sign up for me?

Yes. The agent sends POST https://fanduelapi.com/api/v1/agent/signup with your email and what you are building (add "ref": "ai-claudebot"), you approve the emailed link, and the agent collects the key. Details: https://fanduelapi.com/connect.
