All URIs are relative to https://api.collegefootballdata.com
Method | HTTP request | Description |
---|---|---|
getPlayerSeasonStats | GET /stats/player/season | Player stats by season |
getPlayerUsage | GET /player/usage | Player usage metrics broken down by season |
getReturningProduction | GET /player/returning | Team returning production metrics |
getTransferPortal | GET /player/portal | Transfer portal by season |
playerSearch | GET /player/search | Search for player information |
[PlayerSeasonStat] getPlayerSeasonStats(year, opts)
Player stats by season
Season player stats
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.PlayersApi();
var year = 56; // Number | Year filter
var opts = {
'team': "team_example", // String | Team filter
'conference': "conference_example", // String | Conference abbreviation filter
'startWeek': 56, // Number | Start week filter
'endWeek': 56, // Number | Start week filter
'seasonType': "seasonType_example", // String | Season type filter (regular, postseason, or both)
'category': "category_example" // String | Stat category filter (e.g. passing)
};
apiInstance.getPlayerSeasonStats(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 | |
team | String | Team filter | [optional] |
conference | String | Conference abbreviation filter | [optional] |
startWeek | Number | Start week filter | [optional] |
endWeek | Number | Start week filter | [optional] |
seasonType | String | Season type filter (regular, postseason, or both) | [optional] |
category | String | Stat category filter (e.g. passing) | [optional] |
- Content-Type: Not defined
- Accept: application/json
[PlayerUsage] getPlayerUsage(year, opts)
Player usage metrics broken down by season
Player usage metrics 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.PlayersApi();
var year = 2022; // Number | Year filter
var opts = {
'team': "team_example", // String | Team filter
'conference': "conference_example", // String | Conference abbreviation filter
'position': "position_example", // String | Position abbreviation filter
'playerId': 56, // Number | Player id filter
'excludeGarbageTime': true // Boolean | Filter to remove garbage time plays from calculations
};
apiInstance.getPlayerUsage(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 | [default to 2022] |
team | String | Team filter | [optional] |
conference | String | Conference abbreviation filter | [optional] |
position | String | Position abbreviation filter | [optional] |
playerId | Number | Player id filter | [optional] |
excludeGarbageTime | Boolean | Filter to remove garbage time plays from calculations | [optional] |
- Content-Type: Not defined
- Accept: application/json
[ReturningProduction] getReturningProduction(opts)
Team returning production metrics
Returning production metrics
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.PlayersApi();
var opts = {
'year': 56, // Number | Year filter
'team': "team_example", // String | Team filter
'conference': "conference_example" // String | Conference abbreviation filter
};
apiInstance.getReturningProduction(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 abbreviation filter | [optional] |
- Content-Type: Not defined
- Accept: application/json
[PortalPlayer] getTransferPortal(year)
Transfer portal by season
Transfer portal 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.PlayersApi();
var year = 56; // Number | Year filter
apiInstance.getTransferPortal(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
[PlayerSearchResult] playerSearch(searchTerm, opts)
Search for player information
Search for players
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.PlayersApi();
var searchTerm = "searchTerm_example"; // String | Term to search on
var opts = {
'position': "position_example", // String | Position abbreviation filter
'team': "team_example", // String | Team filter
'year': 56 // Number | Year filter
};
apiInstance.playerSearch(searchTerm, opts).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
searchTerm | String | Term to search on | |
position | String | Position abbreviation filter | [optional] |
team | String | Team filter | [optional] |
year | Number | Year filter | [optional] |
- Content-Type: Not defined
- Accept: application/json