cpbl.com.tw 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.
curl -X GET 'https://api.parse.bot/scraper/8d3d047b-7e60-446f-be5c-a8087c717d60/get_schedule?year=2024&month=04&kind_code=A' \ -H 'X-API-Key: $PARSE_API_KEY'
Retrieve the CPBL game schedule for a given year and month. Returns an array of game objects including teams, scores, pitchers, and MVP information.
| 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. Accepted values: A (Regular), B (All-Star), C (Postseason), G (Championship). |
{
"type": "object",
"fields": {
"games": "array of game objects with fields like GameSno, GameDate, HomeTeamName, VisitingTeamName, HomeScore, VisitingScore, FieldAbbe, MvpName, WinningPitcherName, LoserPitcherName"
},
"sample": {
"data": {
"games": [
{
"Year": "2024",
"GameSno": 1,
"MvpName": "徐若熙",
"GameDate": "2024-03-30T00:00:00",
"KindCode": "A",
"FieldAbbe": "大巨蛋",
"HomeScore": 3,
"HomeTeamName": "味全龍",
"PresentStatus": 1,
"VisitingScore": 2,
"LoserPitcherName": "威能帝",
"VisitingTeamName": "樂天桃猿",
"WinningPitcherName": "徐若熙"
}
]
},
"status": "success"
}
}About the cpbl.com.tw 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.
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.
- 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 | 250 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.