Com APIcba.sports.sina.com.cn ↗
Access Chinese Basketball Association data: player stat rankings, game box scores, team rosters, schedules, and current round results via 6 structured endpoints.
What is the Com API?
This API exposes 6 endpoints covering the Chinese Basketball Association (CBA) league hosted on cba.sports.sina.com.cn, returning player per-game statistical rankings, full game box scores, team rosters, and schedules with scores. The get_player_stats_rankings endpoint alone surfaces per-player season averages across points, rebounds, assists, steals, and blocks, filterable by season stage and sortable by any of those categories.
curl -X GET 'https://api.parse.bot/scraper/a68b6c85-2b9a-4d64-9f26-a094e0315feb/get_player_stats_rankings?round=0&season=23-24&orderby=pts' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace cba-sports-sina-com-cn-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: CBA Basketball API — team rosters, player rankings, game box scores."""
from parse_apis.cba_basketball_api import CBA, Season, StatCategory, Round, ResourceNotFound
client = CBA()
# List all teams and pick the first one for drill-down.
team = client.teams.list(limit=5).first()
print(f"First team: {team.name} (id={team.id})")
# Get full team detail (roster + coaching staff).
detail = team.detail()
print(f"Coach: {detail.team_info.coach}, Roster size: {len(detail.roster)}")
for player in detail.roster[:3]:
print(f" - {player.name} (pid={player.player_id})")
# Fetch top scorers for the 2023-24 regular season.
for stats in client.playerstatses.rankings(
season=Season.S_23_24, round=Round.REGULAR, orderby=StatCategory.POINTS, limit=5
):
print(f"#{stats.rank} {stats.name} ({stats.team}) — {stats.points} pts, {stats.assists} ast")
# Get current round results and fetch box score for the first game.
game_result = client.roundgames.current(limit=1).first()
if game_result:
print(f"Latest: {game_result.away_team} vs {game_result.home_team} ({game_result.score})")
try:
box = client.games.get(game_id=game_result.game_id)
print(f"Box score title: {box.title}")
for p in box.home_box[:2]:
print(f" Home: {p.name} — {p.points} pts, {p.assists} ast")
except ResourceNotFound as exc:
print(f"Game not found: {exc}")
# Browse a team's schedule.
for g in client.team("1").games.list(season=Season.S_23_24, limit=3):
print(f" {g.datetime}: {g.away_team} vs {g.home_team} — {g.score}")
print("Exercised: teams.list / detail / playerstatses.rankings / roundgames.current / games.get / team.games.list")
Fetch CBA player individual season statistics rankings (per-game averages). Returns players ranked by the specified stat category for a given season. Includes shooting splits, rebounds, assists, steals, blocks, turnovers, fouls, and efficiency rating.
| Param | Type | Description |
|---|---|---|
| round | integer | Season stage filter: 0 = All, 1 = Regular, 2 = Playoffs. |
| season | string | Season string in YY-YY format. |
| orderby | string | Sort column for the rankings. |
{
"type": "object",
"fields": {
"season": "string echoing the requested season",
"players": "array of player stat objects with rank, name, player_id, team, games, points, rebounds, assists, steals, blocks, turnovers, fouls, efficiency, and shooting splits"
},
"sample": {
"data": {
"season": "23-24",
"players": [
{
"name": "高登",
"rank": "1",
"team": "四川",
"dunks": "0.0",
"fouls": "2.1",
"games": "38",
"blocks": "0.1",
"points": "33.3",
"steals": "1.0",
"assists": "7.6",
"def_reb": "4.7",
"off_reb": "0.8",
"team_id": null,
"rebounds": "5.5",
"player_id": "7314",
"turnovers": "3.4",
"two_point": "7.4-14.2",
"efficiency": "30.24",
"free_throw": "9.2-10.3",
"three_point": "3.1-9.1"
}
]
},
"status": "success"
}
}About the Com API
Player Statistics and Rankings
The get_player_stats_rankings endpoint returns a ranked array of players for a given season (season param in YY-YY format) and stage (round: 0 = all, 1 = regular season, 2 = playoffs). The orderby parameter accepts pts, reb, ast, stl, or blk, and each player object in the response includes rank, name, player_id, team, games, points, rebounds, assists, steals, blocks, turnovers, and fouls. Coverage goes back to at least the 16-17 season.
Schedules and Box Scores
get_schedule accepts a season, a month (MM format, or '00' for all months), and a team_id (from get_team_list, or '00' for all teams). Each game object in the response contains datetime, home_team, home_team_id, away_team, away_team_id, score, game_id, venue, and broadcast. Once you have a game_id, pass it to get_game_detail to retrieve full player-level box scores for both sides in home_box and away_box arrays, along with a score_board object that includes quarter scores when available.
Teams and Rosters
get_team_list returns all CBA teams with their name and id fields — the id value is the foreign key used by get_schedule, get_team_detail, and get_player_stats_rankings. get_team_detail takes a team_id and returns the roster (player name, player_id, and image URL per player) plus a team_info object with name, coach, assistant_coaches, founding_year, and best_results. Note that in-season per-player team stats are not returned by this endpoint.
Current Round
get_current_round_results requires no parameters and returns the most recent round's completed and upcoming games from the CBA homepage. Each game object includes round, date, home_team, home_team_id, away_team, away_team_id, score, and game_id, making it a convenient starting point for polling live-round status without knowing specific game IDs in advance.
The Com API is a managed, monitored endpoint for cba.sports.sina.com.cn — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when cba.sports.sina.com.cn changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official cba.sports.sina.com.cn API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Build a CBA season leaderboard sorted by assists or blocks using
get_player_stats_rankingswith theorderbyparam - Track a specific team's full season schedule and results by passing
team_idtoget_schedule - Pull player-level box scores for post-game analysis using
get_game_detailwith game IDs fromget_schedule - Display current-round standings and upcoming fixtures in a dashboard via
get_current_round_results - Populate a team profile page with roster and coaching staff from
get_team_detail - Compare regular-season versus playoff per-game averages for individual players using the
roundfilter inget_player_stats_rankings - Resolve team IDs for downstream API calls by seeding a local lookup table from
get_team_list
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does cba.sports.sina.com.cn have an official developer API?+
What does `get_game_detail` return, and when are quarter scores included?+
get_game_detail returns home_box and away_box arrays with per-player statistics, a title string, and a score_board object. Quarter scores appear inside score_board when the source has that breakdown available for the requested game; they are not guaranteed for all historical games.Does `get_team_detail` return season statistics for each player on the roster?+
get_team_detail returns roster entries with name, player_id, and image, plus coaching and club metadata. Per-player season statistics are not included in this endpoint's response. You can get individual stat lines from get_player_stats_rankings by cross-referencing player_id. If you need aggregated per-player team stats in one call, you can fork this API on Parse and revise it to add that endpoint.How far back does season coverage go for `get_player_stats_rankings`?+
season parameter accepts values from '16-17' through the current season. Seasons before 16-17 are not currently supported by the endpoint.Are live in-game play-by-play events or real-time score updates available?+
get_game_detail and current-round results via get_current_round_results, but does not expose play-by-play sequences or live score polling with shot-by-shot detail. You can fork this API on Parse and revise it to add a live play-by-play endpoint.