get_player_stats
5 creditsStats + aggregationPOST /v1/get_player_stats
A player split by season, competition, phase (powerplay, middle, death) or format
Use it when you want how a player does by phase of the innings, by season or by competition.
Parameters
player_idstringrequired- Player id from search_players.
byenum: season | competition | phase | formatoptional- How to split (default format).
formatenum: test | odi | t20 | first_class | list_aoptionalcompetitionstringoptional- Competition key from list_competitions (ipl, bbl, test, odi, t20i, ...).
seasonstringoptional- Season: a year (2024) or a split season (2024/25).
leagueenum: cricket | test | odi | t20i | ipl | bbl | psl | cpl | blast | hundred | sa20 | ilt20 | county | wbbl | wpl | hundred_womenoptional- League. Defaults to cricket. One of: cricket, test, odi, t20i, ipl, bbl, psl, cpl, blast, hundred, sa20, ilt20, county, wbbl, wpl, hundred_women.
Notes
- Over MCP, ask for it in plain English and the client calls
get_player_statsitself. Point any MCP client athttps://mcp.yorkerapi.com/mcp?key=YOUR_API_KEY. - Each call costs 5 credits, taken before it runs and refunded if the server errors.
- Not the call you need? Find the right call by what you are trying to answer.
Request
curl -X POST https://mcp.yorkerapi.com/v1/get_player_stats \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"player_id": "ba607b88",
"format": "t20",
"by": "phase"
}'Response
json
{
"player_id": "ba607b88",
"name": "V Kohli",
"grouped_by": "phase",
"batting": [
{
"group_key": "middle",
"matches": 277,
"innings": 277,
"runs": 6239,
"balls": 4938,
"outs": 135,
"fours": 430,
"sixes": 182,
"dots": 1283,
"hundreds": 0,
"fifties": 9,
"highest": 87,
"average": 46.21,
"strike_rate": 126.35
},
{
"group_key": "powerplay",
"matches": 313,
"innings": 313,
"runs": 4520,
"balls": 3555,
"outs": 100,
"fours": 565,
"sixes": 105,
"dots": 1420,
"hundreds": 0,
"fifties": 0,
"highest": 44,
"average": 45.2,
"strike_rate": 127.14
},
{
"group_key": "death",
"matches": 140,
"innings": 140,
"runs": 2540,
"balls": 1348,
"outs": 78,
"fours": 197,
"sixes": 144,
"dots": 287,
"hundreds": 0,
"fifties": 2,
"highest": 58,
"average": 32.56,
"strike_rate": 188.43
}
],
"bowling": [
{
"group_key": "middle",
"matches": 36,
"balls": 351,
"runs_conceded": 477,
"wickets": 7,
"dots": 81,
"wides": 11,
"noballs": 6,
"five_wickets": 0,
"best": "1/4",
"overs": "58.3",
"average": 68.14,
"economy": 8.15,
"strike_rate": 50.1
},
{
"group_key": "death",
"matches": 9,
"balls": 52,
"runs_conceded": 95,
"wickets": 1,
"dots": 12,
"wides": 0,
"noballs": 1,
"five_wickets": 0,
"best": "1/9",
"overs": "8.4",
"average": 95,
"economy": 10.96,
"strike_rate": 52
}
],
"count": 5
}Response fields
player_idstringnamestringgrouped_bystringbatting[]array- List of objects
batting[].group_keystringbatting[].matchesnumberbatting[].inningsnumberbatting[].runsnumberbatting[].ballsnumberbatting[].outsnumberbatting[].foursnumberbatting[].sixesnumberbatting[].dotsnumberbatting[].hundredsnumberbatting[].fiftiesnumberbatting[].highestnumberbatting[].averagenumberbatting[].strike_ratenumberbowling[]array- List of objects
bowling[].group_keystringbowling[].matchesnumberbowling[].ballsnumberbowling[].runs_concedednumberbowling[].wicketsnumberbowling[].dotsnumberbowling[].widesnumberbowling[].noballsnumberbowling[].five_wicketsnumberbowling[].beststringbowling[].oversstringbowling[].averagenumberbowling[].economynumberbowling[].strike_ratenumbercountnumber
Related endpoints
search_players1 cr
Returns the player_id this one takes.
Find a player's id by name, or list a team's players
get_match5 cr
Returns the player_id this one takes.
One match in full: batting and bowling cards, ratings and every book's opening and closing price
get_player5 cr
Takes the player_id this one returns.
A career by format: runs, average, strike rate, wickets, economy, hundreds, best figures
get_player_matches5 cr
Takes the player_id this one returns.
A player's matches with batting and bowling in each innings
Try it
500 free credits every month: 100 calls to get_player_stats, and no card.