Overview
The Clash of Clans API provides official data on players, clans, clan wars, leagues, and rankings from Supercell's hit mobile strategy game. You register at developer.clashofclans.com to get an API key tied to your IP address, then query player stats, clan information, and war logs. It's a popular choice for building clan management tools or progress trackers.
Beginner Tip
API keys in Clash of Clans are IP-locked — if your IP changes (e.g. on a home network), you must update your key in the developer portal or create a new one.
Available Data
Example Response
{
"id": 1,
"name": "Clash of Clans",
"data": "Clash of Clans Game Information",
"source": "Clash of Clans"
} Field Reference
tag Unique player or clan tag starting with '#'. name In-game display name. townHallLevel Current Town Hall level of the player's base (1–16). trophies Current trophy count used for league placement. troops Array of troop objects showing name, level, and max level for each unlocked troop. clan.tag Tag of the clan the player currently belongs to (absent if not in a clan). Implementation Example
const url = "https://developer.clashofclans.com/";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
headers: {
"X-API-Key": "YOUR_API_KEY"
}
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data); What Can You Build?
Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.
Common Errors & Troubleshooting
Matrix Score Breakdown
Partially tested on Apr 5, 2026
Technical Specifications
Related Tags
Similar APIs
View All →Brawl Stars
The Brawl Stars API provides official game data including player profiles, club info, battle logs, and brawler statistics.
Clash Royale
The Clash Royale API offers official data on players, clans, cards, battles, and tournaments from Supercell's card-battle mobile game.
Destiny The Game
The Destiny The Game API (Bungie Platform API) gives developers access to data from the popular Destiny franchise, including player stats, character info, and game content.
Dota 2
The Dota 2 API (OpenDota) provides detailed match history, hero statistics, player rankings, and game data for the popular MOBA game Dota 2.
Fortnite
The Fortnite Tracker API lets you retrieve player statistics, match history, and leaderboard data for Fortnite.