ClashofClans-API is an easy to use API for the mobile game ClashofClans
Install and update using pip:
$ pip install clashofclans-api
An API token is required to execute the script. You can create one here.
from ClashofClans import ClashofClans
coc = ClashofClans("your API token")
response = coc.players.get_player_info("e.g. #9Q8QYQ20Q or 9Q8QYQ20Q")
print(response)
$ python3 file.py
(200, <Response [200]>, {'tag': '#9Q8QYQ20Q', 'name': 'Orange', 'townHallLevel': 15, 'townHallWeaponLevel': 4, 'expLevel': 244, ...
This content is not affiliated with, endorsed, sponsored, or specifically approved by Supercell and Supercell is not responsible for it. For more information see Supercell’s Fan Content Policy.