NFT API
Get NFT Collection Holders

Get NFT Collection Holders

Overview

The Get NFT Collection Holders endpoint obtains data on all holders owning NFTs from a specific collection by providing its smart contract, which is a required path parameter. Additionally, metadata and sale_price can be included by setting their field values to true.

A successful request to the endpoint will return a JSON response with data on all holders owning NFTs from the chosen collection, labeled as items. These items will include their id, token_id, and transfer data, along with metadata and sale_price if you opt to include them in your response. The transfer data will feature the following fields: owner, block_number, block_timestamp, and transaction_hash.

Usage

In this example, we receive data on all holders owning NFTs from a specific collection with the contract 0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D.

import * as Parsiq from '@parsiq/parsiq.js';
 
const client = Parsiq.createClient(process.env.API_KEY, Parsiq.ChainId.ETH_MAINNET);
 
const holders = client.nft.getCollectionHolders(`0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D`, {});
 
for await (const holder of holders) {
    console.log(holder);
}

Output:

{
  id: '0000000000c29295-0048-0000000b-00000',
  token_id: '5726',
  transfer: {
    owner: '0x560d8eedc48a59e3f35764151a28879b303d3f70',
    block_number: 12751509,
    block_timestamp: 1625273201,
    tx_hash: '0xd83652814507f4ebd0e5e2b8cfac5366eb30b578bfe5e93820eb94d5cc7e496d'
  },
  metadata: null,
  sale_price: null
}

Parameters

Path params
chainId
string
REQUIRED
version
string
REQUIRED
contract
string
REQUIRED
Query params
metadata
boolean
sale_price
boolean
offset
string
limit
number
estimate_cu
boolean