> For the complete documentation index, see [llms.txt](https://qubic.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://qubic.gitbook.io/docs/api/pass-admin-api/get-all-nfts.md).

# 取得智能合約中的所有 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
    }
  }
```
