Get a cricket player's batting statistics by playerId as a format-by-metric table, optionally limited to one series with seriesId

View all Cricket Live Scores, Scorecards & Stats API endpoints →

Returns the batting statistics of a single cricket player as a table. playerId is required, goes in the URL path and is a number: use the id value from the trending players or player search operations of this product. The default 8733 is an example value. seriesId is optional, goes in the query string and is a number: pass the id value of a series from the series list or series archive operations to limit the statistics to that series, or leave it empty for the default view. The source 200 example is an object with an appIndex object (seoTitle and webURL strings), a headers array (ROWHEADER, Test, ODI, T20 and IPL in the example), a seriesSpinner array of objects with a seriesName (a single Career entry in the example) and a values array. Each element of values is an object with its own values array of strings: the first string is the metric label and the following strings line up with the format columns in headers. The example metrics are Matches, Innings, Runs, Balls, Highest, Average, SR, Not Out, Fours, Sixes, Ducks, 50s, 100s, 200s, 300s and 400s, and every number is a string. No live probe was recorded for this endpoint, so all fields are source-example fields. The columns, the series options and the defaults when seriesId is supplied are not verified, and career coverage is not guaranteed.

API Features

Format columns in one table The headers array lists the format columns (Test, ODI, T20 and IPL in the source example) after a ROWHEADER label, so a single request fills a batting tab with one column per format.
Row-by-row metric layout Each element of values holds a label followed by one value per column, so you can pivot the response into a keyed object of metric by format with a short loop.
Optional series scope seriesId limits the statistics to one series, such as the IPL 2024 identifier given in the source, which lets a tournament page show a player's numbers for that event next to the default view.
Series selector metadata The seriesSpinner array returns seriesName entries (only Career in the source example), which shows the series options the response was built with and can drive a selector once you inspect it.
Full batting metric set The example covers Matches, Innings, Runs, Balls, Highest, Average, SR, Not Out, Fours, Sixes and Ducks, so one call supports both volume and scoring-rate comparisons.
Milestone counters The 50s, 100s, 200s, 300s and 400s rows count innings milestones for each format, which suits a centuries-and-fifties widget without summing innings yourself.
String-typed values Every number in the table arrives as a string, including averages with decimals, so the response keeps the data source's formatting and you choose where to parse it.

Live API Demo

GET /api/project/cricbuzz-cricket/players-get-batting

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/players-get-batting?key=<API_KEY>&playerId=8733'
📢
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 batting statistics operation return?

It returns a table-style object: an appIndex object, a headers array of format columns, a seriesSpinner array and a values array of rows. Each row's own values array starts with the metric label followed by one string per column. No live probe was recorded, so these fields come from the source example.

Where do I get the playerId?

Use the id value from the trending players or player search operations of this product. They return it as a string of digits, and this endpoint declares playerId as a required number in the URL path. The default 8733 matches the player in the source example and is only an example value.

What does seriesId do and where do I find it?

seriesId is optional and limits the statistics to one series. Take its id from the series list or series archive operations of this product; the source gives 7607 for IPL 2024. What the response looks like for a given series is not covered by a probe, so inspect headers and values for each series you request.

Why are all the numbers strings?

In the source example every value, including Runs, Average and SR, is a string. Parse them in your client, and keep the original text if you need to preserve the data source's rounding.

Are the columns always Test, ODI, T20 and IPL?

The example shows those four columns after ROWHEADER, but the columns for other players or series are not documented. Read headers on every response and match each metric row to a column by position instead of hard-coding the format names.

What is the seriesSpinner field?

It is an array of objects with a seriesName. The source example contains a single Career entry. Its meaning for series-scoped calls is not verified, so inspect it in your own responses before using it to build a selector.

Does this cover a player's complete career?

Not necessarily. Coverage depends on the data source, and the supplied evidence does not guarantee complete career records or specific competitions. Check the returned Matches and Innings rows before presenting the table as a full career summary.

What are the appIndex fields for?

appIndex holds seoTitle and webURL strings that describe the player's page at the data source. They are metadata about the response, not statistics, so do not mix them into the batting table.

Related operations

Guides

View Subscription Plans →