SportAPINBAGet SportAPI Key

Sacramento Kings

Coach
Doug Christie
Arena
Golden 1 Center
Conference
Western
1-10Record
14thWestern
L4Streak

Roster

No.PlayerPosHtGPMinPtsRebAstFG%3P%
5Darius Acuff Jr.G6-21137.326.23.87.241.833.3
8Zach LaVineG6-51132.722.33.32.550.338.8
11Domantas SabonisF6-101034.413.813.35.967.140.0
15De'Andre HunterF6-71031.613.34.61.342.936.8
9Precious AchiuwaF6-81126.310.46.41.153.336.4
13Keegan MurrayF6-8425.38.82.31.033.315.4
0Malik MonkG6-31015.57.81.03.436.133.3
19Leaky BlackF6-6719.05.03.01.641.440.0
34Emanuel SharpG6-31118.14.61.50.638.340.6
32Dylan CardwellC6-10418.84.57.31.843.8–
22Jonathan MogboF6-9514.23.02.20.835.316.7
29Daeqwon PlowdenG6-6810.92.61.00.344.430.8
33Alex KarabanF6-759.81.40.80.433.340.0
25Ben SimmonsG6-100––––––
22Mason PlumleeC7-00––––––
42Maxime RaynaudC7-10––––––
3Sean PedullaG6-10––––––

Per-game averages in the NBA regular season so far. Players without a game have dashes.

Get this team's data from the API

The team ID of the Sacramento Kings is 32 and the slug is sacramento-kings. /api/basketball/teams/slug/{slug} returns the coach, the arena, the standing and the latest and next games. The roster is at /api/basketball/teams/{id}/roster and every game of the team at /api/basketball/teams/{id}/games, newest first. The averages in the roster table on this page come from each player's profile at /api/basketball/players/slug/{slug}.

team.py
import requests

API_KEY = "YOUR_API_KEY"
session = requests.Session()
session.headers["X-API-Key"] = API_KEY
BASE = "https://sportapi.ai/api/basketball"

team = session.get(f"{BASE}/teams/slug/sacramento-kings", timeout=20).json()["data"]
print(team["name"], "- coach", team["coach_name"])

roster = session.get(f"{BASE}/teams/32/roster", timeout=20).json()["data"]
for p in roster:
    print(p["jersey"], p["name"], p["position"], p["height_cm"], "cm")

games = session.get(f"{BASE}/teams/32/games", params={"league": "nba", "limit": 5}, timeout=20).json()["data"]
for g in games:
    print(g["start"], g["away"]["abbreviation"], "@", g["home"]["abbreviation"], g["status"])

The API documentation lists every basketball endpoint. The same key works for the NBA, WNBA, EuroLeague, NCAA and the other leagues, and for football too.

Updated Nov 13, 11:59 AM ET