SportAPINBAGet SportAPI Key

Atlanta Hawks

Coach
Quin Snyder
Arena
State Farm Arena
Conference
Eastern
7-5Record
4thEastern
L1Streak

Roster

No.PlayerPosHtGPMinPtsRebAstFG%3P%
7Nickeil Alexander-WalkerG6-51230.921.93.22.641.737.6
1Jalen JohnsonF6-8933.719.28.67.344.920.5
2Aaron WigginsG6-51226.014.93.72.446.341.9
17Onyeka OkongwuF6-101229.613.78.22.848.832.7
3CJ McCollumG6-31225.613.62.83.941.435.5
5Dyson DanielsG6-71230.39.87.25.748.112.5
0Luguentz DortG6-41224.89.33.31.836.635.0
4Kingston FlemingsG6-31121.98.52.64.352.140.9
24Corey KispertF6-669.77.70.70.760.752.6
31Jock LandaleC6-11815.16.15.01.945.222.2
20Zuby EjioforF6-8711.14.93.01.358.344.4
10RayJ DennisG6-218.04.02.02.050.00.0
14Asa NewellF6-11511.03.62.61.046.725.0
8Dorian Finney-SmithF6-734.01.00.70.333.333.3
13Henri VeesaarC7-00––––––
22Jalen WilsonF6-60––––––
00Keshon GilbertG6-40––––––
18Mouhamed GueyeF6-110––––––

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 Atlanta Hawks is 19 and the slug is atlanta-hawks. /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/atlanta-hawks", timeout=20).json()["data"]
print(team["name"], "- coach", team["coach_name"])

roster = session.get(f"{BASE}/teams/19/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/19/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