Cricbuzz player match-by-match log
Every innings a player batted or bowled, with the site's filters (format, tournament, team, opponent, venue, year) and sort, plus a summary of the filtered set (matches, innings, runs, average, strike rate, 50s, 100s, wickets, economy, best figures ...) and the filter options available for the player. Each row: match id and link, series, score or figures, opponent, format, venue, date, strike rate or economy, 4s and 6s. International, IPL and WPL matches. Pass next_cursor back as cursor; null on the last page.
Every response includes credits_used: the credits this call cost.
Parameters
| name | type | description |
|---|---|---|
player_idrequired | integer | Cricbuzz player id (1413 = Virat Kohli). Example: 1413 |
type | batting | bowling | batting (default) or bowling. Example: batting Default: batting |
format | string | test, odi, t20i (comma-separated for several). Example: odi |
tournament | string | A tournament code from the player's filters (e.g. IPL). Example: IPL |
team_id | string | Played for this team id (comma-separated for several). |
opponent_id | string | Against this team id (comma-separated for several). |
venue_id | string | At this venue id (comma-separated for several). |
year | string | Year(s), comma-separated. Example: 2023 |
sort | date | score | strike_rate | fours | sixes | wickets | economy | runs | date (default), score, strike_rate, fours, sixes (batting); wickets, economy, runs (bowling). Default: date |
order | desc | asc | desc (default) or asc. Default: desc |
cursor | string | Pass next_cursor from the previous response. |
Every endpoint also takes fresh, raw, fields (see lean responses and caching).
Example
curl "https://api.api.sh/cricbuzz/v1/player-matches?player_id=1413" \
-H "x-api-key: $APISH_KEY" import os, requests
res = requests.get(
"https://api.api.sh/cricbuzz/v1/player-matches",
params={"player_id": "1413"},
headers={"x-api-key": os.environ["APISH_KEY"]},
timeout=120,
)
res.raise_for_status()
data = res.json() const url = new URL("https://api.api.sh/cricbuzz/v1/player-matches");
url.searchParams.set("player_id", "1413");
const res = await fetch(url, { headers: { "x-api-key": process.env.APISH_KEY } });
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const data = await res.json(); 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).