% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/nhlscraper-package.R
\docType{package}
\name{nhlscraper}
\alias{nhlscraper}
\alias{nhlscraper-package}
\title{nhlscraper: Scrape, clean, and visualize NHL data}
\description{
\code{nhlscraper} is a minimum-dependency R package to scrape, clean, and
visualize NHL data via the NHL and ESPN APIs. It primarily wraps 125+
\href{https://github.com/RentoSaijo/nhlscraper/wiki}{endpoints} from high-level
multi-season summaries and award winners to low-level decisecond replays and
bookmakers' odds, making them significantly more accessible. It also
features cleaning and visualization functions, primarily for play-by-plays,
to help analyze the data.
}
\section{Prerequisite}{

\itemize{
\item R/RStudio; you can check out my
\href{https://youtu.be/CUXzeuXJCPs?si=bkWFAm-hSXhUsxaN}{tutorial} if you are not
familiar.
}
}

\section{Disclosure}{

Detailed documentation for each scraping function will be released gradually
over time. Because each function can return a large amount of information,
users are encouraged to explore the provided examples to discover what is
available. Most, if not all, of the endpoints accessed by this package are
unofficially documented (i.e., hidden), so it is important to use them
responsibly and with respect for the NHL's data servers. Endpoints serving
historical or otherwise mostly static data should ideally be queried once and
then stored locally (for example, in a MySQL database) for further analysis,
rather than being called repeatedly; the
\href{https://rentosaijo.github.io/nhlscraper/reference/index.html#load}{load functions}
attempt to mitigate this risk by providing pre-scraped data, so please make
use of them. The exact rate limits for these APIs are not publicly known, so
users are asked to avoid excessive or abusive querying to help ensure
continued access for everyone.
}

\section{History}{

Prior to the NHL API rework in 2023, Drew Hynes documented a comprehensive
list of known \href{https://gitlab.com/dword4/nhlapi/}{endpoints}, and several R
packages, such as \href{https://github.com/jozefhajnala/nhlapi}{nhlapi} and
\href{https://github.com/danmorse314/hockeyR}{hockeyR}, were built to access them.
However, after the NHL completely transformed its API structure, all of these
packages became mostly defunct as their authors understandably chose not to
continue maintaining them. The community gathered around work by Zachary
Maludzinski to discover and share new
\href{https://github.com/Zmalski/NHL-API-Reference}{endpoints}, but progress
naturally slowed once most of the "main" endpoints were identified. Over the
summer of 2025, I began reverse-engineering many of the remaining,
undocumented endpoints while searching for additional data for future
research, with a particular focus on NHL EDGE and Records data. After I
shared those
\href{https://github.com/Zmalski/NHL-API-Reference/issues/69}{findings}, the
effort to expand and refine this map of the APIs accelerated, and with the
addition of David Fleischer's
\href{https://github.com/dfleis/nhl-api-docs}{effort}, we ultimately identified
400+ new endpoints. In parallel, I also discovered many new endpoints for
the ESPN API, extending beyond what Joseph Wilson had already
\href{https://github.com/pseudo-r/Public-ESPN-API}{compiled}.
}

\seealso{
Useful links:
\itemize{
  \item \url{https://rentosaijo.github.io/nhlscraper/}
  \item \url{https://github.com/RentoSaijo/nhlscraper}
  \item Report bugs at \url{https://github.com/RentoSaijo/nhlscraper/issues}
}

}
\author{
\strong{Maintainer}: Rento Saijo \email{rentosaijo0527@gmail.com} (\href{https://orcid.org/0009-0008-4919-7349}{ORCID}) [copyright holder]

Other contributors:
\itemize{
  \item Lars Skytte \email{lars.sunesen.skytte@gmail.com} [contributor]
  \item Jack Pallotta \email{jackjpallotta@gmail.com} (\href{https://orcid.org/0009-0004-0744-6977}{ORCID}) [contributor]
}

}
