A thin wrapper around the pbpstats API’s “get-shots” endpoint.
Usage
get_shots(
league = "nba",
season,
season_type = "Regular Season",
entity_type,
entity_id,
start_type = "All",
blocked,
shot_value = NULL,
oreb_shot_type = NULL,
sec_since_oreb = NULL
)
Arguments
- league
Character. Which league to query; e.g.,
"nba"
or"wnba"
; defaults to"nba"
.- season
Character or integer. The season to query; e.g.
"2024-25"
.- season_type
Character. One of:
"Regular Season"
"Playoffs"
"PlayIn"
"All"
; defaults to
"Regular Season"
.- entity_type
Character. One of:
"Player"
"Team"
"Lineup"
"LineupOpponent"
.
- entity_id
Integer or character. The pbpstats ID of the entity.
- start_type
Character. The event that started the possession; see endpoint docs for options.
- blocked
Logical. Filter by blocked shots (
TRUE
) or unblocked (FALSE
).- shot_value
Integer. Shot value;
2
for two‐pointers or3
for three‐pointers; defaults toNULL
.- oreb_shot_type
Character. One of:
"MissedFG"
"Missed2"
"MissedMidRange"
"Missed3"
"AtRim"
"AtRimBlocked"
"ShortMidRange"
"LongMidRange"
"Arc3"
"Corner3"
"FT"
; defaults to
NULL
.- sec_since_oreb
Integer. Maximum seconds since an offensive rebound (
SecondsSinceOrebLte
); defaults toNULL
.
References
Darryl Blackport (2020). PBPStats API, MIT License. https://api.pbpstats.com/docs