getCollectionNFTs
Get all NFTs that belong to the given collection.
How to use getCollectionNFTs method ?
Below, you'll find an in-depth guide that provides a comprehensive explanation of how to utilize the getCollectionNFTs method effectively using Blast.
Parameters
Below, you can find the query parameters accepted by the method.
Parameter | Type | Description |
---|---|---|
contractAddress* | string | The contract address of the NFT collection |
startTokenId | string | The starting token ID for retrieving NFTs within the given collection (hex or number). |
endTokenId | string | The ending token ID for retrieving NFTs within the given collection (hex or number). |
pageSize | number | Maximum number of records to be retrieved in one page (max 100, default 25) |
pageKey | string | Key used to get the next page of results. Must be set to the value of nextPageKey returned in the previous response |
Returns
Parameter | Type | Description |
---|---|---|
count | number | The total number of NFTs belonging to the given collection |
nextPageKey | string | Key to get the next page of results if more are available. |
nfts | array<object> | array of NFT objects (see the getNFT method for more details) |
This API is paginated, response items are ordered ascending by tokenId.
Example Request and Result for getCollectionNFTs
In this section, you can find an illustrative example of a request made to retrieve the total number of NFTs belonging to the given collection and the list of NFT objects using the getCollectionNFTs 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 the total number of NFTs belonging to the given collection and the array of NFT objects.
GET
https://starknet-mainnet.blastapi.io/<project_id>/builder/getCollectionNFTs?
Query Parameters
Name | Type | Value |
---|---|---|
contractAddress | string | |
startTokenId | string | |
endTokenId | string | |
pageSize | number |
Last updated