Skip to main content
Version: 2.0

Get NFT owners of collection

GEThttps://mainnet-aptos-api.moralis.io/nfts/collections/:collection_data_id_hash/owners/list

Get owners of a given NFT collection.

PATH PARAMS
collection_data_id_hashstringrequired
The id of the token
QUERY PARAMS
limitnumberrequired
The number of results to return
offsetnumber
The number of results to skip
cursorstring
The cursor to use for getting the next page
Responses
API KEY
import Moralis from 'moralis';

try {
await Moralis.start({
apiKey: "YOUR_API_KEY"
});

const response = await Moralis.AptosApi.nfts.getNFTOwnersOfCollection({
"limit": 5,
"collectionDataIdHash": "7ac8cecb76edbbd5da40d719bbb9795fc5744e4098ee0ce1be4bb86c90f42301"
});

console.log(response);
} catch (e) {
console.error(e);
}
Response Example
{
"cursor": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4",
"hasNextPage": true,
"result": [
""
]
}