API ReferenceNFT APIGet NFT OwnersGet NFT transfers by collectionVersion: 2.0Get NFT transfers by collectionMainnetTestnetGEThttps://mainnet-aptos-api.moralis.io/nfts/collections/:collection_data_id_hash/ownersGet NFT transfers for a given collection ID hash.PATH PARAMScollection_data_id_hashstringrequiredThe id of the tokenQUERY PARAMSlimitnumberrequiredThe number of results to returnoffsetnumberThe number of results to skipcursorstringThe cursor to use for getting the next pagewallet_blacklistarrayThe addresses of the wallets to blacklistNo items in the arrayAdd Itemwallet_whitelistarrayThe addresses of the wallets to whitelistNo items in the arrayAdd ItemResponses200 object400 objectAPI KEYTest Live APINode.jsPythoncURLGoPHPimport Moralis from 'moralis';try { await Moralis.start({ apiKey: "YOUR_API_KEY" }); const response = await Moralis.AptosApi.nfts.getNFTOwnersByCollection({ "limit": 5, "collectionDataIdHash": "7ac8cecb76edbbd5da40d719bbb9795fc5744e4098ee0ce1be4bb86c90f42301" }); console.log(response);} catch (e) { console.error(e);}from moralis import aptos_apiapi_key = "YOUR_API_KEY"params = { "limit": 5, "collection_data_id_hash": "7ac8cecb76edbbd5da40d719bbb9795fc5744e4098ee0ce1be4bb86c90f42301"}result = aptos_api.nfts.get_nft_owners_by_collection( api_key=api_key, params=params,)print(result)curl --request GET \ --url 'https://mainnet-aptos-api.moralis.io/nfts/collections/7ac8cecb76edbbd5da40d719bbb9795fc5744e4098ee0ce1be4bb86c90f42301/owners?limit=5' \ --header 'accept: application/json' \ --header 'X-API-Key: YOUR_API_KEY' package mainimport ( "fmt" "net/http" "io/ioutil")func main() { url := "https://mainnet-aptos-api.moralis.io/nfts/collections/7ac8cecb76edbbd5da40d719bbb9795fc5744e4098ee0ce1be4bb86c90f42301/owners?limit=5" req, _ := http.NewRequest("GET", url, payload) req.Header.Add("Accept", "application/json") req.Header.Add("X-API-Key", "YOUR_API_KEY") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body))}<?php// Dependencies to install:// $ composer require guzzlehttp/guzzlerequire_once('vendor/autoload.php');$client = new \GuzzleHttp\Client();$response = $client->request('GET', 'https://mainnet-aptos-api.moralis.io/nfts/collections/7ac8cecb76edbbd5da40d719bbb9795fc5744e4098ee0ce1be4bb86c90f42301/owners?limit=5', [ 'headers' => [ 'Accept' => 'application/json', 'X-API-Key' => 'YOUR_API_KEY', ],]);echo $response->getBody();Response Example200 400 { "cursor": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4", "hasNextPage": true, "result": { "amount": "2", "collection_data_id_hash": "6993fb8b5688d392a2d94127b9926519d6327e69f2bcf3dc0c5df2c060aec97d", "collection_name": "Topaz Troopers", "creator_address": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac", "last_transaction_timestamp": "2022-09-17T22:03:32.000000Z", "last_transaction_version": "210373856", "name": "Topaz Troopers 123", "owner_address": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac", "property_version": "1", "table_type": "0x3::token::TokenStore", "token_data_id_hash": "1824178d98256f40046db3db8cf462f1c0a8e0d37304218044f11e69761c88e1", "token_properties": "{\"point\": \"0x30\", \"author\": \"0x33454e4a4f59204c616273\"}" }}