SportAPINBAGet SportAPI Key

Washington Wizards

Coach
Brian Keefe
Arena
Capital One Arena
Conference
Eastern
4-9Record
12thEastern
L6Streak

Roster

No.PlayerPosHtGPMinPtsRebAstFG%3P%
23Anthony DavisF6-101134.325.610.51.952.232.1
3Trae YoungG6-21336.019.73.28.839.331.5
18Kyshawn GeorgeF6-81333.218.24.54.848.942.1
4AJ DybantsaF6-9933.815.06.32.341.023.3
20Alex SarrC7-01227.311.27.41.752.527.5
12Tre JohnsonG6-51223.69.72.10.936.424.2
9Justin ChampagnieF6-6418.57.37.51.360.028.6
0Bilal CoulibalyG6-71226.06.84.10.846.413.8
7Bub CarringtonG6-41318.34.81.62.135.742.5
8Deandre AytonC7-01314.04.54.70.866.7–
22Khris MiddletonF6-7513.82.41.60.433.320.0
27Will RileyG6-9106.31.90.20.346.722.2
34Felix OkparaF6-1132.01.00.70.050.0–
1Tre MannG6-455.00.80.00.425.00.0
16Anthony GillF6-734.00.31.00.00.00.0
26Reece BeekmanG6-311.00.00.00.0––
5Jamir WatkinsG6-60––––––
00Tristan VukcevicF7-00––––––

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 Washington Wizards is 34 and the slug is washington-wizards. /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/washington-wizards", timeout=20).json()["data"]
print(team["name"], "- coach", team["coach_name"])

roster = session.get(f"{BASE}/teams/34/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/34/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, 12:04 PM ET