# 取得智能合約中的所有 NFT

透過 contract query 去查詢在一個 contract 底下的 NFT 持有狀況，也可以查詢此NFT是否被消毀。當合約裡的 NFT 過多超過一個分頁，可以把此次回傳的 pageInfo.endCursor 當成 after 傳入就可以看到下一個分頁資料。

```graphql
contract(chainId: $chainId, contractAddress: $contractAddress) {
    address
    chainId
    id
    tokens(first: $first, after: $after) {
      nodes {
        id
        owner {
          id
          address
        }
        contract {
          id
          chainId
          address
        }
        tokenId
        metadata {
          imageUrl
          imageThumbnailUrl
          animationUrl
          name
          description
          externalLink
          permalink
          attributes {
            traitType
            value
            displayType
          }
        }
        burnedEvent {
          from
          createdAt
        }
      }
      pageInfo {
        endCursor
      }
      totalCount
    }
  }
```


---

# 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://qubic.gitbook.io/docs/api/pass-admin-api/get-all-nfts.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.
