SportAPINBAGet SportAPI Key

Boston Celtics

Coach
Joe Mazzulla
Arena
TD Garden
Conference
Eastern
10-2Record
1stEastern
W5Streak

Roster

No.PlayerPosHtGPMinPtsRebAstFG%3P%
0Jayson TatumF6-81134.026.36.17.541.130.6
13Paul GeorgeF6-81030.022.05.23.848.844.0
11Payton PritchardG6-21227.213.33.33.741.136.5
9Derrick WhiteG6-41229.812.82.95.243.833.3
88Neemias QuetaC7-01222.59.26.81.855.675.0
30Sam HauserF6-81221.08.13.61.145.943.5
52Luka GarzaC6-101212.36.43.21.345.350.0
55Baylor ScheiermanG6-61220.46.14.11.444.847.2
4Mitchell RobinsonC7-01117.85.65.40.763.6–
27Jordan WalshG6-71216.04.53.40.741.226.7
28Hugo GonzalezG6-61212.94.02.00.644.722.7
45Mike ConleyG6-148.03.00.80.566.766.7
12Chris Cenac Jr.F6-1133.02.71.00.075.050.0
8Ron Harper Jr.G6-565.51.30.50.525.025.0
20Dillon MitchellF6-812.00.00.00.0––
77Amari WilliamsF7-00––––––
99Devin CarterG6-20––––––

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 Boston Celtics is 30 and the slug is boston-celtics. /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/boston-celtics", timeout=20).json()["data"]
print(team["name"], "- coach", team["coach_name"])

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