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.
Parameter | Type | Description |
---|---|---|
contractAddress* | string | The NFT contract address |
Returns
Parameter | Type | Description |
---|---|---|
contractAddress | string | The contract address of the NFT collection |
contractName | string | The contract name of the NFT collection |
contractSymbol | string | The symbol of the NFT collection contract |
contractType | string | The type of contract governing the NFT collection |
deployBlockNumber | number | The block number at which the NFT collection contract was deployed. |
totalSupply | string | The total supply of NFTs in the collection |
numberOfOwners | number | The total number of unique owners of NFTs in the collection |
numberOfDistinctTokens | number | The number of unique NFTs (distinct tokens) within the collection |
numberOfTransfers | number | The total number of transfers |
walletBalance | NFTCollectionBalance object(optional) | The balance information associated with the owner of the collection |
contractAddress | string | The contract address of the NFT collection |
contractType | string | The type of the NFT contract ('erc721' or 'erc1155') |
walletAddress | string | The address which owns the NFT now (null for erc1155 tokens) |
totalTokenBalance | string | The total balance of tokens owned by the specified owner in the collection |
distinctTokenBalance | string | The balance of distinct tokens owned by the specified owner in the collection |
description | string | A description providing further details about the NFT collection, if available |
website | string | The website associated with the NFT collection, if available |
cachedBanner | CachedMedia object | An object containing cached banner media data for the collection, if available |
cachedLogo | CachedMedia 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.
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
Name | Type | Value |
---|---|---|
contractAddress | String |
|
- 200: OK
{
"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' \