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

Team-scoped statistics teamId in the path selects the team whose statistics are returned, using the same ids that the teams list operation provides for squads, results and schedules.
Five request filters statsType is required, while matchType, opponent, team and year are optional numeric filters, so one operation covers many team-stat slices without separate endpoints.
Filter options inside the payload The filter object returns the match types and a team list in the response itself, which a client can use to build selectors without a second lookup request.
Match type ids with labels filter.matchtype pairs each matchTypeDesc with a matchTypeId string (test 1, odi 2, t20 3 in the example), the value to send back as the matchType parameter.
Active selection echoed back selectedMatchType and selectedTeam in the filter object show which format and team the response is currently set to, so a page can highlight the active chip.
Broad team directory filter.team lists many teams with an id string and a teamShortName, covering national, women's and franchise sides, which makes it a source for opponent pickers.
Calendar-year narrowing The year parameter takes a plain number such as 2021, so a client can step through seasons for the same team while holding the other filters fixed.

Live API Demo

GET /api/project/cricbuzz-cricket/teams-get-stats

Request cost is temporarily unavailable. No price is assumed.

View pricing

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'
📢
Need Help?
If you encounter API issues or need other API requirements, please contact us.
Contact Us

Use Cases

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.

Related operations

Guides

View Subscription Plans →