Skip to content
This repository was archived by the owner on Jan 5, 2026. It is now read-only.

Latest commit

History

36 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Clash-Royale-API

GitHub last commitGithub Created AtGitHub ReleaseGitHub License

Accessing the CR-API using Python

Users must obtain the corresponding API key to use. Please go to Official Document

Features

  • Search Clan information
  • Search Player information
  • Search local rankings
  • Search player achievement records

Under development

  • Implement a GUI

Example Usage

Here are some example code samples.

DEMO : https://www.youtube.com/watch?v=BKnR_kre6QI&ab_channel=XiangFang

FindClan.py

Search Clan information

importrequestsimportpandasaspdimporttime#Calculate starting timestart_time=time.time()
# Enter your key# Go to https://developer.clashroyale.com/#/ API_KEY=""headers= {
"Authorization": "Bearer {}".format(API_KEY)
}
# GET ClanTag#ex: %23QCRY22P8clan_tag="%23QCRY22P8"url="https://api.clashroyale.com/v1/clans/{}".format(clan_tag)
response=requests.get(url, headers=headers)
try:
ifresponse.status_code==200:
clan=response.json()
df=pd.DataFrame(clan["memberList"])
df.to_excel("FindClan.xlsx")
end_time=time.time()
print(f"Time:{end_time-start_time}")
else:
print(response.status_code)
exceptExceptionase:
print(e)

About

Accessing the Clash Royale API using Python

Topics

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages