Skip to main content

CBS Sports — 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.

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The id is unknown -- NAPI answers it with HTTP 200 plus a warnings entry whose code is 404 (or with an HTTP 404).
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty. The fetch failed (a non-2xx answer or a connection failure after retries, or an empty or unreadable 200 body).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.

Example​

cbs_bulk()

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.

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The id is unknown -- NAPI answers it with HTTP 200 plus a warnings entry whose code is 404 (or with an HTTP 404).
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty. The fetch failed (a non-2xx answer or a connection failure after retries, or an empty or unreadable 200 body).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.

Example​

cbs_client_config(client_name='cbs')

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.

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The id is unknown -- NAPI answers it with HTTP 200 plus a warnings entry whose code is 404 (or with an HTTP 404).
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty. The fetch failed (a non-2xx answer or a connection failure after retries, or an empty or unreadable 200 body).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.

Example​

cbs_coach_rankings()

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.

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The id is unknown -- NAPI answers it with HTTP 200 plus a warnings entry whose code is 404 (or with an HTTP 404).
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty. The fetch failed (a non-2xx answer or a connection failure after retries, or an empty or unreadable 200 body).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.

Example​

cbs_coach_team_associations()

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.

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The id is unknown -- NAPI answers it with HTTP 200 plus a warnings entry whose code is 404 (or with an HTTP 404).
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty. The fetch failed (a non-2xx answer or a connection failure after retries, or an empty or unreadable 200 body).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.

Example​

cbs_division_subdivisions()

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
keyStringRegistry 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.
locationString
routeString
pathStringOpenAPI-style request path for the endpoint with brace placeholders, e.g. /resource/game/boxscore/{gameId}.
summaryString
notesString
methodsStringJSON-encoded list of HTTP verbs the endpoint accepts; every entry in the captured registry allows GET only.
formatsStringJSON-encoded list of response serialisations the endpoint can emit, json throughout the captured registry.
parametersStringJSON-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_allowedStringJSON-encoded list of API versions the endpoint will serve, e.g. ["v1"].
versions_currentStringAPI version the endpoint serves when the caller does not pin one, e.g. v1.
auth_settings_require_authBooleanWhether 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_onlyStringJSON-encoded list of CBS client identifiers allow-listed for the endpoint, e.g. mweb, mobile, fantasy, prism.
resource_cache_nsStringCache namespace CBS files the endpoint's responses under, e.g. FINALBOXSCORE or PLAYERTEAMASSOCIATION.
resource_cache_cache_keysStringJSON-encoded list of request parameters that compose the endpoint's cache key, e.g. ["gameId"].
resource_cache_cache_busterInt64Generation counter CBS bumps to invalidate every cached response for the endpoint.
expiration_message_object_key_nameStringPayload key CBS quotes back in the endpoint's cache-expiration message, e.g. objectKey, playerId or teamId.
routesStringJSON-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.
pathsStringJSON-encoded list of brace-style request paths matching routes, present only on the endpoints that expose several routes.
expiration_messageStringCache-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_activeBoolean
resource_cache_no_cacheBooleanMarker 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.

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The id is unknown -- NAPI answers it with HTTP 200 plus a warnings entry whose code is 404 (or with an HTTP 404).
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty. The fetch failed (a non-2xx answer or a connection failure after retries, or an empty or unreadable 200 body).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.

Example​

cbs_endpoint_registry()

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.

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The id is unknown -- NAPI answers it with HTTP 200 plus a warnings entry whose code is 404 (or with an HTTP 404).
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty. The fetch failed (a non-2xx answer or a connection failure after retries, or an empty or unreadable 200 body).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.

Example​

cbs_event()

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.

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The id is unknown -- NAPI answers it with HTTP 200 plus a warnings entry whose code is 404 (or with an HTTP 404).
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty. The fetch failed (a non-2xx answer or a connection failure after retries, or an empty or unreadable 200 body).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.

Example​

cbs_event_entrants()

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.

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The id is unknown -- NAPI answers it with HTTP 200 plus a warnings entry whose code is 404 (or with an HTTP 404).
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty. The fetch failed (a non-2xx answer or a connection failure after retries, or an empty or unreadable 200 body).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.

Example​

cbs_event_leaderboard()

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.

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The id is unknown -- NAPI answers it with HTTP 200 plus a warnings entry whose code is 404 (or with an HTTP 404).
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty. The fetch failed (a non-2xx answer or a connection failure after retries, or an empty or unreadable 200 body).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.

Example​

cbs_event_seasons()

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.

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The id is unknown -- NAPI answers it with HTTP 200 plus a warnings entry whose code is 404 (or with an HTTP 404).
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty. The fetch failed (a non-2xx answer or a connection failure after retries, or an empty or unreadable 200 body).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.

Example​

cbs_event_venues()

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.

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The id is unknown -- NAPI answers it with HTTP 200 plus a warnings entry whose code is 404 (or with an HTTP 404).
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty. The fetch failed (a non-2xx answer or a connection failure after retries, or an empty or unreadable 200 body).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.

Example​

cbs_game()

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.

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The id is unknown -- NAPI answers it with HTTP 200 plus a warnings entry whose code is 404 (or with an HTTP 404).
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty. The fetch failed (a non-2xx answer or a connection failure after retries, or an empty or unreadable 200 body).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.

Example​

cbs_golf_event_markets()

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.

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The id is unknown -- NAPI answers it with HTTP 200 plus a warnings entry whose code is 404 (or with an HTTP 404).
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty. The fetch failed (a non-2xx answer or a connection failure after retries, or an empty or unreadable 200 body).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.

Example​

cbs_golf_player_markets(player_id=1751796)

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.

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The id is unknown -- NAPI answers it with HTTP 200 plus a warnings entry whose code is 404 (or with an HTTP 404).
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty. The fetch failed (a non-2xx answer or a connection failure after retries, or an empty or unreadable 200 body).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.

Example​

cbs_golfer_results(player_id=1751796)

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_idInt64Sleeper league id, as a string.
league_abbrStringShort CBS code for the league, e.g. NFL, NHL, NCAAB, EPL.
league_nameString
sport_idInt64
league_typeStringSingle-character CBS classification code for the league; all seventeen captured leagues carry M and CBS does not publish the rest of the code set.
teamsString
color_primaryStringPrimary 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_secondaryStringSecondary 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.

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The id is unknown -- NAPI answers it with HTTP 200 plus a warnings entry whose code is 404 (or with an HTTP 404).
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty. The fetch failed (a non-2xx answer or a connection failure after retries, or an empty or unreadable 200 body).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.

Example​

cbs_league(league_id=59)

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.

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The id is unknown -- NAPI answers it with HTTP 200 plus a warnings entry whose code is 404 (or with an HTTP 404).
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty. The fetch failed (a non-2xx answer or a connection failure after retries, or an empty or unreadable 200 body).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.

Example​

cbs_league_teams(league_id=59)

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.

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The id is unknown -- NAPI answers it with HTTP 200 plus a warnings entry whose code is 404 (or with an HTTP 404).
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty. The fetch failed (a non-2xx answer or a connection failure after retries, or an empty or unreadable 200 body).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.

Example​

cbs_odds()

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.

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The id is unknown -- NAPI answers it with HTTP 200 plus a warnings entry whose code is 404 (or with an HTTP 404).
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty. The fetch failed (a non-2xx answer or a connection failure after retries, or an empty or unreadable 200 body).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.

Example​

cbs_recruit_rankings(player_id=1751796)

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.

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The id is unknown -- NAPI answers it with HTTP 200 plus a warnings entry whose code is 404 (or with an HTTP 404).
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty. The fetch failed (a non-2xx answer or a connection failure after retries, or an empty or unreadable 200 body).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.

Example​

cbs_season(season_id=59)

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_idInt64
stub_hub_team_idInt64StubHub 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.
locationString
nick_nameString
medium_nameStringMedium-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_nameString
abbrevString
statusString
home_venue_idInt64
conference_idInt64
league_idInt64
division_idInt64
ticket_urlStringStubHub 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_dexStringSix-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_hexStringTeam's primary colour as six hex digits with no leading hash, e.g. 97233f.
color_secondary_hexStringTeam's secondary colour as six hex digits with no leading hash, e.g. 000000.
playersString
leagueString
standingsStringNested 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.
conferenceString
divisionString
team_seasonsStringNested list of the team's season records, JSON-encoded when present; null unless requested through the resources parameter.
pollsStringNested poll-ranking sub-resource for the team, JSON-encoded when present; null unless requested through the resources parameter.
home_venueStringNested 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_standingsStringNested SportsLine standings sub-resource for the team, JSON-encoded when present; null unless requested through the resources parameter.
team_statsStringNested team-statistics sub-resource, JSON-encoded when present; null unless requested through the resources parameter.
team_rankingsStringNested team-rankings sub-resource, JSON-encoded when present; null unless requested through the resources parameter.
sports_line_rankingsStringNested SportsLine rankings sub-resource, JSON-encoded when present; null unless requested through the resources parameter.
meta_tsa_overlayBooleanFlag 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_idInt64Season 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.

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The id is unknown -- NAPI answers it with HTTP 200 plus a warnings entry whose code is 404 (or with an HTTP 404).
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty. The fetch failed (a non-2xx answer or a connection failure after retries, or an empty or unreadable 200 body).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.

Example​

cbs_season_teams(season_id=59)

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.

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The id is unknown -- NAPI answers it with HTTP 200 plus a warnings entry whose code is 404 (or with an HTTP 404).
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty. The fetch failed (a non-2xx answer or a connection failure after retries, or an empty or unreadable 200 body).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.

Example​

cbs_sport(sport_id=1)

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.

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The id is unknown -- NAPI answers it with HTTP 200 plus a warnings entry whose code is 404 (or with an HTTP 404).
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty. The fetch failed (a non-2xx answer or a connection failure after retries, or an empty or unreadable 200 body).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.

Example​

cbs_sport_leagues(sport_id=1)

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.

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The id is unknown -- NAPI answers it with HTTP 200 plus a warnings entry whose code is 404 (or with an HTTP 404).
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty. The fetch failed (a non-2xx answer or a connection failure after retries, or an empty or unreadable 200 body).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.

Example​

cbs_venue()

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.

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The id is unknown -- NAPI answers it with HTTP 200 plus a warnings entry whose code is 404 (or with an HTTP 404).
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty. The fetch failed (a non-2xx answer or a connection failure after retries, or an empty or unreadable 200 body).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.

Example​

cbs_venue_metadata()