Skip to main content

Nfl Player Stats

@hmcrum/nfl-player-statsv2026.10.22.1· Apache-2.0· 4d agoBEHAVIORS
01README

Real NFL player box-score statistics from ESPN's public, unauthenticated summary endpoint. The missing middle layer between @hmcrum/nfl-scores (games/standings/teams), @hmcrum/nfl-injuries (who's hurt), and @dougschaefer/sleeper (fantasy rosters) — this model answers "how many yards did my player actually get?"

Two read-only methods: box_score (one game by event id, fanned out to one resource per team with every player's stat line grouped by category) and week_stats (resolve a week's scoreboard to its completed games and fetch each one's box score — one resource per game, so the caller never hunts event ids by hand). ESPN's parallel keys/labels/stats arrays are zipped into named {key,label,value} triples. Host-locked to site.api.espn.com, no auth or secrets required.

Quick Start

swamp extension pull @hmcrum/nfl-player-stats
swamp model create @hmcrum/nfl-player-stats nfl-stats

swamp model method run nfl-stats week_stats
swamp model method run nfl-stats week_stats --input week=5 --input seasonType=regular --input year=2025
swamp model method run nfl-stats box_score --input event=401772939 ```
02Behaviors1
@hmcrum/nfl-player-statsv2026.10.22.1nfl_player_stats.ts

Global Arguments

ArgumentTypeDescription
userAgent?stringUser-Agent sent to ESPN's endpoints — identify yourself honestly
fn box_score(event: string)
Fetch one game's player box score by event id — fans out one resource per team
ArgumentTypeDescription
eventstringESPN event (game) id, e.g. 401772939 — from nfl-scores `scoreboard` or the week_stats method
fn week_stats(week?: number, seasonType?: enum, year?: number, includeIncomplete?: boolean)
Resolve a week's games and fetch each one's player box score — one resource per game, defaults to the current week and completed games only
ArgumentTypeDescription
week?numberWeek number within the season type — omit for the current week
seasonType?enumpre, regular, or post — omit for whatever is currently in progress
year?numberSeason year, e.g. 2025 — omit for the current season
includeIncomplete?booleanAlso fetch stats for games that haven't finished (default false — only completed games)

Resources

teamBoxScore(24h)— One NFL team's player stat lines for a single game, grouped by category
gameStats(24h)— Both teams' player stat lines for a single NFL game, side by side
03Stats
A
100 / 100
Downloads
4
Archive size
14.1 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types (deprecated)1/1earned
  • Dependencies pass trust audit2/2earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License2/2earned
  • Verified public repository2/2earned
04Platforms
05Labels