nba_api icon indicating copy to clipboard operation
nba_api copied to clipboard

How do I retrieve advanced stats in place of traditional stats?

Open ChristopheBrown opened this issue 1 year ago • 2 comments

I found baked in the API that there is a parameter to select Advanced Stats instead of Traditional ones: https://github.com/swar/nba_api/blob/master/docs/nba_api/stats/library/parameters.md#stattype

I would assume this is reached via the playercareerstats endpoint. But I see no documentation on how to structure the request to fetch advanced stats instead of traditional ones

The outputs example of playercareerstats shows no mention of this either.

ChristopheBrown avatar Nov 14 '24 02:11 ChristopheBrown

What stats are you looking for specifically? PlayerCareerStats does not return advanced stats. It's possible they're available elsewhere.

The StatType parameter is related to the homepagev2 endpoint (https://github.com/swar/nba_api/blob/master/docs/nba_api/stats/endpoints/homepagev2.md), but it looks like it only returns the top 5 leaders in each category.

wild-bill avatar Dec 05 '24 02:12 wild-bill

I'm looking for advanced stats like win shares, box +/-, PER, VORP.

ChristopheBrown avatar Dec 05 '24 03:12 ChristopheBrown