ESPNcricinfo player career statistics

GET https://api.api.sh/espncricinfo/v1/player/stats
1 credit / call sports try it in the playground →

A player's Statsguru figures for one format: career averages and the career summary split by opposition, ground, host country, year and more (the summary view) (matches, innings, not outs, runs, high score, average, balls, strike rate, hundreds, fifties, ducks, fours, sixes; or the bowling and fielding equivalents). Other views list every innings, match or series.

Every response includes credits_used: the credits this call cost.

Part of the ESPNcricinfo API: 15 endpoints with prices, use cases and example responses.

Parameters

nametypedescription
idrequired string Player id (253802 is Virat Kohli; the number in an espncricinfo.com player link). Example: 253802
format test | odi | t20i | international | first-class | list-a | t20 | women-test | women-odi | women-t20i test (default), odi, t20i, international, first-class, list-a, t20, women-test, women-odi or women-t20i.
type batting | bowling | fielding | allround batting (default), bowling, fielding or allround.
view summary | innings | match | series | ground | cumulative summary (default), innings, match, series, ground or cumulative.

Every endpoint also takes fresh, raw, fields (see lean responses and caching).

Example

curl "https://api.api.sh/espncricinfo/v1/player/stats?id=253802&format=odi" \
  -H "x-api-key: $APISH_KEY"

Response

A JSON object with the fields described above, plus raw (the source's own data), cached, fetched_at and credits_used. Errors return {"success": false, "error": "…"} with the HTTP status (see errors). A lookup that ran but found nothing (404) costs the price above; refused calls and errors on our side are free (what's charged).

The fastest way to see the full response is the playground: it runs this endpoint with your account and shows the exact JSON.