swar / nba_api

An API Client package to access the APIs for NBA.com
MIT License
2.54k stars 543 forks source link

Accessing player boxscores #453

Closed A00N closed 1 month ago

A00N commented 4 months ago

I am trying to gather player data from each game like this: https://www.nba.com/stats/players/boxscores?SeasonType=Regular+Season

But i cannot seem to find a way to do it.

For regular game data I did: data = leaguegamelog.LeagueGameLog(league_id="00", season=season_str).get_data_frames()[0]

Any suggestions?

awpt-alt commented 1 month ago

You need to pass this parameter to fetch the player data, the default param is fetching team data.

player_or_team_abbreviation=PlayerOrTeamAbbreviation.player