The ClashKing API provides Clash of Clans history, statistics, and the shared data used by ClashKing's app, dashboard, and bot.
You can browse the live API at api.clashk.ing. The service is actively developed, so check the API reference before relying on an endpoint or response that is not documented.
The API covers:
- player and clan history, rankings, leaderboards, and game statistics
- wars, Clan War Leagues, roster tools, and downloadable reports
- ClashKing server settings, reminders, roles, tickets, giveaways, and other bot features
- accounts, linked players, notifications, app content, and privacy controls
Some routes are public. Routes that read or change account and server data require the access shown in the API reference.
The interactive reference shows the available routes, what to send, what comes back, and whether you need to sign in.
internal/routescontains the API routes and their tests.internal/modelscontains the request and response formats.internal/utilscontains shared setup for the database, cache, authentication, email, and outside services.internal/docsis Swaggo's generated input, whileinternal/swaggerdocs/openapi.jsonandopenapi.yamlare the OpenAPI 3.2 files served by the API.localescontains messages sent to users in supported languages.
Historical data takes real storage and processing to maintain. If you use it in another project, please make it clear that the data comes from ClashKing. A visible mention or link to clashk.ing is enough.
Do not present ClashKing's collected data as if your project collected it independently.
Game images and other Clash of Clans assets are available from assets.clashk.ing. The tools used to prepare them live in the ClashKing Assets repository.
Bug fixes and useful improvements are welcome. Keep changes focused, follow the existing Go style, and include tests when behavior changes.
This project is licensed under the GNU General Public License v3.0.
This project is not affiliated with, endorsed, sponsored, or specifically approved by Supercell. Clash of Clans and its related assets belong to Supercell. Use this API in line with Supercell's Fan Content Policy and Terms of Service.