> For the complete documentation index, see [llms.txt](https://quantaapi.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://quantaapi.gitbook.io/docs/cricket-api/player-stats.md).

# Player Stats

Retrieve complete statistical data for a cricket player, including batting and bowling performance across formats.

### 🧾 Get Comprehensive Player Statistics

This API gives in-depth statistical data of a player, including matches played, runs scored, wickets taken, averages, strike rates, and economy. It helps in displaying detailed performance metrics across formats like T20, ODI, and Test.

## 🚀 How to get Player Stats

To get Player Stats, make a POST request to the following endpoint:

<kbd><mark style="color:green;">POST<mark style="color:green;"></kbd><kbd><https://cricket.quantaapi.com/api/v1/players/{id}/stats></kbd>

**Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `Bearer <token>`   |

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
    "status": "success",
    "message": "Players list fetched successfully.",
    "code": 200,
    "type": "SUCCESS",
    "data": {
        "test": {
            "batting": {
                "matches": "123",
                "innings": "210",
                "not_outs": "13",
                "runs_scored": "9230",
                "highest_score": "254",
                "batting_average": "46.85",
                "balls_faced": "16608",
                "batting_strike_rate": "55.58",
                "centuries": "30",
                "double_centuries": "7",
                "half_centuries": "31",
                "fours_hit": "1027",
                "sixes_hit": "30"
            },
            "bowling": {
                "matches": "123",
                "innings": "11",
                "balls_bowled": "175",
                "runs_scored": "84",
                "wickets": "0",
                "best_bowling_innings": "0/0",
                "best_bowling_match": "0/0",
                "economy_rate": "2.88",
                "bowling_average": "0.0",
                "bowling_strike_rate": "0.0",
                "five_wicket_hauls": "0",
                "ten_wicket_match_hauls": "0"
            }
        },
        "odi": {
            "batting": {
                "matches": "302",
                "innings": "290",
                "not_outs": "45",
                "runs_scored": "14181",
                "highest_score": "183",
                "batting_average": "57.88",
                "balls_faced": "15192",
                "batting_strike_rate": "93.35",
                "centuries": "51",
                "double_centuries": "0",
                "half_centuries": "74",
                "fours_hit": "1325",
                "sixes_hit": "153"
            },
            "bowling": {
                "matches": "302",
                "innings": "50",
                "balls_bowled": "662",
                "runs_scored": "680",
                "wickets": "5",
                "best_bowling_innings": "1/13",
                "best_bowling_match": "1/13",
                "economy_rate": "6.16",
                "bowling_average": "136.0",
                "bowling_strike_rate": "132.4",
                "five_wicket_hauls": "0",
                "ten_wicket_match_hauls": "0"
            }
        },
        "t20i": {
            "batting": {
                "matches": "125",
                "innings": "117",
                "not_outs": "31",
                "runs_scored": "4188",
                "highest_score": "122",
                "batting_average": "48.7",
                "balls_faced": "3056",
                "batting_strike_rate": "137.04",
                "centuries": "1",
                "double_centuries": "0",
                "half_centuries": "38",
                "fours_hit": "369",
                "sixes_hit": "124"
            },
            "bowling": {
                "matches": "125",
                "innings": "13",
                "balls_bowled": "152",
                "runs_scored": "204",
                "wickets": "4",
                "best_bowling_innings": "1/13",
                "best_bowling_match": "1/13",
                "economy_rate": "8.05",
                "bowling_average": "51.0",
                "bowling_strike_rate": "38.0",
                "five_wicket_hauls": "0",
                "ten_wicket_match_hauls": "0"
            }
        },
        "ipl": {
            "batting": {
                "matches": "263",
                "innings": "255",
                "not_outs": "40",
                "runs_scored": "8509",
                "highest_score": "113",
                "batting_average": "39.58",
                "balls_faced": "6417",
                "batting_strike_rate": "132.61",
                "centuries": "8",
                "double_centuries": "0",
                "half_centuries": "62",
                "fours_hit": "749",
                "sixes_hit": "290"
            },
            "bowling": {
                "matches": "263",
                "innings": "26",
                "balls_bowled": "251",
                "runs_scored": "368",
                "wickets": "4",
                "best_bowling_innings": "2/25",
                "best_bowling_match": "2/25",
                "economy_rate": "8.8",
                "bowling_average": "92.0",
                "bowling_strike_rate": "62.75",
                "five_wicket_hauls": "0",
                "ten_wicket_match_hauls": "0"
            }
        },
        "t20": {
            "batting": {
                "matches": "125",
                "innings": "117",
                "runs_scored": "4188",
                "balls_faced": "3056",
                "highest_score": "122",
                "batting_average": "48.7",
                "batting_strike_rate": "137.05",
                "not_outs": "31",
                "fours_hit": "369",
                "sixes_hit": "124",
                "half_centuries": "38",
                "centuries": "1",
                "double_centuries": "0"
            },
            "bowling": {
                "matches": "125",
                "innings": "13",
                "balls_bowled": "152",
                "runs_scored": "204",
                "wickets": "4",
                "bowling_average": "51.0",
                "economy_rate": "8.05",
                "bowling_strike_rate": "38.0",
                "best_bowling_innings": "1/13",
                "best_bowling_match": "1/13",
                "five_wicket_hauls": "0",
                "ten_wicket_match_hauls": "0"
            }
        }
    },
    "info": {
        "id": "player_B6lNa9fb0xVhlD07hwsw8iw0p",
        "timestamp_utc": "2025-05-17 14:00:55",
        "version": "v1.0",
        "credits_used": 4,
        "response_time": 143.54
    }
}
```

{% endtab %}

{% tab title="401" %}

```json
{
    "status": "error",
    "message": "The provided authorization token is invalid or expired",
    "code": 401,
    "type": "AUTHORIZATION_INVALID"
}
```

{% endtab %}
{% endtabs %}
