Skip to main content
The POST /query_club endpoint looks up a club in the SquadAssist database using an external or internal ID. Use it to resolve the club_id required by the valuation endpoints when you only have a Transfermarkt ID. The response returns the club’s SquadAssist ID, Transfermarkt ID, and the club’s name.

Request

The request body must be a JSON object containing at least one of the following fields.
transfermarkt_id
integer
The Transfermarkt club ID (a positive integer). You can find this in the Transfermarkt URL for a club — for example, rsca.be has the Transfermarkt ID 415.
squadassist_id
string
A SquadAssist internal club ID. Use this to verify or enrich a club ID you already have.

Response

squadassist_id
string
The SquadAssist internal club ID. Pass this as club_id in the valuation endpoints.
transfermarkt_id
integer or null
The Transfermarkt club ID associated with this club. null if no Transfermarkt ID is recorded.
name
string
The club’s name as it appears in SquadAssist.

Example

$headers = @{
    "x-api-key"    = "your API key" # Change
    "Content-Type" = "application/json"
}

Invoke-RestMethod -Uri "https://api.squadassist.ai/v1/query_club" `
                  -Method Post `
                  -Headers $headers `
                  -Body '{"transfermarkt_id": 520}' #Change ID to desired club
{
  "squadassist_id": "C01JJBSWKE71ZEN2E52257YQGP5",
  "transfermarkt_id": 520,
  "name": "Cercle Brugge"
}

Errors

StatusBodyCause
400{"error": "At least one of transfermarkt_id or squadassist_id must be provided"}The request body contained neither identifier
400{"error": "transfermarkt_id must be an integer"}transfermarkt_id was provided but could not be parsed as an integer
400{"error": "transfermarkt_id must be a positive integer"}transfermarkt_id was zero or negative
400{"error": "transfermarkt_id is out of allowed range"}transfermarkt_id exceeded the maximum allowed value
400{"error": "Invalid squadassist_id"}The squadassist_id format is not valid
404{"error": "Club not found"}No club matched the provided identifier(s)