Python package for scraping and analyzing NHL data with built-in Expected Goals (xG) modeling.
- Teams: NHL team data, rosters, metadata
- Schedule: Team schedules with game states and scores
- Standings: League standings
- Player Stats: Skater and goalie statistics
- Play-by-Play: Game events with coordinates
- Draft Data: Historical draft picks
- Expected Goals (xG): Built-in xG model
- Python API: pandas/polars support
- Command-Line Interface: Quick exports
- Jupyter Notebooks: Interactive examples
- Modular: Fast imports (~100ms)
- Flexible Output: CSV, JSON, Parquet, Excel
- Backward Compatible: Works with existing code
- Documented: Guides and API reference
pip install scrapernhlInstall the development version with the latest features and fixes:
pip install git+https://github.com/maxtixador/scrapernhl.gitOr with uv:
uv pip install git+https://github.com/maxtixador/scrapernhl.gitgit clone https://github.com/maxtixador/scrapernhl.git
cd scrapernhl
pip install -e .from scrapernhl import scrapeTeams, scrapeSchedule, scrapeStandings
# Get all NHL teams
teams = scrapeTeams()
# Get team schedule
schedule = scrapeSchedule("MTL", "20252026")
# Get current standings
from datetime import datetime
standings = scrapeStandings(datetime.now().strftime("%Y-%m-%d"))# Scrape teams
scrapernhl teams --output teams.csv
# Scrape schedule
scrapernhl schedule MTL 20252026 --format json
# Scrape play-by-play with xG
scrapernhl game 2024020001 --with-xg --output game.csv
# Get help
scrapernhl --helpFull documentation: maxtixador.github.io/scrapernhl
Check out the notebooks:
- notebooks/01_basic_scraping.ipynb
- notebooks/02_advanced_analytics.ipynb
- notebooks/03_data_export.ipynb
- Modular architecture
- CLI for all scraping functions
- Documentation website
- Faster imports
- Unit tests
- Standardized code
Contributions welcome - bug reports, features, docs, or code.
MIT License - see LICENSE file for details
Max Tixador | Hockey Analytics Enthusiast
- Twitter: @woumaxx
- Bluesky: @HabsBrain.com
- Email: maxtixador@gmail.com
Built for the hockey analytics community.
Last Updated: January 2026 | Version: 0.1.4