# Collections Assets Owner List

## Collections Assets Owner List とは？

<https://open-sea-utilities.vercel.app/collections-assets-owner-list>

特定のコレクションのNFTを保有する人のアドレス、保有数などを一覧表示します。

あるコレクションのNFTを買ってくれた人に特典をプレゼントしたい！って時に使うとちょっと便利。

![](/files/8Aql3miuvDAgrJRzXg1m)

※イメージ画像では[ak](https://twitter.com/ak_ism49)さんの「[Gothic Mysterious Girl's of Secret area](https://opensea.io/collection/ak-ism49)」を使わせてもらってます。

## 仕組み

Open Seaが提供するAPIを使用し、あるコレクションに含まれるNFTとそのオーナー情報を収集します。

#### ①コレクションに含まれるNFT情報の取得。

{% embed url="<https://docs.opensea.io/reference/getting-assets>" %}
コレクションに含まれるNFTのコントラクトアドレス、トークンIDをまとめて取得するためのAPI
{% endembed %}

| パラメータ      | 設定値                       |
| ---------- | ------------------------- |
| collection | 入力されたコレクションURLのslug\_name |
| limit      | 50                        |
| offset     | 50 \* API実行回数             |

まず初めに「Retrieving assets」APIを叩き、ユーザが入力したコレクションに含まれるNFTの情報を取得します。1回の実行で最大50件しか取得できないため、すべての情報を取りきるまで何度も当APIを叩きます。

#### ②NFTのオーナー情報の取得

{% embed url="<https://docs.opensea.io/reference/retrieving-a-single-asset>" %}
オーナー情報を取得するためのAPI
{% endembed %}

| パラメータ                    | 設定値                                |
| ------------------------ | ---------------------------------- |
| asset\_contract\_address | 「Retrieving assets」で取得したコントラクトアドレス |
| token\_id                | 「Retrieving assets」で取得したトークンID     |

①で取得したNFT情報を一件一件見ていき、コントラクトアドレス、トークンIDを使って「Retrieving a single asset」を叩きます。

オーナーのアドレス、そのオーナーがコレクションのNFTを何個保有しているか、保有しているNFTの名称などを収集し、一覧化して表示します。

## 注意事項

* Ethereumチェーンのみ対応。Polygonは非対応。
* NFTの数だけ当APIを実行するため、NFT数の多いコレクションほど時間が掛かります。発行数10000個のコレクションなんかは死ぬほど待たされます。（でも取得はできます。）
* 同一のコンテンツを複数枚発行しているタイプのNFTの場合、保有者の情報が10人分しか取得できません。（「Retrieving a single asset」の仕様） 保有者が11人以上いる場合は全員の情報を表示できませんのでご注意ください。

![こういうやつ](/files/4ftSZydIGUIXlYZaCfgI)


---

# 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://barururu3-pororo-kmt.gitbook.io/ytendens-tools-doc/tools/collections-assets-owner-list.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.
