GitPedia

Cfbd python

Python wrapper for the CFBD API

From CFBD·Updated June 16, 2026·View on GitHub·

This is an API for query various college football datasets and analytics. API keys can be acquired from the CollegeFootballData.com website. The project is written primarily in Python, first published in 2020. Key topics include: cfb, cfb-analytics, college-football, sports-analytics, sports-data.

cfbd

This is an API for query various college football datasets and analytics. API keys can be acquired from the CollegeFootballData.com website.

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 5.14.2
  • Package version: 5.14.2
  • Generator version: 7.12.0
  • Build package: org.openapitools.codegen.languages.PythonPydanticV1ClientCodegen

Requirements.

Python 3.7+

Installation & Usage

pip install

sh
pip install cfbd

(you may need to run pip with root permission: sudo pip install cfbd)

Then import the package:

python
import cfbd

Getting Started

Please follow the installation procedure and then run the following:

python
import time import cfbd from cfbd.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.collegefootballdata.com # See configuration.py for a list of all supported configuration parameters. configuration = cfbd.Configuration( host = "https://api.collegefootballdata.com" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: apiKey configuration = cfbd.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with cfbd.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cfbd.AdjustedMetricsApi(api_client) year = 56 # int | Optional year filter (optional) team = 'team_example' # str | Optional team filter (optional) conference = 'conference_example' # str | Optional conference abbreviation filter (optional) position = 'position_example' # str | Optional position abbreviation filter (optional) try: api_response = api_instance.get_adjusted_player_passing_stats(year=year, team=team, conference=conference, position=position) print("The response of AdjustedMetricsApi->get_adjusted_player_passing_stats:\n") pprint(api_response) except ApiException as e: print("Exception when calling AdjustedMetricsApi->get_adjusted_player_passing_stats: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://api.collegefootballdata.com

ClassMethodHTTP requestDescription
AdjustedMetricsApiget_adjusted_player_passing_statsGET /wepa/players/passing
AdjustedMetricsApiget_adjusted_player_rushing_statsGET /wepa/players/rushing
AdjustedMetricsApiget_adjusted_team_season_statsGET /wepa/team/season
AdjustedMetricsApiget_kicker_paarGET /wepa/players/kicking
BettingApiget_linesGET /lines
CoachesApiget_coachesGET /coaches
ConferencesApiget_conferencesGET /conferences
DraftApiget_draft_picksGET /draft/picks
DraftApiget_draft_positionsGET /draft/positions
DraftApiget_draft_teamsGET /draft/teams
DrivesApiget_drivesGET /drives
GamesApiget_advanced_box_scoreGET /game/box/advanced
GamesApiget_calendarGET /calendar
GamesApiget_game_player_statsGET /games/players
GamesApiget_game_team_statsGET /games/teams
GamesApiget_gamesGET /games
GamesApiget_mediaGET /games/media
GamesApiget_recordsGET /records
GamesApiget_scoreboardGET /scoreboard
GamesApiget_weatherGET /games/weather
InfoApiget_user_infoGET /info
MetricsApiget_field_goal_expected_pointsGET /metrics/fg/ep
MetricsApiget_predicted_pointsGET /ppa/predicted
MetricsApiget_predicted_points_added_by_gameGET /ppa/games
MetricsApiget_predicted_points_added_by_player_gameGET /ppa/players/games
MetricsApiget_predicted_points_added_by_player_seasonGET /ppa/players/season
MetricsApiget_predicted_points_added_by_teamGET /ppa/teams
MetricsApiget_pregame_win_probabilitiesGET /metrics/wp/pregame
MetricsApiget_win_probabilityGET /metrics/wp
PlayersApiget_player_season_overviewGET /player/season/overview
PlayersApiget_player_usageGET /player/usage
PlayersApiget_returning_productionGET /player/returning
PlayersApiget_transfer_portalGET /player/portal
PlayersApisearch_playersGET /player/search
PlaysApiget_live_playsGET /live/plays
PlaysApiget_play_stat_typesGET /plays/stats/types
PlaysApiget_play_statsGET /plays/stats
PlaysApiget_play_typesGET /plays/types
PlaysApiget_playsGET /plays
RankingsApiget_rankingsGET /rankings
RatingsApiget_conference_spGET /ratings/sp/conferences
RatingsApiget_eloGET /ratings/elo
RatingsApiget_fpiGET /ratings/fpi
RatingsApiget_spGET /ratings/sp
RatingsApiget_srsGET /ratings/srs
RecruitingApiget_aggregated_team_recruiting_ratingsGET /recruiting/groups
RecruitingApiget_recruitsGET /recruiting/players
RecruitingApiget_team_recruiting_rankingsGET /recruiting/teams
StatsApiget_advanced_game_statsGET /stats/game/advanced
StatsApiget_advanced_season_statsGET /stats/season/advanced
StatsApiget_categoriesGET /stats/categories
StatsApiget_game_havoc_statsGET /stats/game/havoc
StatsApiget_player_season_statsGET /stats/player/season
StatsApiget_team_statsGET /stats/season
TeamsApiget_fbs_teamsGET /teams/fbs
TeamsApiget_matchupGET /teams/matchup
TeamsApiget_rosterGET /roster
TeamsApiget_talentGET /talent
TeamsApiget_teamsGET /teams
TeamsApiget_teams_atsGET /teams/ats
VenuesApiget_venuesGET /venues

Documentation For Models

<a id="documentation-for-authorization"></a>

Documentation For Authorization

Authentication schemes defined for the API:
<a id="apiKey"></a>

apiKey

  • Type: Bearer authentication

Author

admin@collegefootballdata.com

Contributors

Showing top 2 contributors by commit count.

View all contributors on GitHub →

This article is auto-generated from CFBD/cfbd-python via the GitHub API.Last fetched: 6/16/2026