# Supercell

> Look up Clash of Clans clans, players, members, and wars from Supercell's official game API.

App · Gaming · 12 actions. Web page: https://docs.lodol.com/docs/integrations/supercell

## Actions

### Get a clan

Get a Clash of Clans clan's full details by tag, including its war record and member list.

**Inputs**

- Clan tag (`clan_tag`, text, required): The clan's tag (e.g. '#2PP'), from Search clans.

**Outputs**

- `badge_url` (text): Clan badge image URL.
- `clan_level` (number): Clan level.
- `clan_points` (number): Clan points.
- `description` (text): Clan description.
- `is_war_log_public` (true/false): Whether the war log is public.
- `location` (text): Clan location name.
- `member_list` (list): The clan's members.
- `members` (number): Current member count.
- `name` (text): Clan name.
- `required_trophies` (number): Trophies required to join.
- `tag` (text): Clan tag.
- `type` (text): open, inviteOnly, or closed.
- `war_frequency` (text): How often the clan wars.
- `war_losses` (number): Total war losses (if public).
- `war_ties` (number): Total war ties (if public).
- `war_win_streak` (number): Current war win streak.
- `war_wins` (number): Total war wins.

**Example output**

```json
{
  "badge_url": "https://api-assets.clashofclans.com/badges/512/abc.png",
  "clan_level": 20,
  "clan_points": 45123,
  "description": "Top war clan. English only.",
  "is_war_log_public": true,
  "location": "International",
  "member_list": [
    {
      "clan_rank": 1,
      "donations": 1200,
      "donations_received": 800,
      "exp_level": 234,
      "league": "Legend League",
      "name": "Alice",
      "role": "leader",
      "tag": "#V0LUP",
      "town_hall_level": 16,
      "trophies": 5400
    }
  ],
  "members": 2,
  "name": "Reddit Alpha",
  "required_trophies": 3000,
  "tag": "#2PP",
  "type": "inviteOnly",
  "war_frequency": "always",
  "war_losses": 88,
  "war_ties": 3,
  "war_win_streak": 4,
  "war_wins": 412
}
```

### Get a player

Get a Clash of Clans player's profile by tag.

**Inputs**

- Player tag (`player_tag`, text, required): The player's tag (e.g. '#V0LUP').

**Outputs**

- `attack_wins` (number): Attack wins this season.
- `best_trophies` (number): All-time best trophies.
- `clan_name` (text): Current clan name, if any.
- `clan_tag` (text): Current clan tag, if any.
- `defense_wins` (number): Defense wins this season.
- `donations` (number): Troops donated this season.
- `donations_received` (number): Troops received this season.
- `exp_level` (number): Experience level.
- `league` (text): Current league name.
- `name` (text): Player name.
- `role` (text): Clan role, if in a clan.
- `tag` (text): Player tag.
- `town_hall_level` (number): Town Hall level.
- `trophies` (number): Current trophies.
- `war_stars` (number): Total war stars earned.

**Example output**

```json
{
  "attack_wins": 152,
  "best_trophies": 5723,
  "clan_name": "Reddit Alpha",
  "clan_tag": "#2PP",
  "defense_wins": 41,
  "donations": 1200,
  "donations_received": 800,
  "exp_level": 234,
  "league": "Legend League",
  "name": "Alice",
  "role": "leader",
  "tag": "#V0LUP",
  "town_hall_level": 16,
  "trophies": 5400,
  "war_stars": 1487
}
```

### Get clan capital raids

List a clan's past Clan Capital raid weekends.

**Inputs**

- Clan tag (`clan_tag`, text, required): The clan's tag (e.g. '#2PP'), from Search clans.
- How many seasons (`limit`, number): How many raid weekends to return (1–50). From 1 to 50. Default: `10`.

**Outputs**

- `count` (number): Number of seasons returned.
- `seasons` (list): Past raid weekends, most recent first.

**Example output**

```json
{
  "count": 1,
  "seasons": [
    {
      "capital_total_loot": 185000,
      "defensive_reward": 190,
      "end_time": "20260811T070000.000Z",
      "offensive_reward": 1620,
      "raids_completed": 6,
      "start_time": "20260808T070000.000Z",
      "state": "ended",
      "total_attacks": 245
    }
  ]
}
```

### Get clan members

List the members of a Clash of Clans clan.

**Inputs**

- Clan tag (`clan_tag`, text, required): The clan's tag (e.g. '#2PP'), from Search clans.
- How many members (`limit`, number): How many members to return (1–50). From 1 to 50. Default: `50`.

**Outputs**

- `members` (list): The clan's members.

**Example output**

```json
{
  "members": [
    {
      "clan_rank": 1,
      "donations": 1200,
      "donations_received": 800,
      "exp_level": 234,
      "league": "Legend League",
      "name": "Alice",
      "role": "leader",
      "tag": "#V0LUP",
      "town_hall_level": 16,
      "trophies": 5400
    }
  ]
}
```

### Get clan rankings

List the top-ranked clans for a location (or worldwide).

**Inputs**

- Location (`location_id`, text, required): Which location's rankings to fetch.
- How many clans (`limit`, number): How many clans to return (1–50). From 1 to 50. Default: `20`.

**Outputs**

- `clans` (list): Ranked clans, best first.
- `count` (number): Number of clans returned.

**Example output**

```json
{
  "clans": [
    {
      "clan_level": 30,
      "clan_points": 62000,
      "location": "International",
      "members": 50,
      "name": "Reddit Alpha",
      "rank": 1,
      "tag": "#2PP"
    }
  ],
  "count": 1
}
```

### Get clan war log

List a clan's past wars. The clan's war log must be public.

**Inputs**

- Clan tag (`clan_tag`, text, required): The clan's tag (e.g. '#2PP'), from Search clans.
- How many wars (`limit`, number): How many past wars to return (1–50). From 1 to 50. Default: `10`.

**Outputs**

- `count` (number): Number of wars returned.
- `wars` (list): Past wars, most recent first.

**Example output**

```json
{
  "count": 1,
  "wars": [
    {
      "clan_destruction_percentage": 98.5,
      "clan_stars": 42,
      "end_time": "20260810T120000.000Z",
      "opponent_destruction_percentage": 90.1,
      "opponent_name": "War Machine",
      "opponent_stars": 35,
      "opponent_tag": "#8GQPJG2",
      "result": "win",
      "team_size": 15
    }
  ]
}
```

### Get current war

Get a clan's current war. The clan's war log must be public.

**Inputs**

- Clan tag (`clan_tag`, text, required): The clan's tag (e.g. '#2PP'), from Search clans.

**Outputs**

- `clan` (object): This clan's war performance.
- `end_time` (text): When the war ends.
- `opponent` (object): The opposing clan's war performance.
- `preparation_start_time` (text): When prep began.
- `start_time` (text): When the war started.
- `state` (text): notInWar, preparation, inWar, or warEnded.
- `team_size` (number): Players per side.

**Example output**

```json
{
  "clan": {
    "attacks": 25,
    "clan_level": 20,
    "destruction_percentage": 94.5,
    "name": "Reddit Alpha",
    "stars": 28,
    "tag": "#2PP"
  },
  "end_time": "20260812T120000.000Z",
  "opponent": {
    "attacks": 27,
    "clan_level": 18,
    "destruction_percentage": 88.2,
    "name": "War Machine",
    "stars": 24,
    "tag": "#8GQPJG2"
  },
  "preparation_start_time": "20260810T120000.000Z",
  "start_time": "20260811T120000.000Z",
  "state": "inWar",
  "team_size": 15
}
```

### Get Gold Pass season

Get the current Gold Pass season's start and end times.

**Inputs**: None.

**Outputs**

- `end_time` (text): When the season ends.
- `start_time` (text): When the season started.

**Example output**

```json
{
  "end_time": "20260901T080000.000Z",
  "start_time": "20260801T080000.000Z"
}
```

### Get leagues

List the game's trophy leagues.

**Inputs**

- How many leagues (`limit`, number): How many leagues to return (1–50). From 1 to 50. Default: `50`.

**Outputs**

- `count` (number): Number of leagues returned.
- `leagues` (list): The trophy leagues.

**Example output**

```json
{
  "count": 1,
  "leagues": [
    {
      "id": 29000022,
      "name": "Legend League"
    }
  ]
}
```

### Get locations

List the locations (countries/regions) used for rankings.

**Inputs**

- How many locations (`limit`, number): How many locations to return (1–50). From 1 to 50. Default: `50`.

**Outputs**

- `count` (number): Number of locations returned.
- `locations` (list): The available locations.

**Example output**

```json
{
  "count": 1,
  "locations": [
    {
      "country_code": null,
      "id": 32000006,
      "is_country": false,
      "name": "International"
    }
  ]
}
```

### Get player rankings

List the top-ranked players for a location (or worldwide).

**Inputs**

- Location (`location_id`, text, required): Which location's rankings to fetch.
- How many players (`limit`, number): How many players to return (1–50). From 1 to 50. Default: `20`.

**Outputs**

- `count` (number): Number of players returned.
- `players` (list): Ranked players, best first.

**Example output**

```json
{
  "count": 1,
  "players": [
    {
      "attack_wins": 480,
      "clan_name": "Reddit Alpha",
      "defense_wins": 120,
      "exp_level": 260,
      "name": "Alice",
      "rank": 1,
      "tag": "#V0LUP",
      "trophies": 6100
    }
  ]
}
```

### Search clans

Search for Clash of Clans clans by name.

**Inputs**

- Clan name (`name`, text, required): The clan name to search for (at least 3 characters).
- Minimum members (`min_members`, number): Only include clans with at least this many members. From 0 to 50.
- Maximum members (`max_members`, number): Only include clans with at most this many members. From 0 to 50.
- How many clans (`limit`, number): How many clans to return (1–50). From 1 to 50. Default: `10`.

**Outputs**

- `clans` (list): The matching clans.

**Example output**

```json
{
  "clans": [
    {
      "badge_url": "https://api-assets.clashofclans.com/badges/512/abc.png",
      "clan_level": 20,
      "clan_points": 45123,
      "location": "International",
      "members": 2,
      "name": "Reddit Alpha",
      "required_trophies": 3000,
      "tag": "#2PP",
      "type": "inviteOnly"
    }
  ]
}
```
