SportAPINBAGet SportAPI Key

Golden State Warriors

Coach
Steve Kerr
Arena
Chase Center
Conference
Western
8-4Record
6thWestern
L1Streak

Roster

No.PlayerPosHtGPMinPtsRebAstFG%3P%
30Stephen CurryG6-21026.527.83.83.950.045.7
1Yaxel LendeborgF6-91232.121.77.33.751.842.6
2Brandin PodziemskiG6-41033.517.05.04.247.738.9
12Brandon WilliamsG6-11016.210.42.22.341.330.4
8De'Anthony MeltonG6-21222.410.14.32.341.142.9
32Georges NiangF6-61220.38.03.11.545.735.6
28Charles BasseyC6-101012.57.65.70.566.70.0
3Will RichardG6-31117.35.52.10.947.845.8
15Gui SantosF6-7918.45.43.91.441.026.7
0Gary Payton IIG6-21013.45.01.60.446.822.2
45Graham IkeF6-999.24.82.40.951.666.7
20Al HorfordC6-81017.94.73.62.139.134.4
18LJ CryerG6-097.64.60.31.241.241.7
23Draymond GreenF6-61026.83.24.77.640.627.3
33Malevy LeonsF6-974.70.31.10.012.50.0
10Jimmy Butler IIIF6-60––––––
7Kristaps PorzingisC7-20––––––
4Moses MoodyG6-50––––––

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 Golden State Warriors is 16 and the slug is golden-state-warriors. /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/golden-state-warriors", timeout=20).json()["data"]
print(team["name"], "- coach", team["coach_name"])

roster = session.get(f"{BASE}/teams/16/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/16/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:36 AM ET