# API

![](/files/-M7H-XtccqlBwu9_5TWF)

クリプトスペルズに関する外部サービスを立ち上げるエンジニア様方向けに、クリプトスペルズで利用できるAPIの詳細について説明いたします。

### ユーザーが持っているカードNFTのToken IDの一覧を返す <a href="#id-45d2" id="id-45d2"></a>

/public\_api/players/\[:user\_id]/cards.json

※ゲーム内にないもの、トレードに出品中、レンタル中のものは除きます。

### プレイヤーの基本情報を返す <a href="#id-8e6e" id="id-8e6e"></a>

/public\_api/players/\[:user\_id].json

### カードの基本情報を返す <a href="#f3c5" id="f3c5"></a>

/public\_api/cards/\[:card\_number].json

※card\_numberはカード図鑑で表示されている番号です。

### カードトークンの情報を返す <a href="#id-85cf" id="id-85cf"></a>

/public\_api/card\_tokens/\[:token\_id].json

※token\_idは1から始まる9桁のトークンIDです。

### ギルドの基本情報を返す <a href="#c3b7" id="c3b7"></a>

/public\_api/guilds/\[:guild\_id].json

※guild\_idは1,2,3,4,5のいずれかで、1 = ruby、2 = sapphire、3 = emerald、4 = diamond、5 = onyxに対応しています。

### 色毎の勝率、使用率のデータを返す <a href="#c37b" id="c37b"></a>

/public\_api/color\_stats?time=\[:time]\&type=\[:type]&.json

### カード毎の勝率、使用率のデータを返す（更新終了） <a href="#id-3b98" id="id-3b98"></a>

### クリプトスペル毎の勝率、使用率のデータを返す（更新終了） <a href="#id-3bab" id="id-3bab"></a>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cryptospells.gitbook.io/cryptospells/other/api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
