Skip to main content

NFTOwners

NFT owners API is used for querying ownership information about an NFT. You can use this query to retrieve the owner's Twitter information by an NFT's tokenId, or a list of owners by an NFT contract address.

You can find the step-by-step instructions on how to set up the GraphQL client in your application and how to write a ”get NFT ownership” query in the Read NFT's Ownership section.

Definition​

The definition of nftOwners query is:

nftOwners(contract: String!, tokenId: String) [NFTOwner!]

For input params:

FieldTypeDescription
contractStringInput the NFT's contract address.
tokenIdStringInput the NFT's token ID.

With correct inputs, you can retrieve a list of NFTOwner object with the following fields:

FieldTypeDescription
tokenIdStringOutput the NFT's token ID.
ownerStringOutput the NFT owner's address.
twitterStringOutput the NFT owner's Twitter information.

Example​

Owners of an NFT​

This is an example of a query to fetch the owners for a certain NFT contract. You can also test out in the Playground:

query QueryNFTOwners{
nftOwners(contract: "0x5180db8f5c931aae63c74266b211f580155ecac8") {
owner
tokenId
twitter {
handle
followerCount
}
}
}

The Owner of an NFT with the certain token id​

This is an example of a query to fetch the owner of an NFT with the certain token id. You can also test out in the Playground:

query QueryNFTOwners{
nftOwners(contract: "0x5180db8f5c931aae63c74266b211f580155ecac8", tokenId:"6596") {
owner
tokenId
twitter {
handle
followerCount
}
}
}