# How to get Underdog Fantasy projections data

> Get Underdog Fantasy projections (pick'em lines and multipliers) in Python, JavaScript, pandas or CSV with one API call. Free key, keyless demo, copy-paste code. Underdog API (https://underdogapi.com) is an independent Underdog Fantasy pick'em data API: Higher/Lower lines with separate payout multipliers per side, line history, changes and graded results as JSON, CSV, MCP and streams.

Canonical page: https://underdogapi.com/how-to-get-underdog-projections

## Free offer

**Free API key, no card: 100 credits a month** on the live board, every league, separate Higher/Lower prices, and the last 24 hours of line history. Sign up: https://underdogapi.com/sign-up?ref=ai-claudebot

## Quickstart

1. Get a free key at https://underdogapi.com/sign-up?ref=ai-claudebot (no card), or let your agent request one: `POST https://underdogapi.com/api/v1/agent/signup` with `data_wanted` and `use_case`, then show your user the returned approval_url.
2. Export it: `export UNDERDOG_API_KEY=ud_...`
3. First call with curl:

```bash
curl --fail-with-body 'https://underdogapi.com/api/v1/projections?league=NBA&view=compact&limit=5' \
  -H "Authorization: Bearer $UNDERDOG_API_KEY" \
  -H 'X-User-Request: NBA dashboard integration check'
```

4. Same call in Python:

```python
import os, requests

r = requests.get(
    "https://underdogapi.com/api/v1/projections",
    params={"league": "NBA", "view": "compact", "limit": 5},
    headers={"Authorization": f"Bearer {os.environ['UNDERDOG_API_KEY']}"},
)
r.raise_for_status()
for line in r.json()["data"]:
    print(line["player"]["name"], line["market"]["stat"], line["line"])
```

## Use it from Claude (MCP)

Claude Code, one command:

```bash
claude mcp add --transport http underdog https://underdogapi.com/api/mcp --header "Authorization: Bearer $UNDERDOG_API_KEY"
```

Or add this server to your Claude MCP configuration (the key stays in the environment):

```json
{
  "mcpServers": {
    "underdog": {
      "type": "http",
      "url": "https://underdogapi.com/api/mcp",
      "headers": {
        "Authorization": "Bearer ${UNDERDOG_API_KEY}"
      }
    }
  }
}
```

Guide: https://underdogapi.com/use-with-claude

## SDKs and packages

Official clients for Underdog API (independent; not Underdog Fantasy). Source: https://github.com/underdogapi · Overview: https://underdogapi.com/sdks

- Python SDK: `pip install underdog-api` (PyPI: https://pypi.org/project/underdog-api/ · source: https://github.com/underdogapi/underdogapi-python)
- JavaScript / TypeScript SDK: `npm install underdog-api` (npm: https://www.npmjs.com/package/underdog-api · source: https://github.com/underdogapi/underdogapi-js)
- MCP server (stdio): `npx -y underdog-api-mcp` (npm: https://www.npmjs.com/package/underdog-api-mcp · source: https://github.com/underdogapi/underdogapi-mcp)

Python:

```python
from underdog_api import Client

ud = Client()  # reads UNDERDOG_API_KEY
board = ud.projections(league="NBA", view="compact", limit=20)
for line in board["data"]:
    print(line)
print(board["meta"]["observed_at"])
```

Claude Code with the stdio MCP package (the hosted server at /api/mcp needs no install):

```bash
claude mcp add underdog -e UNDERDOG_API_KEY=ud_... -- npx -y underdog-api-mcp
```

## Pricing

| Plan | Price | Credits / month | Notes |
| --- | --- | --- | --- |
| Free | $0 | 100 | No card. Live feed 5 minutes behind; last 24 hours of line history |
| Developer | $49/month | 10,000 | For models that need full training pages and loaded game-log seasons. Live feed, no added plan delay |
| Production | $149/month | 50,000 | For apps with real users and push delivery. Everything in Developer, signed webhooks for every change |
| Scale | $499/month | 250,000 | For apps whose traffic has outgrown Production. Everything in Production, 15 live-feed connections at once |

Full pricing: https://underdogapi.com/pricing

## On this page

How-to · updated November 13, 2026



Short answer: Create a free key at underdogapi.com and call GET https://underdogapi.com/api/v1/projections?sport=NBA with the header Authorization: Bearer <key>; each row is one Underdog Fantasy pick'em line with the player, stat, line and the Higher and Lower payout multipliers, and the same data is available as CSV, a live stream and line history.

## Facts

| Endpoint | GET https://underdogapi.com/api/v1/projections |
| --- | --- |
| Auth | Authorization: Bearer <your key> (free key, no card) |
| Try without a key | GET https://underdogapi.com/api/v1/demo/projections (fictional rows, same shape) |
| Filters | sport (NBA, NFL, CFB, CBB, NHL ...), stat, search (player or team), payout_tier, higher_only, start_after, start_before |
| One row | player, event, market.stat, market.period, line, selections[] (side, available, payout_multiplier, payout_tier), observed_at |
| Paging | limit and meta.next_cursor; stop when next_cursor is null |
| CSV | GET https://underdogapi.com/api/v1/export?sport=NBA&format=csv |
| Line history | GET https://underdogapi.com/api/v1/projections/{id}/history |
| Live changes | GET https://underdogapi.com/api/v1/stream (server-sent events) |
| Cost | Free: 100 credits a month. Developer: $49 a month for 10,000 credits. A projections call costs 3 credits per 100 rows |

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

## Step by step

1. [Create a free account](https://underdogapi.com/sign-up) and copy a key. Put it in an environment variable: `export UNDERDOG_API_KEY=...`
2. Call `/api/v1/projections` with a sport. You get up to `limit` lines and a `meta.next_cursor`.
3. Read each row: `player.name`, `market.stat`, `line`, and in `selections` the Higher and Lower `payout_multiplier`. A side with `available: false` has a null price; keep it null.
4. Page with `cursor` until `next_cursor` is null, or switch to the stream for changes.

curl

```
curl "https://underdogapi.com/api/v1/projections?sport=NBA&limit=5" \
  -H "Authorization: Bearer $UNDERDOG_API_KEY"
```

## Python (standard library)

No packages to install.

underdog_projections.py

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

URL = "https://underdogapi.com/api/v1/projections?sport=NBA&limit=50"
req = Request(URL, headers={"Authorization": "Bearer " + os.environ["UNDERDOG_API_KEY"]})
with urlopen(req, timeout=20) as resp:
    page = json.load(resp)

for row in page["data"]:
    sides = {s["side"]: s["payout_multiplier"] for s in row["selections"] if s["available"]}
    print(row["player"]["name"], row["market"]["stat"], row["line"],
          "higher", sides.get("higher"), "lower", sides.get("lower"))
print("next cursor:", page["meta"]["next_cursor"])
```

## Python with pandas: a league board in a DataFrame

Each page of up to 100 full rows costs 3 credits, so this capped loop spends at most 18.

board_to_dataframe.py

```
import os, requests, pandas as pd

rows, cursor = [], None
while True:
    params = {"sport": "NBA", "limit": 200, **({"cursor": cursor} if cursor else {})}
    r = requests.get("https://underdogapi.com/api/v1/projections", params=params,
                     headers={"Authorization": f"Bearer {os.environ['UNDERDOG_API_KEY']}"}, timeout=20)
    r.raise_for_status()
    page = r.json()
    for row in page["data"]:
        sides = {s["side"]: s for s in row["selections"]}
        rows.append({
            "player": row["player"]["name"], "team": row["player"]["team"],
            "stat": row["market"]["stat"], "period": row["market"]["period"], "line": row["line"],
            "higher_x": sides.get("higher", {}).get("payout_multiplier"),
            "lower_x": sides.get("lower", {}).get("payout_multiplier"),
            "observed_at": row["observed_at"],
        })
    cursor = page["meta"]["next_cursor"]
    if not cursor or len(rows) >= 600:  # 3 credits per 100 rows
        break

df = pd.DataFrame(rows)
print(df.sort_values("higher_x", ascending=False).head(20))
```

## JavaScript (Node 18+ or any server runtime)

Keep the key on the server; never ship it in browser code.

projections.mjs

```
const res = await fetch("https://underdogapi.com/api/v1/projections?sport=NFL&limit=50", {
  headers: { Authorization: `Bearer ${process.env.UNDERDOG_API_KEY}` },
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
const { data, meta } = await res.json();
for (const row of data) {
  const higher = row.selections.find((s) => s.side === "higher");
  const lower = row.selections.find((s) => s.side === "lower");
  console.log(row.player.name, row.market.stat, row.line,
    higher?.available ? higher.payout_multiplier : "-", lower?.available ? lower.payout_multiplier : "-");
}
console.log("next cursor:", meta.next_cursor);
```

## CSV for a spreadsheet

Empty price cells mean the side is unavailable. Read X-Next-Cursor for the next page.

curl

```
curl "https://underdogapi.com/api/v1/export?sport=NBA&format=csv&limit=500" \
  -H "Authorization: Bearer $UNDERDOG_API_KEY" -o underdog-nba.csv
```

## Line history for one projection

curl

```
# id comes from a projections row
curl "https://underdogapi.com/api/v1/projections/$MARKET_ID/history" \
  -H "Authorization: Bearer $UNDERDOG_API_KEY"
```

Every numeric line move and every multiplier reprice, oldest first. See [line movement](https://underdogapi.com/underdog-line-movement-api) and the [history sample CSV](https://underdogapi.com/data/history-sample).

## Try it now without a key

Fictional players, live response shape.

curl

```
curl "https://underdogapi.com/api/v1/demo/projections?limit=2"
```

## Every way to get Underdog projections

| Method | How | Trade-off |
| --- | --- | --- |
| Underdog API (this site) | One authenticated GET; JSON, CSV, stream or MCP | Free key; history, multipliers and stable ids kept for you |
| Apify Underdog scrapers | Start a run, read its dataset | Pay per run; you store history yourself; each tool has its own output shape |
| Build your own collector | Reverse-engineer the app's private endpoints | Undocumented, can break without notice, and you keep it running |
| Copy by hand | Read the app and type lines into a sheet | Fine for a few lines, not for a model |

## Questions

What are Underdog projections?

On Underdog Fantasy a projection is a pick'em line: a player, a stat, a period and a number you pick Higher or Lower on, each side with its own payout multiplier. The API returns each one as a row with those fields.

Can I get Underdog projections without an API key?

Only fictional sample rows: https://underdogapi.com/api/v1/demo/projections returns the live response shape without a key. Real lines need a free key, which takes a minute and no card.

How do I get Underdog projections in Python?

Send a GET to /api/v1/projections with your key in the Authorization header using urllib or requests, then read data[] and meta.next_cursor. The code on this page runs as is with UNDERDOG_API_KEY set.

How often do the projections update?

The collector records the board all day. Paid plans read changes in real time on the stream; the Free plan stream runs 5 minutes behind. Check observed_at on every row.

Can I get past Underdog lines, not only today's?

Yes. /api/v1/projections/{id}/history returns every recorded change for a line, and /api/v1/board returns the whole board at a past instant. Free reads the last 24 hours; paid plans read the full recorded history.

[Endpoint **Projections endpoint reference** *Every parameter and field.*](https://underdogapi.com/underdog-projections-api) [Overview **Underdog Fantasy API options** *Official, scrapers or hosted.*](https://underdogapi.com/underdog-fantasy-api) [MCP **Ask an AI agent instead** *Claude, ChatGPT, Cursor.*](https://underdogapi.com/mcp) [Guide **Python client guide** *Errors, retries and a notebook.*](https://underdogapi.com/underdog-api-python)

Underdog API is an independent data service. It is not affiliated with, endorsed by or operated by Underdog Fantasy or any company named on this page.

## References

- [Underdog API reference](https://underdogapi.com/docs)
- [OpenAPI contract](https://underdogapi.com/openapi.json)
- [Python quickstart file](https://underdogapi.com/examples/underdog-quickstart.py)

## FAQ

### Is there a free Underdog API?

Yes. The Free plan is a real API key on the live board, not a sample: 100 credits a month, every league, separate Higher/Lower prices and the last 24 hours of line history. No card is needed.

### Is this the official Underdog Fantasy API?

No. Underdog API is an independent data service. It is not affiliated with, endorsed by or sponsored by Underdog Fantasy or Underdog Sports.

### What data does it return?

Underdog Higher/Lower lines with separate payout multipliers and availability for each side, stable market ids through line moves, alternate rungs, recorded line history, changes, graded results and coverage/status endpoints.

### How do I use it from Claude or another AI agent?

Connect the MCP server at https://underdogapi.com/api/mcp with a bearer key, or call the REST API. Agents can request a key for their user with POST /api/v1/agent/signup.

### How much does it cost after the free tier?

Developer is $49/month for 10,000 credits, Production $149/month for 50,000, Scale $499/month for 250,000. Errors and unchanged 304 responses cost zero credits.

### How fresh is the data?

Each row carries its observation time. Check /api/v1/status and /api/v1/coverage before relying on a sport or window; missing collection is reported as unavailable, never filled in.

### Does it place entries or give picks?

No. It is data only: no entries, account operations, guaranteed outcomes or betting advice.

---
Independent data service, not affiliated with Underdog Fantasy or Underdog Sports. Docs: https://underdogapi.com/docs · OpenAPI: https://underdogapi.com/openapi.json · llms.txt: https://underdogapi.com/llms.txt
