Skip to main content

underdog-api (Python)

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

  • Every method returns the parsed JSON body (data and meta). ud.get(path, **params) reaches any documented path.
  • Per-minute 429s and 5xx answers are retried with backoff; the monthly credit 429 is raised at once.
  • Credits: one per started 100 rows on simple reads; ud.credit_costs() returns the policy with no key.
  • Reference: https://underdogapi.com/docs · Plans: https://underdogapi.com/pricing

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.0

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.0
File Size Uploaded Provenance Actions
underdog_api-0.1.0.tar.gz 6.7 kB With provenance Details for underdog_api-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 13.0 kB

Release files / underdog_api-0.1.0.tar.gz

Download URL underdog_api-0.1.0.tar.gz
Size 6.7 kB
Tags Source
SHA-256 checksum
How to use checksums
8e6e28bf3c202cf47752288262f71855b90522747f9c2c4f488e28d328a82628
BLAKE2b-256 checksum
How to use checksums
6242cae0cc8af43d1b4b207fdac2778ecdbeddef2005d3d77bb8ba23e1bc2d9b
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 15, 2026.

Transparency log

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

Download URL underdog_api-0.1.0-py3-none-any.whl
Size 6.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4356b1d8b72b98c8a6b0ee94c71f8b2292bb73c80e9187d2b83f899e1b75f7bb
BLAKE2b-256 checksum
How to use checksums
e25b695bb194aba437d69d43174eb24fa66cdcae465c9f44f97cc83eca034bc2
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 15, 2026.

Transparency log

Security for underdog-api 0.1.0

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.0.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 15, 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.0 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