SportAPINBAGet SportAPI Key

Milwaukee Bucks

Coach
Taylor Jenkins
Arena
Fiserv Forum
Conference
Eastern
1-11Record
15thEastern
L8Streak

Roster

No.PlayerPosHtGPMinPtsRebAstFG%3P%
11Tyler HerroG6-51131.021.94.44.545.938.8
24Jaime Jaquez Jr.F6-61227.616.15.72.847.640.4
18Kyle KuzmaF6-81227.010.85.32.645.931.7
13Ryan RollinsG6-31223.310.84.74.039.036.8
0Brayden BurriesG6-41221.69.75.22.242.623.8
9Kel'el WareC7-01217.88.56.50.839.218.8
15Nate AmentF6-101017.27.42.60.547.538.5
3Myles TurnerC6-111126.96.75.52.732.925.5
25Kasparas JakucionisG6-51217.86.62.23.341.423.3
20AJ GreenG6-41218.06.51.71.444.143.4
5Gary Trent Jr.G6-545.84.30.50.354.555.6
21Ousmane DiengF6-9913.04.31.31.142.436.8
35Pete NanceF6-914.03.01.01.050.00.0
23Bogoljub MarkovicF6-1134.30.71.00.3100.0–
00Jericho SimsC6-1089.00.51.10.340.00.0
12Caris LeVertG6-70––––––
30Cormac RyanG6-50––––––
19Kam JonesG6-40––––––

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 Milwaukee Bucks is 17 and the slug is milwaukee-bucks. /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/milwaukee-bucks", timeout=20).json()["data"]
print(team["name"], "- coach", team["coach_name"])

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