Com APIcpbl.com.tw ↗
Access CPBL game schedules, box scores, standings, player stats, and pitch-by-pitch play-by-play via 8 structured JSON endpoints. No scraping required.
What is the Com API?
This API surfaces data from the Chinese Professional Baseball League (CPBL) across 8 endpoints, covering everything from season schedules and inning-by-inning box scores to pitch-level play-by-play logs. The get_box_score endpoint alone returns batting stats, pitching stats, and a full scoreboard for both teams in a single call. Player IDs retrieved via get_player_list flow directly into get_player_stats for historical season-by-season breakdowns.
curl -X GET 'https://api.parse.bot/scraper/8d3d047b-7e60-446f-be5c-a8087c717d60/get_schedule?year=2025&month=06&kind_code=A' \ -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 cpbl-com-tw-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.
from parse_apis.cpbl_official_site_api import CPBL, GameKind, Position, StatType
cpbl = CPBL()
# List this month's games
for game in cpbl.games.list(year="2025", month="06", kind_code=GameKind.REGULAR):
print(game.visiting_team_name, game.visiting_score, "vs", game.home_score, game.home_team_name)
print(game.field, game.mvp_name, game.winning_pitcher_name)
# Get box score for a completed game
box = game.box_score()
for detail in box.game_detail:
print(detail.visiting_team_name, detail.visiting_total_score, detail.home_total_score, detail.home_team_name)
for entry in box.scoreboard:
print(entry.team_abbr, entry.inning_seq, entry.score_count)
# Get play-by-play
for log in game.text_feed():
print(log.inning_seq, log.pitcher_name, log.hitter_name, log.content, log.strike_count, log.ball_count)
break
# Get standings
for standing in cpbl.standings.list():
print(standing.rank, standing.team, standing.record, standing.winning_pct, standing.games_behind)
# Get all players and look up stats for one
for player in cpbl.players.list(limit=5):
print(player.name, player.team, player.acnt)
# Get player rankings for batters
for ranking in cpbl.players.rankings(year="2025", position=Position.BATTERS, limit=10):
print(ranking.rank, ranking.player_name, ranking.team, ranking.batting_avg, ranking.ops)
# Get a specific player's stats
player = cpbl.player(acnt="0000003649")
for season in player.stats(stat_type=StatType.BATTING):
print(season.year, season.team, season.avg, season.ops, season.home_run_count, season.wrc_plus)
# Get news
for item in cpbl.newsitems.list():
print(item.title, item.date, item.url)
Retrieve the CPBL game schedule for a given year and month. Returns an array of game objects including teams, scores, pitchers, and MVP information. The schedule covers all games in the specified month regardless of completion status.
| Param | Type | Description |
|---|---|---|
| year | string | Year in YYYY format. Defaults to the current year. |
| month | string | Month in MM format (zero-padded). Defaults to the current month. |
| kind_code | string | Game type code. |
{
"type": "object",
"fields": {
"games": "array of Game objects with teams, scores, pitchers, MVP"
},
"sample": {
"data": {
"games": [
{
"Year": "2025",
"GameSno": 1,
"MvpName": "布雷克",
"GameDate": "2025-03-29T00:00:00",
"KindCode": "A",
"FieldAbbe": "大巨蛋",
"HomeScore": 0,
"HomeTeamName": "中信兄弟",
"PresentStatus": 1,
"VisitingScore": 8,
"LoserPitcherName": "德保拉",
"VisitingTeamName": "統一7-ELEVEn獅",
"WinningPitcherName": "布雷克"
}
]
},
"status": "success"
}
}About the Com API
Schedule and Game Results
The get_schedule endpoint accepts year, month, and a kind_code parameter that filters by game type — A for Regular Season, B for All-Star, C for Postseason, or G for Championship. Each game object in the response includes GameSno, team names, scores, field abbreviation, and the MVP of the game. The GameSno field is the key identifier used to query deeper game data.
Box Scores and Play-by-Play
get_box_score returns four stat arrays — batting_h, batting_v, pitching_h, pitching_v — along with a scoreboard array for inning-by-inning runs and a game_detail object with metadata. For live or completed games, get_game_text_feed returns a logs array of pitch-level entries, each including InningSeq, Content, PitcherName, HitterName, StrikeCnt, BallCnt, and Ou (outs). Both endpoints require a valid game_sno and optionally accept a kind_code.
Player Data and Statistics
get_player_list returns all active players with their acnt (a 10-digit zero-padded player ID), which is the required input for get_player_stats. That endpoint returns season-by-season records including Avg, HomeRunCnt, Obp, Slg, Ops, and StrikeOutCnt, filterable by stat_type — batting, pitching, or defence. The get_all_stats endpoint provides paginated league-wide rankings (up to 15 players per page) for batters (01) or pitchers (02), with column headers returned in Chinese.
Standings and News
get_standings returns the current season standings for all CPBL teams, with fields in Chinese covering win-loss-tie records, winning percentage, and games behind. get_news returns a flat array of league news objects, each with a title, publication date, and URL pointing to the official CPBL site. Neither endpoint accepts input parameters.
The Com API is a managed, monitored endpoint for cpbl.com.tw — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when cpbl.com.tw 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 cpbl.com.tw 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 CPBL score tracker that polls
get_scheduleeach day and displays live game results with MVP data. - Render inning-by-inning box score tables for any completed game using
batting_h,batting_v, andscoreboardfromget_box_score. - Display pitch-by-pitch game logs in a live game viewer using
get_game_text_feedwithPitcherName,HitterName, andStrikeCnt. - Create player profile pages combining roster info from
get_player_listwith multi-season batting or pitching stats fromget_player_stats. - Show leaderboard pages for CPBL batting average or ERA rankings using the paginated
get_all_statsendpoint. - Embed a standings widget filtered by current Regular Season games using
get_standingsoutput. - Aggregate official CPBL news headlines and link back to source articles using
get_newstitle and URL fields.
| 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 CPBL have an official developer API?+
How do I get a player's historical stats?+
get_player_list to retrieve each player's acnt value, a 10-digit zero-padded ID. Pass that acnt to get_player_stats along with an optional stat_type (batting, pitching, or defence) and kind_code to filter by game type. The response returns one stat object per season.What game types can I filter by across these endpoints?+
kind_code parameter with four values: A (Regular Season), B (All-Star), C (Postseason), and G (Championship). The get_standings and get_news endpoints do not accept any filter parameters.Does the API return player biographical data such as birthdate, height, weight, or nationality?+
get_player_list returns name, team, and acnt, while get_player_stats returns performance statistics per season. Biographical profile data is not included. You can fork this API on Parse and revise it to add an endpoint targeting CPBL player profile pages.Are defensive statistics available beyond the `defence` stat_type in `get_player_stats`?+
get_player_stats endpoint accepts stat_type=defence and returns season-level defensive data, but there is no dedicated endpoint for fielding leaders or positional defensive rankings league-wide. The get_all_stats endpoint covers only batter and pitcher rankings. You can fork this API on Parse and revise it to add a fielding leaderboard endpoint.