> ## Documentation Index
> Fetch the complete documentation index at: https://docs.squadassist.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# /get_players_at_club

Use this endpoint to retrieve all players that are currently playing for a club.

## Authentication

All requests must include a valid API key, either as an `x-api-key` header or as a Bearer token in the `Authorization` header.

```http theme={null}
x-api-key: YOUR_API_KEY
# or
Authorization: Bearer YOUR_API_KEY
```

## Request

<ParamField query="club_id" type="string" required>
  The SquadAssist club ID. Obtain this from `GET /get_clubs_in_competition` or from `POST /query_club`

  <ParamField path="analysis_available_only" default="False" type="boolean">
    Whether or not the response should only include players for which SquadAssist can also do predictions. For those that have this field as False, the players will error on each of the Predictions requests, but they will still work for other requests. Defaults to False.
  </ParamField>
</ParamField>

## Response

<ResponseField name="season" type="string">
  The current season

  <ResponseField name="club" type="Club">
    The club that was just analyzed
  </ResponseField>
</ResponseField>

<ResponseField name="players" type="array[Player]">
  An array of player objects, one for each player at the club.

  <Expandable title="Player object">
    <ResponseField name="squadassist_id" type="string">
      The squadassist\_id used in the API

      <ResponseField name="name" type="string">
        The full display name of the player.

        <ResponseField name="transfermarkt_id" type="string">
          The transfermarkt\_id of the player

          <ResponseField name="wyscout_id" type="string">
            The wyscout id of the player

            <ResponseField name="first_name" type="string">
              The first name of the player

              <ResponseField name="last_name" type="string">
                The last name of the player

                <ResponseField name="alias" type="string">
                  The alias of the player
                </ResponseField>
              </ResponseField>
            </ResponseField>
          </ResponseField>
        </ResponseField>
      </ResponseField>
    </ResponseField>
  </Expandable>
</ResponseField>

## Example

<CodeGroup>
  ```bash PowerShell theme={null}
  $headers = @{
      "x-api-key"    = "your_API_key"
      "Content-Type" = "application/json"
  }

  curl "https://api.squadassist.ai/v1/get_players_at_club?club_id=C01JJBSWKE71ZEN2E52257YQGP5" -H $headers
  ```

  ```python Python theme={null}
  import requests

  # Set the endpoint URL
  url = "https://api.squadassist.ai/v1/get_players_at_club"

  # Define the query parameters
  query_params = {
      "club_id": "C01JJBSWKE71ZEN2E52257YQGP5"
  }

  # Define the request headers
  headers = {
      "x-api-key": "your_API_key",
      "Content-Type": "application/json"
  }

  # Perform the GET request
  response = requests.get(url, headers=headers, params=query_params)

  # Parse the JSON response
  data = response.json()

  # View the result
  print(data)
  ```

  ```r R theme={null}
  library(httr2)

  # Define the base URL
  url <- "https://api.squadassist.ai/v1/get_players_at_club"

  # Construct the request with headers and query parameters
  req <- request(url) %>%
    req_headers(
      "x-api-key" = "your_API_key",
      "Content-Type" = "application/json"
    ) %>%
    req_url_query(
      "club_id" = "C01JJBSWKE71ZEN2E52257YQGP5"
    )

  # Execute the request
  response <- req_perform(req)

  # Parse the JSON body into an R list
  data <- resp_body_json(response)

  # View the result
  print(data)
  ```
</CodeGroup>

```json Response theme={null}
{
	"season": "2025/2026",
	"club": 
		{
		"squadassist_id": "C01JJBSWKE71ZEN2E52257YQGP5",
		"transfermarkt_id": 520, 
		"name" : "Cercle Brugge"
		},
	"players": 
  	[
		{
            "squadassist_id": "P01J...",
            "transfermarkt_id": 175698,
            "wyscout_id": 169543,
            "first_name": "Nathan",
            "last_name": "De Cat",
            "alias": "N. De Cat",
            "name": "Nathan De Cat",
        },
	...
	]

}
```
