Guide

NBA injury data: timestamps and as-of features

Short answer: get_injuries returns the NBA injury list as captured once a day, with a date and no publication time. A late scratch appears in the next snapshot, not at the moment it was announced. For pregame features, use only snapshots dated before the game, and use captured_at on lines to anchor the clock.

A feature is only valid if you could have computed it at the forecast time. Injury data is where that rule breaks most often, because the list changes daily and a snapshot labelled with a date can hide when each change became known. The sections below show what the endpoint stores, what it leaves out and how to build features that respect the gap.

What get_injuries returns

The tool takes an optional team and date and returns the report as of that day. Each row has player_id, name, position, team, status, type, detail and return_date. The date argument returns the latest snapshot on or before the day you ask for. Daily snapshots are kept from October 9, 2026; asking for October 8 returns zero rows and a note that the first report is October 9.

The statuses are Out, Day-To-Day and, rarely, Suspension. On December 6, 2026 there were 93 rows: 77 Out, 15 Day-To-Day and 1 Suspension. There is no Probable, Questionable or Doubtful label and no written injury note. A player who is not listed is not on that day's list, which says nothing about whether he is healthy.

Two details shape how you use it. First, the snapshot has a date but no time, and nothing in the response says when a given status was first reported. Second, return_date is an expected return and it moves. Between December 5 and December 6 it changed for 15 players while their status stayed the same.

How much changes between two days

Comparing consecutive daily snapshots shows how fast the list moves.

CompareRows beforeRows afterNewClearedStatus changedReturn date changed
Dec 4 to Dec 510110023311
Dec 5 to Dec 610093815315

A list of around 100 players turns over by a handful to a couple of dozen entries a day, and statuses and return dates shift on top of that. A model that ignores the dates of these changes will treat a Day-To-Day entry from Friday as if it were known on Thursday.

A concrete case

New York hosted Washington on December 6, 2026 (game 401937099, listed start 23:00 UTC). The New York list on December 5 had Jordan Clarkson Day-To-Day, Karl-Anthony Towns Day-To-Day and Andre Drummond Out. On December 6 it had Jaden Akins and OG Anunoby Day-To-Day, Clarkson Out until December 10, and Towns and Drummond gone.

A pregame feature built from the December 6 snapshot sees Clarkson Out. One built from the December 5 snapshot sees him Day-To-Day. Which is legitimate depends on when the forecast was made, and the snapshot gives you a date and nothing finer. If your forecast time was the evening of December 5, only the first one is allowed.

import json, os, urllib.request
from datetime import datetime, timedelta

KEY = os.environ["DUNKAPI_API_KEY"]
def post(tool, body):
    req = urllib.request.Request("https://mcp.dunkapi.com/v1/" + tool, data=json.dumps(body).encode(),
          headers={"Content-Type": "application/json", "x-api-key": KEY})
    with urllib.request.urlopen(req, timeout=60) as r:
        return json.load(r)["data"]

def snapshot(team, day):
    r = post("get_injuries", {"team": team, "date": day})      # latest snapshot on or before day
    return r["date"], {p["name"]: (p["status"], p["return_date"]) for p in r["injuries"]}

def diff(old, new):
    return {"new": sorted(set(new) - set(old)), "cleared": sorted(set(old) - set(new)),
            "changed": sorted(n for n in new if n in old and old[n] != new[n])}

def usable_snapshot_day(game_start_utc, lag_days=1):
    """Conservative as-of rule: only snapshots dated before the game's UTC date count."""
    start = datetime.fromisoformat(game_start_utc.replace("Z", "+00:00"))
    return (start.date() - timedelta(days=lag_days)).isoformat()

_, before = snapshot("NY", "2026-12-05")
_, after = snapshot("NY", "2026-12-06")
print(diff(before, after))
# {'new': ['Jaden Akins', 'OG Anunoby'], 'cleared': ['Andre Drummond', 'Karl-Anthony Towns'], 'changed': ['Jordan Clarkson']}
print(usable_snapshot_day("2026-12-06T23:00:00.000Z"))     # 2026-12-05

Line timestamps as a clock

Injury snapshots have no time, but line captures do. get_line_movement returns each book's snapshots with a captured_at. Since October 2026 lines are fetched every hour for games in the next four days, and captured_at is the book's own last-update time. For the same game, one book's captures on the morning of December 6 read like this:

captured_at (UTC)Home moneylineHome spreadTotal
2026-12-06 04:05-525-10.5217.5
2026-12-06 08:05-475-10.5218.5
2026-12-06 11:05-500-10.5218.5
2026-12-06 14:05-450-10.5216.5
2026-12-06 15:05-450-9.5217.5
2026-12-06 18:05-450-10.5216.5

By default a capture identical to the one before is dropped, so the gaps are no-change hours, not missing data. This table shows what the price was at each time. It does not show why it moved, and you cannot assign a move to an injury announcement from this data.

The same timing fields work as an as-of filter on the price side. Take the latest capture at or before your forecast time:

def line_as_of(snapshots, as_of_iso):
    ok = [s for s in snapshots if s["captured_at"] and s["captured_at"] <= as_of_iso]
    return ok[-1] if ok else None

movement = post("get_line_movement", {"game_id": "401937099"})["movement"]
one_book = next(iter(movement.values()))
print(line_as_of(one_book, "2026-12-06T12:00:00Z"))
# {'captured_at': '2026-12-06T11:05:45.841Z', 'home_ml': -500, 'away_ml': 380, 'home_spread': -10.5, 'total': 218.5}

For props, rows carry scheduled_start and minutes_before_scheduled_start, negative when a capture came after the scheduled start. Filter on a positive value for a strict pre-start cut. For a single moment, get_line_at_time returns each book's price at a chosen time and its closing price, with the capture time and the minutes before for each.

Three timestamp traps are worth remembering:

  • A closing line first read after the start has captured_at null and an explanatory note. It is a closing-line record, not a point-in-time price.
  • starts_at is the listed start, not the actual tip, and it is not moved to match it.
  • Before October 2026, captured_at is the time of the archived snapshot the line was read from, which is coarser than hourly.

Building feeds you can trust

Because the endpoint stores daily snapshots, the only way to get a finer clock for injuries is to make one. Poll get_injuries on your own schedule, a few times a day on game days, and store each response with your own received_at. From then on you have an as-of time you control for every status change you saw. The cost is 2 credits a call, so 4 calls a day for the league is 8 credits.

Match that to the way you backfill. For games before you started polling, use the conservative rule above: snapshots dated before the game's day only. The model then sees slightly less than was known, which is safer than seeing more.

Limits

  • No publication time. The snapshot is daily and carries only a date. A scratch announced shortly before tip-off may reach the data only in a snapshot taken after the game, so a pregame feature can miss it.
  • No history before October 9, 2026. There is no injury data for earlier dates.
  • Not in the freshness report. get_data_status covers games, odds, standings, player_game_stats and plays, and returned a 400 error when asked about injuries.
  • No game-time decisions. There is no Probable or Questionable label, and no inactive list at tip-off.
  • Absence is not health. A missing player may be healthy, resting or simply unlisted.
  • Cause is not shown. A line that moved after a status change may have moved for other reasons.

Get a free key Or download whole seasons as Parquet

Checked against the live API on 2026-12-06. Questions: hello@sportsdatahq.com.