Skip to content

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_aoptional
competitionstringoptional
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_stats itself. Point any MCP client at https://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_idstring
namestring
grouped_bystring
batting[]array
List of objects
batting[].group_keystring
batting[].matchesnumber
batting[].inningsnumber
batting[].runsnumber
batting[].ballsnumber
batting[].outsnumber
batting[].foursnumber
batting[].sixesnumber
batting[].dotsnumber
batting[].hundredsnumber
batting[].fiftiesnumber
batting[].highestnumber
batting[].averagenumber
batting[].strike_ratenumber
bowling[]array
List of objects
bowling[].group_keystring
bowling[].matchesnumber
bowling[].ballsnumber
bowling[].runs_concedednumber
bowling[].wicketsnumber
bowling[].dotsnumber
bowling[].widesnumber
bowling[].noballsnumber
bowling[].five_wicketsnumber
bowling[].beststring
bowling[].oversstring
bowling[].averagenumber
bowling[].economynumber
bowling[].strike_ratenumber
countnumber

Related endpoints

Try it

500 free credits every month: 100 calls to get_player_stats, and no card.