Query NFT holders (Example)

Query a list of Galaxy’s NFT holders with our API

Last updated on December 22, 2021

This page describes how you can use the GraphQL explorer to query holders of a NFT campaign or a NFT contract.

The query includes holders, it's a AddressConnection .

 

Arguments

  • NFT holders of a NFT campaign
    • Name
      Type
      Description
      id
      ID of the campaign. like GCto8UUcU9
  • NFT holders of a NFT contract
    • Name
      Type
      Description
      address
      address of the NFT contract.

Examples

  • NFT holders of a NFT contract
    •  query nftHolders{
           nftCore(address: "0xc2aCEb37f0A79c4f4437Dd79507D9f4A30735a5C") {
               holders(first: 1000 after: "") {
                   totalCount
                   pageInfo {
                       startCursor
                       endCursor
                       hasNextPage
                       hasPreviousPage
                   }
                   list {
                       address
                   }
               }
           }
       }
  • NFT holders of a NFT campaign
    • query nftHolders{
           campaign(id: "GCto8UUcU9") {
               holders(first: 1000 after: "") {
                   totalCount
                   pageInfo {
                       startCursor
                       endCursor
                       hasNextPage
                       hasPreviousPage
                   }
                   list {
                       address
                   }
               }
           }
       }
  1. Open the GraphQL explorer tool.
  1. Paste the query listed above into the left window of your GraphQL explorer tool.
  1. Click Play to get the result shown here:
    1. Notion image

This GraphQL query returns a list of NFT holders address.

For more information on each attribute, see GraphQL API

 
Did this answer your question?
😞
😐
🤩