
Security News
GitHub Actions Checkout Now Blocks Risky pull_request_target Checkouts
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.
royale-api-types
Advanced tools
Type definitions for the Royale API
You can install this package using a package manager like npm:
npm install royale-api-types
Note: This package is based on the latest Node.js LTS version. It may work with older versions, but it is not guaranteed.
This package provides type definitions for the Royale API for use with TypeScript. It also includes all routes from the API that can be used in JavaScript.
All types from the API are exported as API*:
import type { APIPlayer } from "royale-api-types";
const player: APIPlayer = {
tag: "#22RJCYLUY",
name: "D Trombett",
// ...
};
import type { APIItem } from "royale-api-types";
// Type '{ name: string; id: number; }' is missing the following properties from type 'APIItem': iconUrls, maxLevel
const card: APIItem = {
name: "Giant",
id: 1,
};
You can also use the Routes interface to access the routes.
Note: Tags should be encoded when sending a request to the API.
import { Routes } from "royale-api-types";
console.log(Routes.Clans()); // "/clans"
console.log(Routes.Clan("#L2Y2L2PC")); // "/clans/#L2Y2L2PC"
Types are documented by Clash Royale's API documentation. We do our best to keep the types up to date, but we would appreciate any contributions.
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.
FAQs
Types for the Clash Royale API
We found that royale-api-types demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.