How NBA.com is wired: league ids, season types and game ids
NBA.com is the league's own record, published by NBA Media Ventures, and that is the reason to scrape NBA pages rather than a wire copy: these are the numbers the league itself uses for leaders and franchise history, and everything downstream is a derivative with a lag. Schedule, standings, box scores, play-by-play, shot geometry, rosters, draft, transactions and the officiating archive all hang off one identifier scheme, so an NBA scraper that learns it reaches all of them.
That scheme is a ten-digit game id, readable once you split it: two digits for the league, one for the season type, two for the season start year, five for the sequence. League 00 is the NBA, 10 the WNBA, 20 the G League, with 13, 14, 15 and 16 reserved for the summer league circuits. The season-type digit runs 1 preseason, 2 regular season, 3 All-Star week, 4 playoffs, 5 play-in and 6 the NBA Cup final. Postseason ids split again at the tail into a zero, the round, the series inside that round and the game number, so 0042500224 is round two, series two, game four of 2025-26. A second key, the gameCode, writes the same fixture as 20251216/SASNYK.
Franchises occupy a fixed block from 1610612737 to 1610612766, one number each, and the number survives relocation and renaming. Players carry plain integers. Addresses hang off those numbers: a fixture at /game/ plus the id, with summary, box-score, game-charts and play-by-play tabs; a club at /team/ plus team id and slug, with roster, schedule and stats beneath it; a player at /player/ plus person id and slug, with career stats, per-game box scores and bio. The trailing slug is decoration. The integer is the handle, and it turns up again in the draft table, the transaction log and the officiating report.
Get a Quote