Get cricket team statistics by teamId and statsType, narrowed by match type, opponent, team or year, with match-type and team filter lists in the payload
View all Cricket Live Scores, Scorecards & Stats API endpoints →Returns a statistics view for one cricket team. Send teamId in the URL path (required number; the default 2 is the documented example value) and statsType as a required query string (the default mostRuns is the documented example value). Four optional numeric query parameters narrow the view: matchType, opponent, team and year (a calendar year, with 2021 as the documented example). None of the optional parameters has a default. teamId is the teamId field returned by the teams list operation, and statsType is the value field returned by the team stats filter operation. matchType, opponent and team are documented as values returned by this same endpoint: the matchTypeId field for matchType and a teamId field for opponent and team. The source 200 example is an object with an appIndex object (seoTitle and webURL strings) and a filter object. filter.matchtype lists matchTypeDesc and matchTypeId strings (test 1, odi 2 and t20 3 in the example), filter.selectedMatchType and filter.selectedTeam hold the active selections (t20 and IND in the example), and filter.team is a long array of entries with an id string and a teamShortName string that covers national, women's and franchise sides. The entries in the visible example use id rather than the teamId name mentioned in the parameter notes. The supplied example is cut off inside the filter.team array, so the statistics rows that statsType returns are not visible in the evidence and are not described here. No live probe was recorded for this endpoint, so every field described comes from the source example and is not independently verified. The teamId path parameter and the team query parameter are separate inputs and are not documented as interchangeable.
API Features
Live API Demo
🔒 Sign in to try it live
Log in to call this API with your own API key. New accounts get 100 free credits — no card required.
Log in / Sign upNo active API key found. Create one in your Dashboard, then reload this page. Dashboard →
/api/project/cricbuzz-cricket/teams-get-stats API Response (JSON)
{} curl -X GET 'https://api.opendata-api.com/api/project/cricbuzz-cricket/teams-get-stats?key=<API_KEY>&teamId=2&statsType=mostRuns'
Query Result
Use Cases
- Build a team research page with a Test, ODI and T20 switch populated from the filter.matchtype array instead of hard-coded format buttons.
- Compare one team's numbers against a chosen opponent by sending the opponent id, and save teamId, opponent, matchType and statsType with every result so the slice stays identifiable.
- Create a year-by-year explorer for a team by repeating the call with a different year while keeping teamId, statsType and matchType constant.
- Seed an opponent dropdown from the id and teamShortName pairs in filter.team, labelled with the short names viewers recognise.
- Validate a stats form before sending: check teamId against the teams list and opponent or team against filter.team, and keep teamId and team as separate fields because the notes treat them as distinct inputs.
Frequently asked questions
What does the team stats operation return?
According to the source 200 example it returns an appIndex object and a filter object with matchtype, selectedMatchType, selectedTeam and a team array. The example is cut off inside that team array, so the statistics rows themselves are not visible in the evidence. No live probe was recorded, so these fields are not independently verified.
Which parameters does it take?
teamId is required, goes in the URL path as a number and defaults to 2. statsType is required, goes in the query string as a string and defaults to mostRuns. matchType, opponent, team and year are optional numeric query parameters with no default.
Where do I get teamId and statsType?
Take teamId from the teamId field of the teams list operation. Take statsType from the value field returned by the team stats filter operation and pass it back unchanged.
How do I find valid matchType, opponent and team values?
The parameter notes say these come from the response of this same operation. Call it once with only teamId and statsType, then read filter.matchtype for the matchTypeId values and filter.team for the team ids. In the visible example those entries use id and teamShortName.
What is the difference between teamId and team?
teamId is the path parameter and names the team whose statistics you request. team is an optional query parameter filled from the team list of this endpoint. The supplied evidence does not explain how team changes the result when it is combined with teamId, so test the combination for your own teams and never swap one for the other.
Which match types are available?
The example lists test with matchTypeId 1, odi with 2 and t20 with 3, and it reports t20 as the selected match type. Treat the filter.matchtype array in your own response as the authoritative list.
How do I filter by year?
Send year as a number in the query string, for example 2021. It is optional and has no default, so omitting it leaves the year unfiltered. The evidence does not show how years outside a team's history are answered.
Why does the example not show any statistics?
The supplied 200 example ends inside the filter.team array, so the part of the payload that holds the statsType results is not visible. This description therefore documents only the filter object and does not guess at the statistics fields.