cfbfastR
June 12, 2026 · View on GitHub
cfbfastR 
The goal of cfbfastR is
to provide the community with an R package for working with CFB data. It
is an R API wrapper around https://collegefootballdata.com/. Beyond
data aggregation and tidying ease, one of the multitude of services that
cfbfastR provides is for
benchmarking open-source expected points and win probability metrics.
Installation
You can install the CRAN version of
cfbfastR with:
install.packages("cfbfastR")
You can install the released version of
cfbfastR from
GitHub with:
# You can install using the pacman package using the following code:
if (!requireNamespace('remotes', quietly = TRUE)){
install.packages('remotes', repos = "https://cloud.r-project.org")
}
remotes::install_github("sportsdataverse/cfbfastR")
Breaking Changes
College Football Data API Keys
The CollegeFootballData API now requires an API key, here’s a quick run-down:
-
To get an API key, follow the directions here: College Football Data Key Registration.
-
Using the key: You can save the key for consistent usage by adding
CFBD_API_KEY=YOUR-API-KEY-HEREto your .Renviron file (easily accessed viausethis::edit_r_environ()). Runusethis::edit_r_environ(), a new script will pop open named.Renviron, THEN paste the following in the new script that pops up (without quotations)
CFBD_API_KEY = YOUR-API-KEY-HERE
Save the script and restart your RStudio session, by clicking Session
(in between Plots and Build) and click Restart R (there also
exists the shortcut Ctrl + Shift + F10 to restart your session). If
set correctly, from then on you should be able to use any of the cfbd_
functions without any other changes.
- For less consistent usage: At the beginning of every session or within
an R environment, save your API key as the environment variable
CFBD_API_KEY(with quotations) using a command like the following.
Sys.setenv(CFBD_API_KEY = "YOUR-API-KEY-HERE")
Proxy support
If you run cfbfastR from behind a corporate proxy, set it once per
session and every cfbd_*() / espn_cfb_*() call routes through it:
options(cfbfastR.proxy = "http://proxy.host.example:8080")
# or, for an authenticated proxy:
options(cfbfastR.proxy = list(
url = "http://proxy.host.example", port = 8080,
username = "me", password = "pw", auth = "basic"
))
The resolution order is: explicit proxy = argument ->
getOption("cfbfastR.proxy") -> http_proxy / https_proxy env vars.
See the intro
vignette and
CLAUDE.md for full detail.
Follow cfbfastR and the SportsDataverse on Twitter and star this repo
Our Authors
Our Contributors (they’re awesome)
Authors Emeritus - cfbscrapR[archived]
Special Thanks
Citations
To cite the cfbfastR R
package in publications, use:
BibTex Citation
@article{gilani_et_al_2021_cfbfastr,
author = {Saiem Gilani and Akshay Easwaran and Jared Lee and Eric Hess},
title = {cfbfastR: Access College Football Play by Play Data},
url = {https://cfbfastR.sportsdataverse.org/},
doi = {10.32614/CRAN.package.cfbfastR},
journal = {CRAN: Contributed Packages},
publisher = {The R Foundation},
year = {2021}
}