listNFTCollections
Get a list of NFT collections matching the given filters.
How to use listNFTCollections method ?
Below, you'll find an in-depth guide that provides a comprehensive explanation of how to utilize the listNFTCollections method effectively using Blast.
Parameters
Below, you can find the query parameters accepted by the method.
Parameter | Type | Description |
---|---|---|
contractType* | string | The contract type of the NFT collections to be retrieved |
fromBlock | string | Starting block for querying |
toBlock | string | Ending block for querying |
sortBy | string | The parameter by which the retrieved NFT collections should be sorted (one of: deployBlockNumber, totalSupply, numberOfOwners, numberOfTransfers, default: deployBlockNumber) |
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 NFT collections that match the specified filters |
nextPageKey | string | Key to get the next page of results if more are available. |
collections | array<object> | array of NFTCollection objects (see the getNFTCollection method for more details) |
This API is paginated, response items are ordered descending by sortBy field value.
Example Request and Result for listNFTCollections
In this section, you can find an illustrative example of a request made to retrieve the total count of NFT sets that satisfy the required filters and the NFTCollection objects using the listNFTCollections 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 NFT collections that match the specified filters.
GET
https://starknet-mainnet.blastapi.io/<project_id>/builder/listNFTCollection?
Query Parameters
Name | Type | Value |
---|---|---|
contractType | string | |
sortBy | string |
Last updated