SportAPINBAGet SportAPI Key

New Orleans Pelicans

Coach
Jamahl Mosley
Arena
Smoothie King Center
Conference
Western
4-8Record
12thWestern
L4Streak

Roster

No.PlayerPosHtGPMinPtsRebAstFG%3P%
1Zion WilliamsonF6-61132.821.75.32.661.850.0
25Trey Murphy IIIF6-8932.715.64.83.646.537.7
41Saddiq BeyF6-81226.815.43.42.346.334.9
0Jeremiah FearsG6-31228.815.34.54.944.729.8
5Dejounte MurrayG6-4931.413.44.64.443.129.6
22Derik QueenC6-91221.612.26.32.347.936.4
21Yves MissiC6-11219.59.57.52.588.9–
17Karlo MatkovicF6-101118.78.54.31.258.144.4
3Jordan PooleG6-4619.87.51.82.529.430.0
9Trendon WatfordF6-8617.77.23.51.054.533.3
24Bennedict MathurinG6-51115.76.01.91.336.519.2
2Herbert JonesF6-71222.95.73.01.137.326.7
6DeAndre JordanC6-11314.74.05.30.7100.0–
10Jaron Pierre Jr.G6-616.04.04.00.016.733.3
11Bryce McGowensG6-6710.63.70.90.635.328.6
14AJ JohnsonG6-545.81.50.80.842.90.0
13Julian ReeseF6-945.51.50.50.050.0–
8Malik DiaF6-90––––––

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 New Orleans Pelicans is 3 and the slug is new-orleans-pelicans. /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/new-orleans-pelicans", timeout=20).json()["data"]
print(team["name"], "- coach", team["coach_name"])

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