Skip to main content
Version: 0.1.5

CBS — CBS Sports NAPI (api.cbssports.com/napi) — Other

cbs_bulk​

Resolve resources in bulk to save HTTP traffic.

Endpoint URL: GET https://api.cbssports.com/napi/resource/bulk

Valid URL: https://api.cbssports.com/napi/resource/bulk

API ParameterPythonPatternRequiredNullableDescription
PlayerResourceplayer_resourceYCSV list of player IDs to retrieve.
TeamResourceteam_resourceYCSV list of team IDs to retrieve.
GameResourcegame_resourceYCSV list of game IDs to retrieve.
VenueResourcevenue_resourceYCSV list of venue IDs to retrieve
EventResourceevent_resourceYCSV list of event IDs to retrieve
FeaturedGameResourcefeatured_game_resourceYCSV list of game IDs to retrieve.
GolfEventMarketsResourcegolf_event_markets_resourceYCSV list of golf event markets IDs to retrieve

Returns​

return_parsed=True (default) — a tidy polars.DataFrame (parser: parse_cbs_napi); pass return_as_pandas=True for a pandas.DataFrame. return_parsed=False — the raw JSON Dict payload, unparsed.

Example​

cbs_bulk()

Last validated n/a.

cbs_client_config​

Get configuration for how a client should access our APIs, or any additional settings they want supplied to them.

Endpoint URL: GET https://api.cbssports.com/napi/resource/client/config/{client_name}

Valid URL: https://api.cbssports.com/napi/resource/client/config/cbs

API ParameterPythonPatternRequiredNullableDescription
client_nameclient_nameYClient name as it appears in the database
resourcesresourcesYAllowed: league, season.
leagueIdleague_idYView option. Filter by leagueId.
classifierclassifierYView option. Filter by a certain classifier.
keyNamekey_nameYView option. Filter by a custom key name.

Returns​

return_parsed=True (default) — a tidy polars.DataFrame (parser: parse_cbs_napi); pass return_as_pandas=True for a pandas.DataFrame. return_parsed=False — the raw JSON Dict payload, unparsed.

Example​

cbs_client_config(client_name='cbs')

Last validated n/a.

cbs_coach_rankings​

Get rankings resource for a coach.

Endpoint URL: GET https://api.cbssports.com/napi/resource/coach/rankings/{coach_id}

API ParameterPythonPatternRequiredNullableDescription
coach_idcoach_idYNumerical player ID

Returns​

return_parsed=True (default) — a tidy polars.DataFrame (parser: parse_cbs_napi); pass return_as_pandas=True for a pandas.DataFrame. return_parsed=False — the raw JSON Dict payload, unparsed.

Example​

cbs_coach_rankings()

Last validated n/a.

cbs_coach_team_associations​

Get team associations for a particular coach.

Endpoint URL: GET https://api.cbssports.com/napi/resource/coach/teamAssociations/{coach_id}

API ParameterPythonPatternRequiredNullableDescription
coach_idcoach_idYNumerical player ID
resourcesresourcesYSpecify specific sub-resources to resolve. Defaults to none. Allowed: team.

Returns​

return_parsed=True (default) — a tidy polars.DataFrame (parser: parse_cbs_napi); pass return_as_pandas=True for a pandas.DataFrame. return_parsed=False — the raw JSON Dict payload, unparsed.

Example​

cbs_coach_team_associations()

Last validated n/a.

cbs_division_subdivisions​

Get subdivisions for a division from Atlas.

Endpoint URL: GET https://api.cbssports.com/napi/resource/division/subdivisions/{division_id}

API ParameterPythonPatternRequiredNullableDescription
division_iddivision_idYNumerical division ID
subDivisionIdsub_division_idYView option for rendering only a certain subdivision
namenameYView option for a csv of subdivsion names to render

Returns​

return_parsed=True (default) — a tidy polars.DataFrame (parser: parse_cbs_napi); pass return_as_pandas=True for a pandas.DataFrame. return_parsed=False — the raw JSON Dict payload, unparsed.

Example​

cbs_division_subdivisions()

Last validated n/a.

cbs_endpoint_registry​

Get the resource endpoint registry

Endpoint URL: GET https://api.cbssports.com/napi/resource/endpoint/registry

Valid URL: https://api.cbssports.com/napi/resource/endpoint/registry

API ParameterPythonPatternRequiredNullableDescription

Returns​

return_parsed=True (default) — a tidy polars.DataFrame with the columns below; pass return_as_pandas=True for a pandas.DataFrame.

col_nametypedescription
keycharacterRegistry key for the endpoint, which is CBS's internal resource class name such as BoxscoreResource or PlayerResource; the parser lifts it out of the payload's top-level key into a column.
locationcharacter
routecharacter
pathcharacterOpenAPI-style request path for the endpoint with brace placeholders, e.g. /resource/game/boxscore/{gameId}.
summarycharacter
notescharacter
methodscharacterJSON-encoded list of HTTP verbs the endpoint accepts; every entry in the captured registry allows GET only.
formatscharacterJSON-encoded list of response serialisations the endpoint can emit, json throughout the captured registry.
parameterscharacterJSON-encoded list of parameter descriptors, each carrying name, required, dataType, paramType (path or query), an optional allowedValues enumeration and CBS's own prose description.
versions_allowedcharacterJSON-encoded list of API versions the endpoint will serve, e.g. ["v1"].
versions_currentcharacterAPI version the endpoint serves when the caller does not pin one, e.g. v1.
auth_settings_require_authlogicalWhether CBS's registry marks the endpoint as requiring an authenticated client; the data-backed resources stay anonymously reachable in practice even where this is true.
auth_settings_allow_onlycharacterJSON-encoded list of CBS client identifiers allow-listed for the endpoint, e.g. mweb, mobile, fantasy, prism.
resource_cache_nscharacterCache namespace CBS files the endpoint's responses under, e.g. FINALBOXSCORE or PLAYERTEAMASSOCIATION.
resource_cache_cache_keyscharacterJSON-encoded list of request parameters that compose the endpoint's cache key, e.g. ["gameId"].
resource_cache_cache_busterintegerGeneration counter CBS bumps to invalidate every cached response for the endpoint.
expiration_message_object_key_namecharacterPayload key CBS quotes back in the endpoint's cache-expiration message, e.g. objectKey, playerId or teamId.
routescharacterJSON-encoded list of colon-style route patterns for the endpoints reachable at more than one route; only the conference, division and team resources carry it, each adding a /resource/vendor/{vendorId}/... variant.
pathscharacterJSON-encoded list of brace-style request paths matching routes, present only on the endpoints that expose several routes.
expiration_messagecharacterCache-expiration descriptor as CBS returns it for the four entries where the block is null rather than an object; the object form is flattened into expiration_message_object_key_name instead.
is_activecharacter
resource_cache_no_cachecharacterMarker carried only by the endpoints CBS never caches (the bulk controller and the registry itself), whose resourceCache block holds noCache in place of a namespace.

return_parsed=False — the raw JSON Dict payload, unparsed.

Example​

cbs_endpoint_registry()

Last validated n/a.

cbs_event​

Get an event resource

Endpoint URL: GET https://api.cbssports.com/napi/resource/event/{event_id}

API ParameterPythonPatternRequiredNullableDescription
event_idevent_idYNumerical event ID
dateFormatdate_formatYOptional. Options here: http://momentjs.com/docs/#/displaying/format/
resourcesresourcesYSpecify specific sub-resources to resolve. Defaults to none. Allowed: entrants, venues, leaderboard, weather, markets.

Returns​

return_parsed=True (default) — a tidy polars.DataFrame (parser: parse_cbs_napi); pass return_as_pandas=True for a pandas.DataFrame. return_parsed=False — the raw JSON Dict payload, unparsed.

Example​

cbs_event()

Last validated n/a.

cbs_event_entrants​

Get players entered in a particular event.

Endpoint URL: GET https://api.cbssports.com/napi/resource/event/entrants/{event_id}

API ParameterPythonPatternRequiredNullableDescription
event_idevent_idYNumerical event ID

Returns​

return_parsed=True (default) — a tidy polars.DataFrame (parser: parse_cbs_napi); pass return_as_pandas=True for a pandas.DataFrame. return_parsed=False — the raw JSON Dict payload, unparsed.

Example​

cbs_event_entrants()

Last validated n/a.

cbs_event_leaderboard​

Get a leaderboard data resource for a particular event.

Endpoint URL: GET https://api.cbssports.com/napi/resource/event/leaderboard/{event_id}

API ParameterPythonPatternRequiredNullableDescription
event_idevent_idYNumerical event ID

Returns​

return_parsed=True (default) — a tidy polars.DataFrame (parser: parse_cbs_napi); pass return_as_pandas=True for a pandas.DataFrame. return_parsed=False — the raw JSON Dict payload, unparsed.

Example​

cbs_event_leaderboard()

Last validated n/a.

cbs_event_seasons​

Get seasons associated to a particular event.

Endpoint URL: GET https://api.cbssports.com/napi/resource/event/seasons/{event_id}

API ParameterPythonPatternRequiredNullableDescription
event_idevent_idYNumerical event ID

Returns​

return_parsed=True (default) — a tidy polars.DataFrame (parser: parse_cbs_napi); pass return_as_pandas=True for a pandas.DataFrame. return_parsed=False — the raw JSON Dict payload, unparsed.

Example​

cbs_event_seasons()

Last validated n/a.

cbs_event_venues​

Get venues associated to a particular event.

Endpoint URL: GET https://api.cbssports.com/napi/resource/event/venues/{event_id}

API ParameterPythonPatternRequiredNullableDescription
event_idevent_idYNumerical event ID

Returns​

return_parsed=True (default) — a tidy polars.DataFrame (parser: parse_cbs_napi); pass return_as_pandas=True for a pandas.DataFrame. return_parsed=False — the raw JSON Dict payload, unparsed.

Example​

cbs_event_venues()

Last validated n/a.

cbs_game​

Get a game resource

Endpoint URL: GET https://api.cbssports.com/napi/resource/game/{game_id}

API ParameterPythonPatternRequiredNullableDescription
game_idgame_idYNumerical game ID
dateFormatdate_formatYOptional. Options here: http://momentjs.com/docs/#/displaying/format/
resourcesresourcesYSpecify specific sub-resources to resolve. Defaults to none. Allowed: homeTeam, awayTeam, league, lineup, odds, players, standings, conference, division, probablePlayers, player, playerTeamAssociations, injuries, transactions, depthCharts, metaData, boxscore, venue, scoringLeaders, scoringPlayerStats, scoringScoreboard, scoringScores, scoringYtdPlayerStats, scoringYtdTeamStats, scoringRosters, scoringPlays, scoringTeamStats, scoringBoxscores, gameOdds, gameOutcomes, ticket, scoringDrives, scoringWinProb, gameHqOdds, weather, featured, gameProps, bettingSplits, gameRTWP.

Returns​

return_parsed=True (default) — a tidy polars.DataFrame (parser: parse_cbs_napi); pass return_as_pandas=True for a pandas.DataFrame. return_parsed=False — the raw JSON Dict payload, unparsed.

Example​

cbs_game()

Last validated n/a.

cbs_golf_event_markets​

Get markets for an event.

Endpoint URL: GET https://api.cbssports.com/napi/resource/golf/event/markets/{event_id}

API ParameterPythonPatternRequiredNullableDescription
event_idevent_idYNumerical event ID

Returns​

return_parsed=True (default) — a tidy polars.DataFrame (parser: parse_cbs_napi); pass return_as_pandas=True for a pandas.DataFrame. return_parsed=False — the raw JSON Dict payload, unparsed.

Example​

cbs_golf_event_markets()

Last validated n/a.

cbs_golf_player_markets​

Get markets for a golfer.

Endpoint URL: GET https://api.cbssports.com/napi/resource/golf/player/markets/{player_id}

Valid URL: https://api.cbssports.com/napi/resource/golf/player/markets/1751796

API ParameterPythonPatternRequiredNullableDescription
player_idplayer_idYNumerical player ID
eventIdevent_idYView option. Filter by eventId.

Returns​

return_parsed=True (default) — a tidy polars.DataFrame (parser: parse_cbs_napi); pass return_as_pandas=True for a pandas.DataFrame. return_parsed=False — the raw JSON Dict payload, unparsed.

Example​

cbs_golf_player_markets(player_id=1751796)

Last validated n/a.

cbs_golfer_results​

Get golfer tournament results resource for a particular player.

Endpoint URL: GET https://api.cbssports.com/napi/resource/golfer/results/{player_id}

Valid URL: https://api.cbssports.com/napi/resource/golfer/results/1751796

API ParameterPythonPatternRequiredNullableDescription
player_idplayer_idYNumerical player ID
seasonYearseason_yearYView option. Filter by seasonType.
seasonIdseason_idYView option. Filter by seasonId.

Returns​

return_parsed=True (default) — a tidy polars.DataFrame (parser: parse_cbs_napi); pass return_as_pandas=True for a pandas.DataFrame. return_parsed=False — the raw JSON Dict payload, unparsed.

Example​

cbs_golfer_results(player_id=1751796)

Last validated n/a.

cbs_league​

Get a league resource

Endpoint URL: GET https://api.cbssports.com/napi/resource/league/{league_id}

Valid URL: https://api.cbssports.com/napi/resource/league/59

API ParameterPythonPatternRequiredNullableDescription
league_idleague_idYNumerical league ID
resourcesresourcesYSpecify specific sub-resources to resolve. Defaults to none. Allowed: teams, players, standings, conference, division, polls, teamSeasons.

Returns​

return_parsed=True (default) — a tidy polars.DataFrame with the columns below; pass return_as_pandas=True for a pandas.DataFrame.

col_nametypedescription
league_idintegerSleeper league id, as a string.
league_abbrcharacterShort CBS code for the league, e.g. NFL, NHL, NCAAB, EPL.
league_namecharacter
sport_idinteger
league_typecharacterSingle-character CBS classification code for the league; all seventeen captured leagues carry M and CBS does not publish the rest of the code set.
teamscharacter
color_primarycharacterPrimary brand colour of the league as six hex digits, inconsistently prefixed with a hash (#003369 for the NFL, 002D72 for MLB); null for the leagues CBS carries no palette for.
color_secondarycharacterSecondary brand colour of the league as six hex digits, with the same inconsistent hash prefix as color_primary; null where CBS carries no palette.

return_parsed=False — the raw JSON Dict payload, unparsed.

Example​

cbs_league(league_id=59)

Last validated n/a.

cbs_league_teams​

Get team resources on a league with optional vendor overlay

Endpoint URL: GET https://api.cbssports.com/napi/resource/league/teams/{league_id}

Valid URL: https://api.cbssports.com/napi/resource/league/teams/59

API ParameterPythonPatternRequiredNullableDescription
league_idleague_idYNumerical league Id - gets team from team table not teams for season
resourcesresourcesYSpecify specific sub-resources to resolve. Defaults to none. Allowed: players, standings, conference, division, playerTeamAssociations, injuries, transactions, depthCharts, polls, teamSeasons, sportsLineStandings.

Returns​

return_parsed=True (default) — a tidy polars.DataFrame (parser: parse_cbs_napi); pass return_as_pandas=True for a pandas.DataFrame. return_parsed=False — the raw JSON Dict payload, unparsed.

Example​

cbs_league_teams(league_id=59)

Last validated n/a.

cbs_odds​

Get an odds resource for a particular game.

Endpoint URL: GET https://api.cbssports.com/napi/resource/odds/{game_id}

API ParameterPythonPatternRequiredNullableDescription
game_idgame_idYNumerical game ID

Returns​

return_parsed=True (default) — a tidy polars.DataFrame (parser: parse_cbs_napi); pass return_as_pandas=True for a pandas.DataFrame. return_parsed=False — the raw JSON Dict payload, unparsed.

Example​

cbs_odds()

Last validated n/a.

cbs_recruit_rankings​

Get rankings resource for a recruit.

Endpoint URL: GET https://api.cbssports.com/napi/resource/recruit/rankings/{player_id}

Valid URL: https://api.cbssports.com/napi/resource/recruit/rankings/1751796

API ParameterPythonPatternRequiredNullableDescription
player_idplayer_idYNumerical player ID

Returns​

return_parsed=True (default) — a tidy polars.DataFrame (parser: parse_cbs_napi); pass return_as_pandas=True for a pandas.DataFrame. return_parsed=False — the raw JSON Dict payload, unparsed.

Example​

cbs_recruit_rankings(player_id=1751796)

Last validated n/a.

cbs_season​

Get a season resource from Atlas.

Endpoint URL: GET https://api.cbssports.com/napi/resource/season/{season_id}

Valid URL: https://api.cbssports.com/napi/resource/season/59

API ParameterPythonPatternRequiredNullableDescription
season_idseason_idYNumerical season ID
dateFormatdate_formatYOptional. Options here: http://momentjs.com/docs/#/displaying/format/
resourcesresourcesYSpecify specific sub-resources to resolve. Defaults to none. Allowed: sport, league, teams.

Returns​

return_parsed=True (default) — a tidy polars.DataFrame (parser: parse_cbs_napi); pass return_as_pandas=True for a pandas.DataFrame. return_parsed=False — the raw JSON Dict payload, unparsed.

Example​

cbs_season(season_id=59)

Last validated n/a.

cbs_season_teams​

Get team resources associated to a season

Endpoint URL: GET https://api.cbssports.com/napi/resource/season/teams/{season_id}

Valid URL: https://api.cbssports.com/napi/resource/season/teams/59

API ParameterPythonPatternRequiredNullableDescription
season_idseason_idYOptional seasonYear for leagues that change teams each year.
resourcesresourcesYSpecify specific sub-resources to resolve. Defaults to none. Allowed: players, standings, conference, division, playerTeamAssociations, injuries, transactions, depthCharts, polls, teamSeasons, sportsLineStandings, league.

Returns​

return_parsed=True (default) — a tidy polars.DataFrame with the columns below; pass return_as_pandas=True for a pandas.DataFrame.

col_nametypedescription
team_idinteger
stub_hub_team_idintegerStubHub performer id for the team, which is the key behind ticket_url; entirely null for the ten soccer leagues and populated only for MLB, MLS, NBA, NCAAB, NCAAF, NFL and NHL, so the port pins it back to Int64 after pandas widens the nullable column to float.
locationcharacter
nick_namecharacter
medium_namecharacterMedium-length display name for the team, sitting between short_name and the full location plus nickname (Arizona for the Cardinals, Duke University, Werder Bremen).
short_namecharacter
abbrevcharacter
statuscharacter
home_venue_idinteger
conference_idinteger
league_idinteger
division_idinteger
ticket_urlcharacterStubHub ticket-purchase URL for the team, either a bare /performer/{id} link or a slugged team-tickets link; an empty string for the leagues where CBS carries no StubHub performer.
color_hex_dexcharacterSix-digit team colour drawn from CBS's own colour index, with no leading hash and an empty string where unset; it can differ slightly from color_primary_hex (96223E against 97233f for the Arizona Cardinals).
color_primary_hexcharacterTeam's primary colour as six hex digits with no leading hash, e.g. 97233f.
color_secondary_hexcharacterTeam's secondary colour as six hex digits with no leading hash, e.g. 000000.
playerscharacter
leaguecharacter
standingscharacterNested standings sub-resource for the team, JSON-encoded when present; null unless the request asked for it through the endpoint's resources parameter, which defaults to none.
conferencecharacter
divisioncharacter
team_seasonscharacterNested list of the team's season records, JSON-encoded when present; null unless requested through the resources parameter.
pollscharacterNested poll-ranking sub-resource for the team, JSON-encoded when present; null unless requested through the resources parameter.
home_venuecharacterNested venue record for the team's home site, JSON-encoded when present; null unless requested through the resources parameter, with home_venue_id always carrying the id.
sports_line_standingscharacterNested SportsLine standings sub-resource for the team, JSON-encoded when present; null unless requested through the resources parameter.
team_statscharacterNested team-statistics sub-resource, JSON-encoded when present; null unless requested through the resources parameter.
team_rankingscharacterNested team-rankings sub-resource, JSON-encoded when present; null unless requested through the resources parameter.
sports_line_rankingscharacterNested SportsLine rankings sub-resource, JSON-encoded when present; null unless requested through the resources parameter.
meta_tsa_overlaylogicalFlag on the record's meta block marking the team as carrying CBS's TSA overlay; true for every team across the captured leagues.
meta_season_idintegerSeason identifier CBS attaches to each team record's meta block, a small league-scoped number (2 for MLB, 18 for the NFL, 35 for the Premier League) that is constant across every team in one response and lives in a different id space from the season_id on standings rows.

return_parsed=False — the raw JSON Dict payload, unparsed.

Example​

cbs_season_teams(season_id=59)

Last validated n/a.

cbs_sport​

Get a sport resource from Atlas.

Endpoint URL: GET https://api.cbssports.com/napi/resource/sport/{sport_id}

Valid URL: https://api.cbssports.com/napi/resource/sport/1

API ParameterPythonPatternRequiredNullableDescription
sport_idsport_idYNumerical sport ID
resourcesresourcesYSpecify specific sub-resources to resolve. Defaults to none. Allowed: leagues.

Returns​

return_parsed=True (default) — a tidy polars.DataFrame (parser: parse_cbs_napi); pass return_as_pandas=True for a pandas.DataFrame. return_parsed=False — the raw JSON Dict payload, unparsed.

Example​

cbs_sport(sport_id=1)

Last validated n/a.

cbs_sport_leagues​

Get league resources for a sport.

Endpoint URL: GET https://api.cbssports.com/napi/resource/sport/leagues/{sport_id}

Valid URL: https://api.cbssports.com/napi/resource/sport/leagues/1

API ParameterPythonPatternRequiredNullableDescription
sport_idsport_idYNumerical league ID

Returns​

return_parsed=True (default) — a tidy polars.DataFrame (parser: parse_cbs_napi); pass return_as_pandas=True for a pandas.DataFrame. return_parsed=False — the raw JSON Dict payload, unparsed.

Example​

cbs_sport_leagues(sport_id=1)

Last validated n/a.

cbs_venue​

Get a venue resource

Endpoint URL: GET https://api.cbssports.com/napi/resource/venue/{venue_id}

API ParameterPythonPatternRequiredNullableDescription
venue_idvenue_idYNumerical venue ID
resourcesresourcesYSpecify specific sub-resources to resolve. Defaults to none. Allowed: metaData.

Returns​

return_parsed=True (default) — a tidy polars.DataFrame (parser: parse_cbs_napi); pass return_as_pandas=True for a pandas.DataFrame. return_parsed=False — the raw JSON Dict payload, unparsed.

Example​

cbs_venue()

Last validated n/a.

cbs_venue_metadata​

Get a venues metadata resource

Endpoint URL: GET https://api.cbssports.com/napi/resource/venue/metadata/{venue_id}

API ParameterPythonPatternRequiredNullableDescription
venue_idvenue_idYNumerical venue ID

Returns​

return_parsed=True (default) — a tidy polars.DataFrame (parser: parse_cbs_napi); pass return_as_pandas=True for a pandas.DataFrame. return_parsed=False — the raw JSON Dict payload, unparsed.

Example​

cbs_venue_metadata()

Last validated n/a.