
Ben Simmons
- Team
- Sacramento Kings
- Position
- Guard
- Number
- 25
- Height
- 6-10 (208 cm)
- Weight
- 240 lb (109 kg)
- Born
- July 20, 1996 (30)
- Birthplace
- Melbourne, VIC, Australia
Get this player's stats from the API
Every roster player has a slug. /api/basketball/players/slug/{slug} returns the profile, season averages and totals for each league, season and stage, and the latest games with the player's line.
import requests
API_KEY = "YOUR_API_KEY"
player = requests.get(
"https://sportapi.ai/api/basketball/players/slug/ben-simmons",
headers={"X-API-Key": API_KEY},
timeout=20,
).json()["data"]
print(player["name"], "-", player["team"]["name"])
for s in player["seasons"]:
if s["league"]["slug"] == "nba":
print(s["season"], s["stage"], s["games"], "games", s["pts"], "pts", s["reb"], "reb", s["ast"], "ast")
for g in player["last_games"][:5]:
print(g["start"][:10], g["opponent"]["abbreviation"], g["result"], g["score"], g["pts"], "pts")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, 4:32 AM ET