
Nfl Data
- 554 installs
- 201 repo stars
- Updated August 5, 2026
- machina-sports/sports-skills
nfl-data is an agent skill that loads NFL scores, rosters, play-by-play, and weekly stats via ESPN and nflverse endpoints for developers building sports analytics or fantasy features.
About
nfl-data is a Python skill from machina-sports/sports-skills (version 0.1.0, MIT) that exposes 22 CLI commands for NFL data through the sports-skills package with zero API keys. ESPN-backed commands include get_scoreboard, get_standings, get_teams for all 32 NFL teams, get_team_roster, get_play_by_play, get_injuries, and get_game_summary. nflverse-backed commands—requiring pip install sports-skills[nfl]—return normalized schedules, weekly rosters, player stats, team stats, and play-by-play rows with EPA and win-probability fields. The skill requires Python 3.10+, derives season years from currentDate rather than hardcoding, and documents postseason week numbers 19–23. Developers reach for nfl-data when building fantasy apps, broadcast dashboards, or ML pipelines that need consistent NFL ingestion templates.
- Weekly and seasonal team and player stats
- Play-by-play and drive-level events
- Roster and injury snapshot handling
- Red-zone and situational metric derivations
- Pipelines for fantasy and betting analytics
Nfl Data by the numbers
- 554 all-time installs (skills.sh)
- +10 installs in the week ending Aug 2, 2026 (Skillselion tracking)
- Ranked #429 of 2,064 Data Science & ML skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/machina-sports/sports-skills --skill nfl-dataAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 554 |
|---|---|
| repo stars | ★ 201 |
| Last updated | August 5, 2026 |
| Repository | machina-sports/sports-skills ↗ |
How do you load NFL play-by-play data in Python?
Load NFL rosters, drives, play-by-play, and weekly stats for modeling, fantasy apps, or broadcast-adjacent dashboards using consistent ingestion templates.
Who is it for?
Python developers building NFL dashboards, fantasy tools, or sports ML pipelines who need ESPN and nflverse data without API keys.
Skip if: College football, soccer, or non-NFL sports queries—those require cfb-data or football-data skills instead.
When should I use this skill?
User asks for NFL scores, standings, rosters, play-by-play, injuries, betting futures, or weekly nflverse stat tables.
What you get
Normalized NFL scoreboard, roster, standings, injury, and nflverse play-by-play DataFrames via CLI or Python SDK.
- NFL scoreboard data
- roster and stats tables
- play-by-play datasets
By the numbers
- Documents 22 NFL CLI commands
- Covers all 32 NFL teams via get_teams
- Requires Python 3.10+ with zero API keys
Files
NFL Data
Before writing queries, consult references/api-reference.md for endpoints, ID conventions, and data shapes.
Setup
Before first use, check if the CLI is available:
which sports-skills || pip install sports-skillsIf pip install fails (package not found or Python version error), install from GitHub:
pip install git+https://github.com/machina-sports/sports-skills.gitThe package requires Python 3.10+. If your default Python is older, use a specific version:
python3 --version # check version
# If < 3.10, try: python3.12 -m pip install sports-skills
# On macOS with Homebrew: /opt/homebrew/bin/python3.12 -m pip install sports-skillsNo API keys required.
For nflverse-backed commands (get_nflverse_*), install the NFL extra:
pip install sports-skills[nfl]This installs nfl-data-py (or use nflreadpy if preferred). Parquet support (pyarrow) is also needed for most nflverse data beyond schedules.
Quick Start
Prefer the CLI — it avoids Python import path issues:
sports-skills nfl get_scoreboard
sports-skills nfl get_standings --season=2025
sports-skills nfl get_teamsPython SDK (alternative):
from sports_skills import nfl
scores = nfl.get_scoreboard({})
standings = nfl.get_standings({"params": {"season": "2025"}})CRITICAL: Before Any Query
CRITICAL: Before calling any data endpoint, verify:
- Season year is derived from the system prompt's
currentDate— never hardcoded. - If only a team name is provided, call
get_teamsto resolve the team ID before using team-specific commands.
Choosing the Season
Derive the current year from the system prompt's date (e.g., currentDate: 2026-02-16 → current year is 2026).
- If the user specifies a season, use it as-is.
- If the user says "current", "this season", or doesn't specify: The NFL season runs September–February. If the current month is March–August, use
season = current_year(upcoming season). If September–February, the active season started in the previous calendar year if you're in Jan/Feb, otherwise current year.
Commands
| Command | Description |
|---|---|
get_scoreboard | Live/recent NFL scores |
get_standings | Standings by conference and division |
get_teams | All 32 NFL teams |
get_team_roster | Full roster for a team |
get_team_schedule | Schedule for a specific team |
get_game_summary | Detailed box score and scoring plays |
get_leaders | NFL statistical leaders |
get_news | NFL news articles |
get_play_by_play | Full play-by-play for a game |
get_win_probability | Win probability chart data |
get_schedule | Season schedule by week |
get_injuries | Injury reports across all teams |
get_transactions | Recent transactions |
get_futures | Futures/odds markets |
get_depth_chart | Depth chart for a team |
get_team_stats | Team statistical profile |
get_player_stats | Player statistical profile |
get_nflverse_schedule | nflverse-backed schedules/results table |
get_nflverse_weekly_rosters | nflverse-backed weekly rosters |
get_nflverse_player_stats | nflverse-backed normalized player stat rows |
get_nflverse_team_stats | nflverse-backed normalized team stat rows |
get_nflverse_play_by_play | nflverse-backed play-by-play rows |
See references/api-reference.md for full parameter lists and return shapes.
Examples
Example 1: Today's scores User says: "What are today's NFL scores?" Actions: 1. Call get_scoreboard() Result: All live and recent NFL games with scores and status
Example 2: Conference standings User says: "Show me the AFC standings" Actions: 1. Derive season year from currentDate 2. Call get_standings(season=<derived_year>) 3. Filter results for AFC conference Result: AFC standings table with W-L-T, PCT, PF, PA per team
Example 3: Team roster User says: "Who's on the Chiefs roster?" Actions: 1. Call get_team_roster(team_id="12") Result: Full Chiefs roster with name, position, jersey number, height, weight
Example 4: Super Bowl box score User says: "How did the Super Bowl go?" Actions: 1. Call get_schedule(week=23) to find the Super Bowl event_id 2. Call get_game_summary(event_id=<id>) for full box score Result: Complete box score with passing/rushing/receiving stats and scoring plays
Example 5: Injury report User says: "Who's injured on the Chiefs?" Actions: 1. Call get_injuries() 2. Filter results for Kansas City Chiefs (team_id=12) Result: Chiefs injury list with player name, position, status, and injury type
Example 6: Player statistics User says: "Show me Patrick Mahomes' stats this season" Actions: 1. Derive season year from currentDate 2. Call get_player_stats(player_id="3139477", season_year=<derived_year>) Result: Season stats by category with value, rank, and per-game averages
Example 7: nflverse weekly rosters User says: "Give me the Week 1 Chiefs roster from the data table backend" Actions: 1. Derive season year from currentDate 2. Call get_nflverse_weekly_rosters(season=<derived_year>, week=1, team="KC") Result: Weekly roster rows normalized for team, player, position, jersey, and status
Example 8: nflverse play-by-play User says: "Pull Bills Week 3 play-by-play" Actions: 1. Derive season year from currentDate 2. Call get_nflverse_play_by_play(season=<derived_year>, week=3, team="BUF") Result: Play rows with game_id, down/distance, description, EPA, WP/WPA, and score state
Commands that DO NOT exist — never call these
- ~~
get_odds~~ / ~~get_betting_odds~~ — not available. For prediction market odds, use the polymarket or kalshi skill. - ~~
search_teams~~ — does not exist. Useget_teamsinstead. - ~~
get_box_score~~ — does not exist. Useget_game_summaryinstead. - ~~
get_player_ratings~~ — does not exist. Useget_player_statsinstead.
If a command is not listed in the Commands table above, it does not exist.
Error Handling
When a command fails, do not surface raw errors to the user. Instead: 1. Catch silently and try alternatives 2. If team name given instead of ID, use get_teams to find the ID first 3. Only report failure with a clean message after exhausting alternatives
Troubleshooting
Error: sports-skills command not found Cause: Package not installed Solution: Run pip install sports-skills. If not on PyPI, install from GitHub: pip install git+https://github.com/machina-sports/sports-skills.git
Error: nflverse backend unavailable Cause: Optional NFL backend extra not installed Solution: Install sports-skills[nfl] so the nflverse provider (nflreadpy or compatibility fallback) is available
Error: Team not found by ID Cause: Wrong or outdated ESPN team ID used Solution: Call get_teams to get the current list of all 32 NFL teams with their IDs
Error: No data returned for a future game Cause: ESPN only returns data for completed or in-progress games Solution: Use get_schedule to see upcoming game details; get_scoreboard only covers active/recent games
Error: Postseason week number returns no results Cause: Postseason uses unified week numbers (19-23) that differ from regular season Solution: Use week 19 for Wild Card, 20 for Divisional, 21 for Conference Championship, 23 for Super Bowl
NFL Data — API Reference
Commands
get_scoreboard
Get live/recent NFL scores.
date(str, optional): Date in YYYY-MM-DD formatweek(int, optional): Week number (1-18 regular season, 19-23 postseason)
Returns events[] with game info, scores, status, and competitors.
get_standings
Get NFL standings by conference and division.
season(int, optional): Season year
Returns groups[] with AFC/NFC conferences, divisions, and team standings including W-L-T, PCT, PF, PA.
get_teams
Get all 32 NFL teams. No parameters.
Returns teams[] with id, name, abbreviation, logo, and location.
get_team_roster
Get full roster for a team.
team_id(str, required): ESPN team ID (e.g., "12" for Chiefs)
Returns athletes[] with name, position, jersey number, height, weight, experience.
get_team_schedule
Get schedule for a specific team.
team_id(str, required): ESPN team IDseason(int, optional): Season year
Returns events[] with opponent, date, score (if played), and venue.
get_game_summary
Get detailed box score and scoring plays.
event_id(str, required): ESPN event ID
Returns game_info, competitors, boxscore (passing/rushing/receiving stats), scoring_plays, and leaders.
get_leaders
Get NFL statistical leaders (passing, rushing, receiving).
season(int, optional): Season year
Returns categories[] with leader rankings per stat category.
get_news
Get NFL news articles.
team_id(str, optional): Filter by team
Returns articles[] with headline, description, published date, and link.
get_play_by_play
Get full play-by-play data for a game.
event_id(str, required): ESPN event ID
Returns drives[] with play-by-play detail including down, distance, yard line, play description, and scoring plays.
get_win_probability
Get win probability chart data for a game.
event_id(str, required): ESPN event ID
Returns timestamped home/away win probability percentages throughout the game.
get_schedule
Get NFL season schedule by week.
season(int, optional): Season yearweek(int, optional): Week number (1-18 regular season, 19-23 postseason)
Returns events[] for the specified week/season.
get_injuries
Get current NFL injury reports across all teams. No parameters.
Returns teams[] with per-team injury lists including player name, position, status (Out/Doubtful/Questionable/Day-To-Day), injury type, and detail.
get_transactions
Get recent NFL transactions (trades, signings, waivers).
limit(int, optional): Max transactions to return. Defaults to 50.
Returns transactions[] with date, team, and description.
get_futures
Get NFL futures/odds markets (Super Bowl winner, MVP, etc.).
limit(int, optional): Max entries per market. Defaults to 25.season_year(int, optional): Season year. Defaults to current.
Returns futures[] with market name and entries (team/player name + odds value).
get_depth_chart
Get depth chart for a specific team.
team_id(str, required): ESPN team ID
Returns charts[] with offense/defense/special teams positions and player depth order.
get_team_stats
Get full team statistical profile for a season.
team_id(str, required): ESPN team IDseason_year(int, optional): Season year. Defaults to current.season_type(int, optional): 1=preseason, 2=regular (default), 3=postseason.
Returns categories[] (Passing, Rushing, Receiving, etc.) with detailed stats including value, rank, and per-game averages.
get_player_stats
Get full player statistical profile for a season.
player_id(str, required): ESPN athlete IDseason_year(int, optional): Season year. Defaults to current.season_type(int, optional): 1=preseason, 2=regular (default), 3=postseason.
Returns categories[] with detailed stats including value, rank, and per-game averages.
get_nflverse_schedule
Get schedules/results through the nflverse backend.
season(int, optional): Season yearweek(int, optional): NFL week filter
Returns events[] with game_id, teams, scores, date/time, line fields, and location.
get_nflverse_weekly_rosters
Get weekly roster snapshots through the nflverse backend.
season(int, optional): Season yearweek(int, optional): NFL week filterteam(str, optional): Team abbreviation filter (e.g.KC)
Returns players[] with normalized roster fields: team, player_id, player_name, position, jersey_number, status, college, and experience fields when available.
get_nflverse_player_stats
Get normalized nflverse player stat rows.
season(int, optional): Season yearplayer_id(str, optional): nflverse/GSIS player identifierteam(str, optional): Team abbreviation filterposition(str, optional): Position filter
Returns players[], each with identity fields (player_id, player_name, position, team) plus a stats object containing backend columns (completions, passing_yards, passing_tds, rushing_yards, etc.).
get_nflverse_team_stats
Get normalized nflverse team stat rows.
season(int, optional): Season yearteam(str, optional): Team abbreviation filterweek(int, optional): Week filter when available
Returns teams[], each with team/season context plus a stats object containing backend columns. Note: with nfl_data_py, team stats fall back to schedule data (game-by-game results) since a dedicated team stats endpoint is not available.
get_nflverse_play_by_play
Get normalized nflverse play-by-play rows.
season(int, optional): Season yearweek(int, optional): Week filterteam(str, optional): Team abbreviation filtergame_id(str, optional): nflverse game identifierlimit(int, optional): Max rows to return
Returns plays[] with game/play identifiers, quarter/clock, teams, down/distance, description, EPA, WP/WPA, and score state.
Notes:
- The nflverse backend requires the
[nfl]optional extra:pip install sports-skills[nfl]. It prefersnflreadpywhen installed and falls back tonfl_data_pyfor compatibility. - These commands keep
nfl-dataas the user-facing skill while exposing table-style datasets under the same module. - The ESPN-backed commands (e.g.
get_scoreboard,get_standings) work with zero extra dependencies. The nflverse commands provide deeper historical/analytical data (seasonal aggregates, EPA, win probability per play) but require the optional install. - Parquet support (
pyarroworfastparquet) is needed for most nflverse data beyond schedules.
Team IDs
| Team | ID | Team | ID |
|---|---|---|---|
| Cardinals | 22 | Rams | 14 |
| Falcons | 1 | Ravens | 33 |
| Bills | 2 | Bears | 3 |
| Panthers | 29 | Bengals | 4 |
| Cowboys | 6 | Browns | 5 |
| Broncos | 7 | Lions | 8 |
| Packers | 9 | Texans | 34 |
| Colts | 11 | Jaguars | 30 |
| Chiefs | 12 | Raiders | 13 |
| Chargers | 24 | Dolphins | 15 |
| Vikings | 16 | Patriots | 17 |
| Saints | 18 | Giants | 19 |
| Jets | 20 | Eagles | 21 |
| Steelers | 23 | 49ers | 25 |
| Seahawks | 26 | Buccaneers | 27 |
| Titans | 10 | Commanders | 28 |
Use get_teams for the complete, authoritative list.
Week Numbers
Regular season: weeks 1-18. Postseason unified numbering: Wild Card=19, Divisional=20, Conference Championship=21, Pro Bowl=22, Super Bowl=23. The connector translates these to ESPN's internal seasontype=3 automatically.
NFL Team IDs (ESPN)
| Team | ID | Team | ID |
|---|---|---|---|
| Cardinals | 22 | Rams | 14 |
| Falcons | 1 | Ravens | 33 |
| Bills | 2 | Bears | 3 |
| Panthers | 29 | Bengals | 4 |
| Cowboys | 6 | Browns | 5 |
| Broncos | 7 | Lions | 8 |
| Packers | 9 | Texans | 34 |
| Colts | 11 | Jaguars | 30 |
| Chiefs | 12 | Raiders | 13 |
| Chargers | 24 | Dolphins | 15 |
| Vikings | 16 | Patriots | 17 |
| Saints | 18 | Giants | 19 |
| Jets | 20 | Eagles | 21 |
| Steelers | 23 | 49ers | 25 |
| Seahawks | 26 | Buccaneers | 27 |
| Titans | 10 | Commanders | 28 |
Tip: Use get_teams to get the full, accurate list of team IDs.
Week Numbering
- Regular season: Weeks 1-18
- Postseason: Wild Card = 19, Divisional = 20, Conference Championship = 21, Pro Bowl = 22, Super Bowl = 23
- The connector translates these to ESPN's internal
seasontype=3automatically. get_team_schedulereturns both regular-season and postseason games.
#!/bin/bash
SPORT="${1:-nfl}" # nfl
MONTH=$(date +%m)
case "$SPORT" in
nfl)
if [[ $MONTH -ge 3 && $MONTH -le 8 ]]; then
echo "WARNING: NFL is in off-season (Sep-Feb). Scoreboard may be empty."
echo "SUGGESTION: Use get_news or get_standings with a prior season."
fi
;;
esac
echo "OK"
Related skills
How it compares
Use nfl-data for professional NFL stats via ESPN/nflverse rather than generic web scraping when you need normalized rosters and play-by-play fields.
FAQ
Does nfl-data require API keys?
nfl-data requires no API keys. It uses ESPN public endpoints plus an optional nflverse backend installed via pip install sports-skills[nfl], which adds nfl-data-py or nflreadpy and pyarrow for parquet tables.
How many NFL commands does nfl-data provide?
nfl-data documents 22 CLI commands including get_scoreboard, get_standings, get_teams for all 32 teams, get_play_by_play, get_injuries, and four get_nflverse_* commands for normalized schedules, rosters, stats, and play-by-play rows.