SportAPINBAGet SportAPI Key

Los Angeles Lakers

Coach
JJ Redick
Arena
crypto.com Arena
Conference
Western
11-2Record
1stWestern
W7Streak

Roster

No.PlayerPosHtGPMinPtsRebAstFG%3P%
77Luka DoncicG6-81135.838.67.57.648.940.8
15Austin ReavesG6-51235.324.73.34.751.340.9
14Walker KesslerC7-21330.814.510.81.867.5–
11Ziaire WilliamsF6-91024.111.02.62.056.346.5
54Sandro MamukelashviliF6-91323.710.84.51.649.541.2
10Collin SextonG6-31217.810.31.82.643.427.5
5Quentin GrimesG6-41126.18.02.52.543.124.2
4Matisse ThybulleG6-51324.37.11.81.143.740.0
12Jake LaRaviaF6-71224.55.64.02.148.052.2
1Adou ThieroF6-849.02.52.81.040.00.0
2Jarred VanderbiltF6-8811.92.03.81.088.9–
7Jaden HardyG6-373.41.60.40.315.418.2
9Bronny JamesG6-262.71.30.00.050.00.0
55Kevon LooneyF6-965.71.31.50.260.0–
20Carson CooperC6-1113.01.02.01.0––
30Chris ManonG6-423.51.00.50.033.30.0
43Cameron CarrG6-554.60.41.00.016.70.0
18Lawson LoveringC7-121.00.00.50.5––
31AK OkerekeF6-70––––––
47Arthur KalumaF6-60––––––

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 Los Angeles Lakers is 5 and the slug is los-angeles-lakers. /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/los-angeles-lakers", timeout=20).json()["data"]
print(team["name"], "- coach", team["coach_name"])

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