SportAPINBAGet SportAPI Key

Brooklyn Nets

Coach
Jordi Fernandez
Arena
Barclays Center
Conference
Eastern
3-8Record
13thEastern
W1Streak

Roster

No.PlayerPosHtGPMinPtsRebAstFG%3P%
17Michael Porter Jr.F6-101132.521.57.51.345.637.5
30Julius RandleF6-91133.019.76.55.044.330.6
0Mikel Brown Jr.G6-5723.312.92.13.934.631.1
10Nolan TraoreG6-31022.112.92.02.651.646.2
13Moritz WagnerC6-111118.410.93.21.357.556.5
8Egor DeminG6-8522.010.62.02.437.837.0
2Danny WolfF6-11623.79.76.02.245.045.8
20Day'Ron SharpeC6-101123.38.36.84.152.535.7
21Noah ClowneyF6-101119.76.04.30.642.030.8
1Keon EllisG6-41022.85.02.02.136.731.3
31Chaney JohnsonF6-81118.84.72.51.134.729.2
00Josh MinottF6-887.33.91.90.439.323.8
77Ben SarafG6-614.02.01.00.0100.0–
4Drake PowellG6-548.52.01.01.575.050.0
14Terance MannG6-6616.01.31.21.521.420.0
9Joshua JeffersonF6-814.00.00.00.00.00.0
16Grant NelsonF6-110––––––
34Tyler BilodeauF6-80––––––

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 Brooklyn Nets is 7 and the slug is brooklyn-nets. /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/brooklyn-nets", timeout=20).json()["data"]
print(team["name"], "- coach", team["coach_name"])

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