Skip to main content

Get NFT owners by contract

Retrieve a list of all wallet addresses that currently own NFTs from a specific collection.


Description

GET /nft/:address/unique-owners

This endpoint helps you check who owns the NFTs from a particular NFT smart contract. For example, you can find out how many wallets currently hold tokens from the Bored Ape Yacht Club collection.

Headers

HeaderValue
X-API-KeyYour Moralis API key
acceptapplication/json

Parameters

ParameterTypeRequiredDescription
addressstringYesThe contract address of the NFT collection. Example: 0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d
chainstringNoBlockchain network to query. Options: eth, polygon, bsc, avalanche. Default: eth.
limitstringNoThe desired page size of the result.
cursorstringNoThe cursor returned in the previous response (used to get the next page).

Example request (cURL)

curl -X GET \
"https://deep-index.moralis.io/api/v2/nft/0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d/owners?chain=eth" \
-H "accept: application/json" \
-H "X-API-Key: YOUR_API_KEY"

Example response

{
"total": 3,
"page": 1,
"page_size": 100,
"result": [
{
"token_address": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d",
"owner_of": "0x9fB8...3A7C",
"token_id": "1",
"amount": "1"
}
]
}

Common errors

Error CodeMeaningPossible Cause
400 Bad RequestInvalid address formatCheck if your contract address is correct
401 UnauthorizedMissing or invalid API keyMake sure your X-API-Key header is set
404 Not FoundContract not foundThe contract might not exist on that chain