situational_stats
Compute EPA per play, success rate, and yards per play for any NFL game situation—down and distance, red zone, two-minute drill, or score margin—grouped by player, offense, or defense.
Instructions
Play-by-play efficiency (EPA/play, success rate, yards/play) for any game situation.
Examples: QBs on 3rd-and-long, red-zone rushing by team, defenses in the two-minute drill, one player's EPA when trailing in the 4th quarter.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| downs | No | e.g. [3] or [3, 4]. | |
| limit | No | ||
| weeks | No | ||
| player | No | Only plays involving this player (name or player_id). | |
| defense | No | Team on defense. | |
| offense | No | Team with the ball. | |
| seasons | No | Seasons to include, e.g. [2024, 2025]. 1999 or later. Defaults to the current season. | |
| shotgun | No | ||
| sort_by | No | Metric to rank by. | epa_per_play |
| group_by | No | Rank passers/rushers/receivers/offenses/defenses, or 'none' for one aggregate row. | none |
| quarters | No | 1-4, 5 = overtime. | |
| ascending | No | ||
| min_plays | No | Minimum plays per group to be ranked. | |
| play_kind | No | pass (incl. sacks), rush (incl. scrambles), or all. | all |
| season_type | No | REG = regular season, POST = playoffs, ALL = both. | REG |
| max_score_diff | No | ||
| min_score_diff | No | Offense score minus defense score, e.g. -8 for 'down one score or less'. | |
| max_yards_to_go | No | ||
| min_yards_to_go | No | ||
| max_yards_to_endzone | No | 20 = red zone, 10 = inside the 10, 5 = goal line. | |
| max_half_seconds_remaining | No | 120 = two-minute drill. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||