Clash Royale API

Games & Comics / API Key Intermediate HTTPS
Varies by plan (check documentation)

Overview

The Clash Royale API offers official data on players, clans, cards, battles, and tournaments from Supercell's card-battle mobile game. Like the Clash of Clans API, you get a key from developer.clashroyale.com that's locked to your IP address. It's great for building deck analyzers, player stat trackers, or clan leaderboards.

💡

Beginner Tip

Start by fetching player data with your own tag to verify your setup works, then explore the /cards endpoint to get the full list of cards without needing a tag.

Available Data

Use case: Integrate clash royale game information data into web and mobile applications
Clash Royale data via REST API
JSON-formatted response data
Requires API key authentication

Example Response

JSON Response
{
  "id": 1,
  "name": "Clash Royale",
  "data": "Clash Royale Game Information",
  "source": "Clash Royale"
}

Field Reference

tag Unique player tag starting with '#'.
name Player's in-game display name.
trophies Player's current trophy count.
bestTrophies All-time highest trophy count for this player.
currentDeck Array of 8 card objects representing the player's currently selected battle deck.
arena.name Name of the current arena the player is competing in.

Implementation Example

const url = "https://developer.clashroyale.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

403 Forbidden The IP address sending the request is not whitelisted on your API key.
Visit developer.clashroyale.com, edit your key, and add your current IP to the allowed list.
404 Not Found The player or clan tag is either wrong or not properly URL-encoded.
Encode '#' as '%23' in the URL — for example, use %23ABC123 instead of #ABC123.
Empty currentDeck array The player's deck is only visible when they have a battle deck set.
This is normal for some players; gracefully handle an empty or absent currentDeck field in your code.

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 10/20
🔒 Security 15/15
🛠 Developer XP 12/20
✓ Reliability 10/15

Partially tested on Apr 5, 2026

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS UNKNOWN
Category Games & Comics
Difficulty Intermediate
Verified: 2026-04-04

Similar APIs

View All →