Skip to main content

Underdog API for Python: underdog-api

The Underdog API Python client for Underdog Fantasy pick'em data. pip install underdog-api and read current Underdog lines with separate Higher and Lower payouts, every recorded line move, past boards and graded results.

Website | Docs | Free API key | Pricing | All SDKs

Also for underdogapi.com: JavaScript: npm install underdog-api | MCP server: npx -y underdog-api-mcp

Python client for Underdog API: Underdog Fantasy pick'em lines with separate Higher and Lower payout multipliers, every recorded line move since 6 Nov 2026, the board at any past instant, and graded results. Standard library only; Python 3.9+.

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

Install

pip install underdog-api
export UNDERDOG_API_KEY=ud_...   # free key, no card: https://underdogapi.com/sign-up

Try it without a key

from underdog_api import Client

demo = Client(api_key=None).demo("projections", league="NBA", limit=1)
print(demo["data"][0]["player"]["name"], demo["data"][0]["selections"])   # fictional rows, live shape

The current board

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"])

Everything that moved

for change in ud.pages("/api/v1/changes", league="NFL", event_type="line.moved", limit=200):
    print(change["observed_at"], change["player_name"], change["stat"], change["previous_line"], "->", change["line"])

The board at a past moment, and graded results (paid plans)

past = ud.board(as_of="2026-11-14T23:00:00Z", league="NHL", limit=100)
graded = ud.results(league="NBA", date="2026-11-13", limit=200)

On the free key, graded results, hit rates, game logs, exports and the training set raise PlanLimitError with a few labelled sample rows and the upgrade link; no credits are charged:

from underdog_api import PlanLimitError

try:
    ud.results(league="NBA")
except PlanLimitError as e:
    print(e.message, e.upgrade_url, e.sample[:2])

Into pandas

import pandas as pd
rows = list(ud.pages("/api/v1/projections", league="NBA", view="compact", limit=200))
df = pd.json_normalize(rows)

Notes

Tests

python -m unittest discover -s tests          # offline, fake transport
UNDERDOG_LIVE=1 python -m unittest discover -s tests   # also calls the keyless demo

Metadata

Release files for underdog-api 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for underdog-api 0.1.1
File Size Uploaded Provenance Actions
underdog_api-0.1.1.tar.gz 7.2 kB With provenance Details for underdog_api-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for underdog-api 0.1.1
File Interpreter ABI Platform Actions
underdog_api-0.1.1-py3-none-any.whl Python 3 none any Details for underdog_api-0.1.1-py3-none-any.whl

Total release size: 13.9 kB

Release files / underdog_api-0.1.1.tar.gz

Download URL underdog_api-0.1.1.tar.gz
Size 7.2 kB
Tags Source
SHA-256 checksum
How to use checksums
893005d560ffc9bb5fb857464a3d6a16938b5cbf762867391716b11df900f17e
BLAKE2b-256 checksum
How to use checksums
be47061030f2f0a730e3cb9814f3d8ff51e850c38090c60fc3884387d671f679
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Release files / underdog_api-0.1.1-py3-none-any.whl

Download URL underdog_api-0.1.1-py3-none-any.whl
Size 6.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c77f267e1867a50c247f5d872cd6bbd3bd080de915c52850fb47cf224244617b
BLAKE2b-256 checksum
How to use checksums
ca15a7e37488abf5871c02a908158f4e47141edaf82433644b4036092638535c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Security for underdog-api 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for underdog_api-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page