All URIs are relative to https://api.collegefootballdata.com
Method | HTTP request | Description |
---|---|---|
getAdvancedBoxScore | GET /game/box/advanced | Advanced box scores |
getCalendar | GET /calendar | Season calendar |
getGameMedia | GET /games/media | Game media information and schedules |
getGameWeather | GET /games/weather | Game weather information (Patreon only) |
getGames | GET /games | Games and results |
getPlayerGameStats | GET /games/players | Player game stats |
getScoreboard | GET /scoreboard | Live game results (Patreon only) |
getTeamGameStats | GET /games/teams | Team game stats |
getTeamRecords | GET /records | Team records |
BoxScore getAdvancedBoxScore(gameId)
Advanced box scores
Get advanced box score data
var cfb = require('cfb.js');
var defaultClient = cfb.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
var apiInstance = new cfb.GamesApi();
var gameId = 56; // Number | Game id parameters
apiInstance.getAdvancedBoxScore(gameId).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
gameId | Number | Game id parameters |
- Content-Type: Not defined
- Accept: application/json
[Week] getCalendar(year)
Season calendar
Get calendar of weeks by season
var cfb = require('cfb.js');
var defaultClient = cfb.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
var apiInstance = new cfb.GamesApi();
var year = 56; // Number | Year filter
apiInstance.getCalendar(year).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
year | Number | Year filter |
- Content-Type: Not defined
- Accept: application/json
[GameMedia] getGameMedia(year, opts)
Game media information and schedules
Game media information (TV, radio, etc)
var cfb = require('cfb.js');
var defaultClient = cfb.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
var apiInstance = new cfb.GamesApi();
var year = 56; // Number | Year filter
var opts = {
'week': 56, // Number | Week filter
'seasonType': "seasonType_example", // String | Season type filter (regular, postseason, or both)
'team': "team_example", // String | Team filter
'conference': "conference_example", // String | Conference filter
'mediaType': "mediaType_example", // String | Media type filter (tv, radio, web, ppv, or mobile)
'classification': "classification_example" // String | Division classification filter (fbs/fcs/ii/iii)
};
apiInstance.getGameMedia(year, opts).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
year | Number | Year filter | |
week | Number | Week filter | [optional] |
seasonType | String | Season type filter (regular, postseason, or both) | [optional] |
team | String | Team filter | [optional] |
conference | String | Conference filter | [optional] |
mediaType | String | Media type filter (tv, radio, web, ppv, or mobile) | [optional] |
classification | String | Division classification filter (fbs/fcs/ii/iii) | [optional] |
- Content-Type: Not defined
- Accept: application/json
[GameWeather] getGameWeather(opts)
Game weather information (Patreon only)
Weather information for the hour of kickoff
var cfb = require('cfb.js');
var defaultClient = cfb.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
var apiInstance = new cfb.GamesApi();
var opts = {
'gameId': 56, // Number | Game id filter (required if no year)
'year': 56, // Number | Year filter (required if no game id)
'week': 56, // Number | Week filter
'seasonType': "seasonType_example", // String | Season type filter (regular, postseason, or both)
'team': "team_example", // String | Team filter
'conference': "conference_example", // String | Conference filter
'classification': "classification_example" // String | Division classification filter (fbs/fcs/ii/iii)
};
apiInstance.getGameWeather(opts).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
gameId | Number | Game id filter (required if no year) | [optional] |
year | Number | Year filter (required if no game id) | [optional] |
week | Number | Week filter | [optional] |
seasonType | String | Season type filter (regular, postseason, or both) | [optional] |
team | String | Team filter | [optional] |
conference | String | Conference filter | [optional] |
classification | String | Division classification filter (fbs/fcs/ii/iii) | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Game] getGames(year, opts)
Games and results
Get game results
var cfb = require('cfb.js');
var defaultClient = cfb.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
var apiInstance = new cfb.GamesApi();
var year = 56; // Number | Year/season filter for games
var opts = {
'week': 56, // Number | Week filter
'seasonType': "regular", // String | Season type filter (regular or postseason)
'team': "team_example", // String | Team
'home': "home_example", // String | Home team filter
'away': "away_example", // String | Away team filter
'conference': "conference_example", // String | Conference abbreviation filter
'division': "division_example", // String | Division classification filter (fbs/fcs/ii/iii)
'id': 56 // Number | id filter for querying a single game
};
apiInstance.getGames(year, opts).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
year | Number | Year/season filter for games | |
week | Number | Week filter | [optional] |
seasonType | String | Season type filter (regular or postseason) | [optional] [default to regular] |
team | String | Team | [optional] |
home | String | Home team filter | [optional] |
away | String | Away team filter | [optional] |
conference | String | Conference abbreviation filter | [optional] |
division | String | Division classification filter (fbs/fcs/ii/iii) | [optional] |
id | Number | id filter for querying a single game | [optional] |
- Content-Type: Not defined
- Accept: application/json
[PlayerGame] getPlayerGameStats(year, opts)
Player game stats
Player stats broken down by game
var cfb = require('cfb.js');
var defaultClient = cfb.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
var apiInstance = new cfb.GamesApi();
var year = 56; // Number | Year/season filter for games
var opts = {
'week': 56, // Number | Week filter
'seasonType': "regular", // String | Season type filter (regular or postseason)
'team': "team_example", // String | Team filter
'conference': "conference_example", // String | Conference abbreviation filter
'category': "category_example", // String | Category filter (e.g defensive)
'gameId': 56 // Number | Game id filter
};
apiInstance.getPlayerGameStats(year, opts).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
year | Number | Year/season filter for games | |
week | Number | Week filter | [optional] |
seasonType | String | Season type filter (regular or postseason) | [optional] [default to regular] |
team | String | Team filter | [optional] |
conference | String | Conference abbreviation filter | [optional] |
category | String | Category filter (e.g defensive) | [optional] |
gameId | Number | Game id filter | [optional] |
- Content-Type: Not defined
- Accept: application/json
[ScoreboardGame] getScoreboard(opts)
Live game results (Patreon only)
Get live game results
var cfb = require('cfb.js');
var defaultClient = cfb.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
var apiInstance = new cfb.GamesApi();
var opts = {
'classification': "classification_example", // String | Classification filter (fbs, fcs, ii, or iii). Defaults to fbs.
'conference': "conference_example" // String | Conference abbreviation filter.
};
apiInstance.getScoreboard(opts).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
classification | String | Classification filter (fbs, fcs, ii, or iii). Defaults to fbs. | [optional] |
conference | String | Conference abbreviation filter. | [optional] |
- Content-Type: Not defined
- Accept: application/json
[TeamGame] getTeamGameStats(year, opts)
Team game stats
Team stats broken down by game
var cfb = require('cfb.js');
var defaultClient = cfb.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
var apiInstance = new cfb.GamesApi();
var year = 56; // Number | Year/season filter for games
var opts = {
'week': 56, // Number | Week filter
'seasonType': "regular", // String | Season type filter (regular or postseason)
'team': "team_example", // String | Team filter
'conference': "conference_example", // String | Conference abbreviation filter
'gameId': 56, // Number | Game id filter
'classification': "classification_example" // String | Division classification filter (fbs/fcs/ii/iii)
};
apiInstance.getTeamGameStats(year, opts).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
year | Number | Year/season filter for games | |
week | Number | Week filter | [optional] |
seasonType | String | Season type filter (regular or postseason) | [optional] [default to regular] |
team | String | Team filter | [optional] |
conference | String | Conference abbreviation filter | [optional] |
gameId | Number | Game id filter | [optional] |
classification | String | Division classification filter (fbs/fcs/ii/iii) | [optional] |
- Content-Type: Not defined
- Accept: application/json
[TeamRecord] getTeamRecords(opts)
Team records
Get team records by year
var cfb = require('cfb.js');
var defaultClient = cfb.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
var apiInstance = new cfb.GamesApi();
var opts = {
'year': 56, // Number | Year filter
'team': "team_example", // String | Team filter
'conference': "conference_example" // String | Conference filter
};
apiInstance.getTeamRecords(opts).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
year | Number | Year filter | [optional] |
team | String | Team filter | [optional] |
conference | String | Conference filter | [optional] |
- Content-Type: Not defined
- Accept: application/json