# Underdog Fantasy scraper

> Underdog Fantasy scraper options compared: open-source Python scripts, Apify actors and an API. Free Python script that exports every Underdog pick'em line and multiplier to CSV. 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/underdog-scrapers

## 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

## 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

Underdog scraper · updated November 13, 2026



Short answer: An Underdog Fantasy scraper pulls the current pick'em board (player, stat, line and the Higher and Lower multipliers) into a CSV or JSON file. You can run an open-source Python script against Underdog's private app endpoints, pay per run for an Apify Underdog actor, or page through Underdog API's documented GET /api/v1/projections endpoint with the free script below, which writes the same CSV without you sending a single request to Underdog and keeps its shape when the app changes.

## Facts

| What a scraper returns | One row per pick'em line: player, team, opponent, start time, stat, period, line, and for each side whether it is offered and its payout multiplier |
| --- | --- |
| Board size (13 Nov 2026) | About 10,000 current lines across 12 leagues, with tens of thousands of line and multiplier changes a day |
| DIY Python script | Free; calls undocumented app endpoints; breaks when they change or block requests; no history unless you store every run |
| Apify actor | Pay per result, for example $0.15 per 1,000 lines on one actor (checked 10 Nov 2026); a dataset per run |
| Underdog API | Documented REST API; free key with 100 credits a month; Developer $49 a month for real-time; history and change events recorded for you |
| Free script on this page | https://underdogapi.com/examples/underdog-board-to-csv.py (Python 3, requests) |

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

## Three ways to scrape Underdog Fantasy

Checked 13 November 2026.

|  | DIY Python script | Apify Underdog actor | Underdog API |
| --- | --- | --- | --- |
| Setup | Clone, pip install, copy request headers | Pick an actor, start a run | pip install requests, set a key |
| Cost | Free, plus your server | Per run and per result | Free key; paid plans for volume and real time |
| Higher and Lower multipliers | Whatever the script parses | Depends on the actor's output fields | Separate per side, with tier and availability |
| Line history | Only runs you stored | Only runs you stored | Every recorded line and multiplier change |
| When Underdog changes its app | You fix the script | The actor author fixes it | The API shape stays the same |
| Live updates | Re-run on a timer | Re-run on a schedule | Change feed, server-sent stream, webhooks |
| Blocking and rate limits | Your IP can be blocked | Handled by the platform | Documented per-minute limits |

## The script: whole board to CSV

Pages through the board 200 lines at a time, waits on per-minute limits, stops on a used-up monthly quota.

shell

```
pip install requests
export UNDERDOG_API_KEY=ud_...   # free: https://underdogapi.com/sign-up
python underdog-board-to-csv.py NBA   # or no argument for every league
```

underdog-board-to-csv.py

```
"""Export the current Underdog Fantasy pick'em board to CSV.

Gives you what an Underdog scraper would, from a documented API: it pages through
GET /api/v1/projections on https://underdogapi.com and writes one CSV row per
line, with the Higher and Lower payout multipliers kept apart.

    pip install requests
    export UNDERDOG_API_KEY=ud_...      # free key: https://underdogapi.com/sign-up
    python underdog-board-to-csv.py NBA  # one league, or no argument for every league

Without UNDERDOG_API_KEY it reads the keyless demo endpoint, which returns
fictional rows in the live response shape, so you can test the parser first.
"""
import csv
import os
import sys
import time

import requests

ORIGIN = "https://underdogapi.com"
KEY = os.environ.get("UNDERDOG_API_KEY")
PATH = "/api/v1/projections" if KEY else "/api/v1/demo/projections"
HEADERS = {"Authorization": f"Bearer {KEY}"} if KEY else {}
COLUMNS = ["id", "sport", "player", "team", "opponent", "starts_at", "stat", "period", "line",
           "higher_available", "higher_multiplier", "higher_tier",
           "lower_available", "lower_multiplier", "lower_tier", "observed_at"]

def get_page(params):
    """One API call. Waits on a per-minute limit, stops on anything else."""
    for _ in range(5):
        r = requests.get(ORIGIN + PATH, params=params, headers=HEADERS, timeout=30)
        if r.ok:
            return r.json()
        code = r.json().get("error", {}).get("code") if r.headers.get("content-type", "").startswith("application/json") else None
        if r.status_code == 429 and code == "RATE_LIMIT_EXCEEDED":
            time.sleep(int(r.headers.get("Retry-After", "10")))
            continue
        if r.status_code == 503:
            time.sleep(10)
            continue
        # 401 bad key, 400 bad query, 429 MONTHLY_QUOTA_EXCEEDED: retrying will not help.
        raise SystemExit(f"HTTP {r.status_code} {code}: {r.text[:300]}")
    raise SystemExit("Gave up after 5 attempts")

def board(sport=None, page_size=200):
    """Yield every current line, following meta.next_cursor until it is null."""
    params = {"limit": page_size}
    if sport:
        params["sport"] = sport
    while True:
        page = get_page(params)
        yield from page["data"]
        cursor = page["meta"].get("next_cursor")
        if not cursor or not page["data"]:
            return
        params["cursor"] = cursor

def flatten(line):
    sides = {s["side"]: s for s in line["selections"]}
    hi, lo = sides.get("higher", {}), sides.get("lower", {})
    return {
        "id": line["id"], "sport": line["sport"],
        "player": line["player"]["name"], "team": line["player"].get("team"),
        "opponent": line["event"].get("opponent"), "starts_at": line["event"].get("starts_at"),
        "stat": line["market"]["stat"], "period": line["market"].get("period"), "line": line["line"],
        # A missing side stays empty: it was not offered, which is not the same as a 1.0x price.
        "higher_available": hi.get("available"), "higher_multiplier": hi.get("payout_multiplier"), "higher_tier": hi.get("payout_tier"),
        "lower_available": lo.get("available"), "lower_multiplier": lo.get("payout_multiplier"), "lower_tier": lo.get("payout_tier"),
        "observed_at": line["observed_at"],
    }

if __name__ == "__main__":
    sport = sys.argv[1].upper() if len(sys.argv) > 1 else None
    out = f"underdog_{(sport or 'all').lower()}_lines.csv"
    with open(out, "w", newline="") as f:
        writer = csv.DictWriter(f, fieldnames=COLUMNS)
        writer.writeheader()
        n = 0
        for line in board(sport):
            writer.writerow(flatten(line))
            n += 1
    print(f"Wrote {n} lines to {out}" + ("" if KEY else " (demo rows: fictional)"))
```

[Download underdog-board-to-csv.py](https://underdogapi.com/examples/underdog-board-to-csv.py). Columns: id, sport, player, team, opponent, starts_at, stat, period, line, higher_available, higher_multiplier, higher_tier, lower_available, lower_multiplier, lower_tier, observed_at. A full board on one league costs 3 credits per 100 lines; `view=compact` rows cost 1.

## What a scraper cannot give you

- **History.** A snapshot shows the line now. `GET /api/v1/projections/{id}/history` returns every recorded move and multiplier change since collection began, with ids that stay stable through moves.
- **Every change as it happens.** `GET /api/v1/changes` returns line.moved and line.repriced events after your cursor; the [stream](https://underdogapi.com/tools/alert-consumer) pushes them.
- **Results.** `GET /api/v1/results` grades lines against final box scores, with ties voided, for [hit rates](https://underdogapi.com/hit-rates) and backtests.
- **Agent access.** The same data as MCP tools: [Underdog MCP server](https://underdogapi.com/mcp).

## Questions

Is there an Underdog Fantasy scraper on GitHub?

Yes. Several open-source Python scripts call the endpoints the Underdog app uses and write the board to CSV; the best-known one was last updated in September 2024. They are free but undocumented, so they break when the endpoints change and keep no history unless you run them on a schedule.

Is scraping Underdog Fantasy allowed?

Check Underdog Fantasy's terms of use before scraping its app or site; this page is not legal advice. Reading a documented third-party API avoids sending automated requests to Underdog yourself.

How do I export Underdog lines to CSV?

Run the script on this page with a free key: python underdog-board-to-csv.py NBA writes underdog_nba_lines.csv. Or call GET https://underdogapi.com/api/v1/export?sport=NBA&format=csv for up to 1,000 rows in one request.

Does the script get boosted and discounted multipliers?

Yes. Each side has its own payout_multiplier and payout_tier (standard, boosted or discounted). A side Underdog does not offer stays empty instead of being written as 1.0.

Can I scrape Underdog projections in real time?

Re-running a scraper only gives snapshots. For every change as it happens, poll GET /api/v1/changes with a cursor or hold the server-sent stream open; real time needs a paid plan, the free plan runs 5 minutes behind.

Can I try it without signing up?

Yes. With no UNDERDOG_API_KEY set, the script reads the keyless demo endpoint, which returns fictional rows in the live shape, so you can check the CSV before using a key.

[Python **Underdog API in Python** *pandas, history, errors.*](https://underdogapi.com/underdog-api-python) [Compare **Apify Underdog scrapers vs API** *Per-run pricing in detail.*](https://underdogapi.com/compare/underdog-scrapers) [CSV **CSV export endpoint** *Up to 1,000 rows a call.*](https://underdogapi.com/underdog-api-csv-export) [Alternatives **Underdog API alternatives** *Every provider, dated.*](https://underdogapi.com/underdog-api-alternatives)

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

- [Script source](https://underdogapi.com/examples/underdog-board-to-csv.py)
- [Underdog API reference](https://underdogapi.com/docs)
- [Apify: Underdog player props actor](https://apify.com/zen-studio/underdog-player-props)
- [GitHub: underdog-fantasy-pickem-scraper](https://github.com/aidanhall21/underdog-fantasy-pickem-scraper)

## 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
