Skip to main content

getnftcollection


description: Get collection data for the given NFT contract address.

getNFTCollection

How to use getNFTCollection method ?

Below, you'll find an in-depth guide that provides a comprehensive explanation of how to utilize the getNFTCollection method effectively using Blast.

Parameters

Below, you can find the query parameters accepted by the method.

ParameterTypeDescription

contractAddress*

stringThe NFT contract address

Returns

ParameterTypeDescription
contractAddressstringThe contract address of the NFT collection
contractNamestringThe contract name of the NFT collection
contractSymbolstringThe symbol of the NFT collection contract
contractTypestringThe type of contract governing the NFT collection
deployBlockNumbernumber

The block number at which the NFT collection contract was deployed.

totalSupplystringThe total supply of NFTs in the collection
numberOfOwnersnumberThe total number of unique owners of NFTs in the collection
numberOfDistinctTokensnumberThe number of unique NFTs (distinct tokens) within the collection
numberOfTransfers numberThe total number of transfers
walletBalanceNFTCollectionBalance object(optional)

The balance information associated with the owner of the collection

contractAddressstringThe contract address of the NFT collection
contractTypestringThe type of the NFT contract ('erc721' or 'erc1155')
walletAddressstringThe address which owns the NFT now (null for erc1155 tokens)
totalTokenBalancestring

The total balance of tokens owned by the specified owner in the collection

distinctTokenBalancestring

The balance of distinct tokens owned by the specified owner in the collection

descriptionstring

A description providing further details about the NFT collection, if available

websitestringThe website associated with the NFT collection, if available
cachedBannerCachedMedia object

An object containing cached banner media data for the collection, if available

cachedLogoCachedMedia object

An object containing cached logo media data for the collection, if available

Example Request and Result for getNFTCollection

In this section, you can find an illustrative example of a request made to retrieve the collection data using the getNFTCollection method.

info

The example in this section uses a non-existing project id.

Make sure you replace it with your Starknet endpoint when issuing the Builder API calls.

Don't have a project id? Here's a straightforward guide on how to obtain one!

Returns NFTCollection object.

GET ``https://starknet-mainnet.blastapi.io/<project_id>/builder/getNFTCollection?

Query Parameters

NameTypeValue
contractAddressString

0x07606cac9053e9b8b573a4b0a0ce608880f64869e24b8a605210d7a85bb6e5f1

{
"contractAddress": "0x07606cac9053e9b8b573a4b0a0ce608880f64869e24b8a605210d7a85bb6e5f1",
"contractName": "Spok",
"contractSymbol": "SPOK",
"contractType": "erc721",
"deployBlockNumber": 105325,
"totalSupply": "653658",
"numberOfDistinctTokens": 653658,
"numberOfOwners": 555895,
"numberOfTransfers": 686138,
"description": "Complete tasks, collect SPOKs and gain kudos in the Starknet community! Built by Argent.",
"website": "https://spok.xyz/claim/ef590275-dc77-459e-aed0-f6b2cc4ee439",
"cachedBanner": {
"mimetype": "image/png",
"size": 52980,
"url": "https://builder-assets.blastapi.io/c4265f0d8b792f24cd353ad6fc99b6c6221c4137"
},
"cachedLogo": {
"mimetype": "image/png",
"size": 7831,
"url": "https://builder-assets.blastapi.io/ca856a851d946dfe52d80b1b22d88221c86fad11"
}
}
curl -X GET https://starknet-mainnet.blastapi.io/<project-id>/builder/getNFTCollection?contractAddress=0x07606cac9053e9b8b573a4b0a0ce608880f64869e24b8a605210d7a85bb6e5f1 \
-H 'Content-Type: application/json' \