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.13.1
- Package version: 5.13.1
- Generator version: 7.12.0
- Build package: org.openapitools.codegen.languages.PythonPydanticV1ClientCodegen
Python 3.7+
pip install cfbd
(you may need to run pip
with root permission: sudo pip install cfbd
)
Then import the package:
import cfbd
Please follow the installation procedure and then run the following:
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)
See the examples/
directory for more usage examples:
examples/basic_usage.py
- Basic API usage demonstrationexamples/weekly_picks.py
- Weekly college football picks generator using multiple data sources
The weekly_picks.py
script provides a comprehensive tool for generating weekly college football game picks:
# Generate picks for a specific week
python examples/weekly_picks.py --year 2023 --week 5
# Filter by conference
python examples/weekly_picks.py --year 2023 --week 5 --conference SEC
# Show only high confidence picks
python examples/weekly_picks.py --year 2023 --week 5 --min-confidence HIGH
The picks generator analyzes:
- Betting lines and spreads from multiple providers
- Team ratings (ELO, SP+, FPI, SRS)
- Pregame win probabilities
- Advanced team statistics and metrics
Picks are presented with confidence levels (HIGH, MEDIUM, LOW) and detailed reasoning based on data analysis.
For more details, see examples/README.md.
All URIs are relative to https://api.collegefootballdata.com
Class | Method | HTTP request | Description |
---|---|---|---|
AdjustedMetricsApi | get_adjusted_player_passing_stats | GET /wepa/players/passing | |
AdjustedMetricsApi | get_adjusted_player_rushing_stats | GET /wepa/players/rushing | |
AdjustedMetricsApi | get_adjusted_team_season_stats | GET /wepa/team/season | |
AdjustedMetricsApi | get_kicker_paar | GET /wepa/players/kicking | |
BettingApi | get_lines | GET /lines | |
CoachesApi | get_coaches | GET /coaches | |
ConferencesApi | get_conferences | GET /conferences | |
DraftApi | get_draft_picks | GET /draft/picks | |
DraftApi | get_draft_positions | GET /draft/positions | |
DraftApi | get_draft_teams | GET /draft/teams | |
DrivesApi | get_drives | GET /drives | |
GamesApi | get_advanced_box_score | GET /game/box/advanced | |
GamesApi | get_calendar | GET /calendar | |
GamesApi | get_game_player_stats | GET /games/players | |
GamesApi | get_game_team_stats | GET /games/teams | |
GamesApi | get_games | GET /games | |
GamesApi | get_media | GET /games/media | |
GamesApi | get_records | GET /records | |
GamesApi | get_scoreboard | GET /scoreboard | |
GamesApi | get_weather | GET /games/weather | |
InfoApi | get_user_info | GET /info | |
MetricsApi | get_field_goal_expected_points | GET /metrics/fg/ep | |
MetricsApi | get_predicted_points | GET /ppa/predicted | |
MetricsApi | get_predicted_points_added_by_game | GET /ppa/games | |
MetricsApi | get_predicted_points_added_by_player_game | GET /ppa/players/games | |
MetricsApi | get_predicted_points_added_by_player_season | GET /ppa/players/season | |
MetricsApi | get_predicted_points_added_by_team | GET /ppa/teams | |
MetricsApi | get_pregame_win_probabilities | GET /metrics/wp/pregame | |
MetricsApi | get_win_probability | GET /metrics/wp | |
PlayersApi | get_player_usage | GET /player/usage | |
PlayersApi | get_returning_production | GET /player/returning | |
PlayersApi | get_transfer_portal | GET /player/portal | |
PlayersApi | search_players | GET /player/search | |
PlaysApi | get_live_plays | GET /live/plays | |
PlaysApi | get_play_stat_types | GET /plays/stats/types | |
PlaysApi | get_play_stats | GET /plays/stats | |
PlaysApi | get_play_types | GET /plays/types | |
PlaysApi | get_plays | GET /plays | |
RankingsApi | get_rankings | GET /rankings | |
RatingsApi | get_conference_sp | GET /ratings/sp/conferences | |
RatingsApi | get_elo | GET /ratings/elo | |
RatingsApi | get_fpi | GET /ratings/fpi | |
RatingsApi | get_sp | GET /ratings/sp | |
RatingsApi | get_srs | GET /ratings/srs | |
RecruitingApi | get_aggregated_team_recruiting_ratings | GET /recruiting/groups | |
RecruitingApi | get_recruits | GET /recruiting/players | |
RecruitingApi | get_team_recruiting_rankings | GET /recruiting/teams | |
StatsApi | get_advanced_game_stats | GET /stats/game/advanced | |
StatsApi | get_advanced_season_stats | GET /stats/season/advanced | |
StatsApi | get_categories | GET /stats/categories | |
StatsApi | get_game_havoc_stats | GET /stats/game/havoc | |
StatsApi | get_player_season_stats | GET /stats/player/season | |
StatsApi | get_team_stats | GET /stats/season | |
TeamsApi | get_fbs_teams | GET /teams/fbs | |
TeamsApi | get_matchup | GET /teams/matchup | |
TeamsApi | get_roster | GET /roster | |
TeamsApi | get_talent | GET /talent | |
TeamsApi | get_teams | GET /teams | |
TeamsApi | get_teams_ats | GET /teams/ats | |
VenuesApi | get_venues | GET /venues |
- AdjustedTeamMetrics
- AdjustedTeamMetricsEpa
- AdjustedTeamMetricsRushing
- AdjustedTeamMetricsSuccessRate
- AdvancedBoxScore
- AdvancedBoxScoreGameInfo
- AdvancedBoxScorePlayers
- AdvancedBoxScoreTeams
- AdvancedGameStat
- AdvancedGameStatDefense
- AdvancedGameStatOffense
- AdvancedGameStatOffensePassingDowns
- AdvancedGameStatOffensePassingPlays
- AdvancedSeasonStat
- AdvancedSeasonStatDefense
- AdvancedSeasonStatOffense
- AdvancedSeasonStatOffenseFieldPosition
- AdvancedSeasonStatOffenseHavoc
- AdvancedSeasonStatOffensePassingDowns
- AdvancedSeasonStatOffensePassingPlays
- AggregatedTeamRecruiting
- BettingGame
- CalendarWeek
- Coach
- CoachSeason
- Conference
- ConferenceSP
- ConferenceSPDefense
- ConferenceSPOffense
- DivisionClassification
- DraftPick
- DraftPickHometownInfo
- DraftPosition
- DraftTeam
- Drive
- FieldGoalEP
- Game
- GameHavocStats
- GameHavocStatsOffense
- GameLine
- GameMedia
- GamePlayerStatCategories
- GamePlayerStatPlayer
- GamePlayerStatTypes
- GamePlayerStats
- GamePlayerStatsTeam
- GameStatus
- GameTeamStats
- GameTeamStatsTeam
- GameTeamStatsTeamStat
- GameWeather
- KickerPAAR
- LiveGame
- LiveGameDrive
- LiveGamePlay
- LiveGameTeam
- Matchup
- MatchupGame
- MediaType
- Play
- PlayClock
- PlayStat
- PlayStatClock
- PlayStatType
- PlayType
- PlayWinProbability
- PlayerGamePredictedPointsAdded
- PlayerGamePredictedPointsAddedAveragePPA
- PlayerGameUsage
- PlayerPPA
- PlayerPPAChartItem
- PlayerSearchResult
- PlayerSeasonPredictedPointsAdded
- PlayerSeasonPredictedPointsAddedAveragePPA
- PlayerStat
- PlayerStatsByQuarter
- PlayerTransfer
- PlayerUsage
- PlayerUsageUsage
- PlayerWeightedEPA
- Poll
- PollRank
- PollWeek
- PredictedPointsValue
- PregameWinProbability
- Recruit
- RecruitClassification
- RecruitHometownInfo
- ReturningProduction
- RosterPlayer
- ScoreboardGame
- ScoreboardGameBetting
- ScoreboardGameHomeTeam
- ScoreboardGameVenue
- ScoreboardGameWeather
- SeasonType
- SeasonTypeDB
- StatsByQuarter
- Team
- TeamATS
- TeamElo
- TeamExplosiveness
- TeamFPI
- TeamFPIEfficiencies
- TeamFPIResumeRanks
- TeamFieldPosition
- TeamGamePredictedPointsAdded
- TeamGamePredictedPointsAddedOffense
- TeamHavoc
- TeamPPA
- TeamRecord
- TeamRecords
- TeamRecruitingRanking
- TeamRushingStats
- TeamSP
- TeamSPDefense
- TeamSPOffense
- TeamSPSpecialTeams
- TeamSRS
- TeamScoringOpportunities
- TeamSeasonPredictedPointsAdded
- TeamSeasonPredictedPointsAddedOffense
- TeamStat
- TeamStatStatValue
- TeamSuccessRates
- TeamTalent
- TransferEligibility
- UserInfo
- Venue
Authentication schemes defined for the API:
- Type: Bearer authentication