Immediately’s tutorial will present you the best way to get all verified NFT collections of an deal with utilizing the Moralis NFT API. Because of the accessibility of this API, you may get this knowledge with a single API name to the getWalletNFTCollections() endpoint. Right here’s an instance of what it’d appear like:
const Moralis = require(“moralis”).default;
const { EvmChain } = require(“@moralisweb3/common-evm-utils”);
const runApp = async () => {
await Moralis.begin({
apiKey: “YOUR_API_KEY”,
// …and some other configuration
});
const deal with = “0x1f9090aaE28b8a3dCeaDf281B0F12828e676c326”;
const chain = EvmChain.ETHEREUM;
const response = await Moralis.EvmApi.nft.getWalletNFTCollections({
deal with,
chain,
});
console.log(response.toJSON());
};
runApp();
All you need to do is add your Moralis API key, configure the deal with and chain parameters to suit your question, and run the code. In return, you’ll get a response containing an array of NFT collections.
Every assortment may have a verified_collection property that’s both true or false. If it’s true, it signifies that the NFT assortment is verified. Right here’s an instance of what the response may appear like:
//…
{
“standing”: “SYNCING”,
“web page”: “2”,
“page_size”: “100”,
“outcome”: {
“token_address”: “0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB”,
“contract_type”: “ERC721”,
“identify”: “CryptoKitties”,
“image”: “RARI”,
“possible_spam”: “false”,
“verified_collection”: “false”
}
}
//…
It doesn’t must be more difficult than this to get verified NFT collections when working with Moralis! When you’d wish to be taught extra about how this works, take a look at the official get NFT collections by pockets documentation or be part of us all through this text.
Additionally, if you happen to haven’t already, enroll with Moralis instantly, and also you’ll have the ability to make comparable calls to the NFT API in a heartbeat!
Overview
The non-fungible token (NFT) house has been rising quickly over the previous few years, and the market is crammed with thousands and thousands and thousands and thousands of NFT collections. Some are established tasks like Pudgy Penguins and CryptoPunks, whereas others are irrelevant collections and NFT spam. Because of the huge variety of tasks, you’ll want a simple method to filter out the noise when constructing NFT tasks. Happily, that is the place the Moralis NFT API enters the equation, permitting you to seamlessly get verified NFT collections with a single line of code. To be taught extra about how this works, be part of us on this article as we present you the best way to get all verified NFT collections of an deal with in a heartbeat!
We’ll kickstart in the present day’s article by first explaining what verified NFT collections are. In doing so, we’re additionally going to clarify why you want this NFT knowledge when constructing Web3 tasks. From there, we’ll soar straight into the tutorial and present you the best way to get verified NFT collections in three easy steps utilizing Moralis. Lastly, to high issues off, we’ll dive into some outstanding use circumstances for verified NFT collections.
![Moralis NFT API homepage](https://moralis.io/wp-content/uploads/2023/10/Moralis-NFT-API-homepage.png)
What are Verified NFT Collections?
Everytime you question all NFT collections of an deal with utilizing the Moralis NFT API, you obtain an array of collections. Every assortment within the array may have a verified_collection property that may both be true or false. If it’s true, it signifies that it’s a verified NFT assortment.
However what precisely does it imply {that a} assortment is verified?
In brief, verified NFT collections are tasks which have been vetted by an NFT market. Everytime you see a checkmark subsequent to an NFT assortment on web sites like OpenSea, Rarible, or Blur, it normally signifies that {the marketplace} has verified it.
![Example of verified nft collections on nft marketplaces](https://moralis.io/wp-content/uploads/2023/10/Example-of-verified-nft-collections-on-nft-marketplaces-1024x278.png)
There are numerous advantages to having verified NFT collections, and a few outstanding examples could be discovered under:
Visibility: Verified NFT collections can acquire extra visibility on their respective marketplaces, making it simpler for customers to search out them. Belief: Verifying NFT collections brings better belief to the Web3 ecosystem, permitting customers to effortlessly distinguish between reputable tasks and potential scams. Rip-off Detection: By distinguishing between verified and unverified tasks, it turns into considerably simpler for customers to establish doubtlessly fraudulent collections.
All in all, verified NFT collections carry better belief to the NFT ecosystem by serving to neighborhood members establish genuine creators and tasks. It additionally helps creators with attain because it makes it simpler for customers to belief their specific assortment.
Why You Want Verified NFT Collections
The NFT market has been rising quick over the previous few years, and we have now seen thousands and thousands and thousands and thousands of collections emerge throughout this time. This contains legit and verified tasks like CryptoPunks, Pudgy Penguins, and many others. Nonetheless, it additionally contains many unverified tasks which are both irrelevant or more likely to be scams.
Because of the huge variety of tasks, you usually want a method to filter out the noise when constructing an NFT challenge. In doing so, you’ll have the ability to current collections which are related to your customers, offering a extra seamless consumer expertise.
When you’d wish to discover ways to get verified NFT collections utilizing the Moralis NFT API, be part of us within the subsequent part as we break down your entire course of from begin to end!
3-Step Tutorial: The way to Get Verified NFT Collections
![Title - 3-step tutorial - get verified nft collections with Moralis](https://moralis.io/wp-content/uploads/2023/10/Title-3-step-tutorial-get-verified-nft-collections-with-Moralis-1024x307.png)
Within the following sections, we’ll present you the best way to get all verified NFT collections of an deal with utilizing Moralis. And because of the accessibility of the Moralis NFT API, now you can seamlessly get the info you want in three easy steps:
Set Up MoralisCreate a ScriptRun the Code
Nonetheless, earlier than leaping into the tutorial, you have to full just a few conditions!
Conditions
On this tutorial, we’ll present you the best way to get verified NFT collections utilizing JavaScript. As such, earlier than you possibly can proceed, you have to have the next prepared:
With these prepared, you’re prepared to leap straight into the preliminary step of the tutorial!
Step 1: Set Up Moralis
So as to name the varied endpoints of the NFT API, you initially want a Moralis API key. So, if you happen to haven’t already, click on on the ”Begin for Free” button on the high proper and arrange your Moralis account:
![Step 1 to get verified nft collections - sign up with moralis](https://moralis.io/wp-content/uploads/2023/10/Step-1-to-get-verified-nft-collections-sign-up-with-moralis.png)
With an account at hand, you possibly can head on over to the ”Settings” tab, scroll all the way down to the ”Secrets and techniques” part, and duplicate your API key:
![Copying the NFT api key](https://moralis.io/wp-content/uploads/2023/10/Copying-the-NFT-api-key.png)
Preserve your API key for now, as you’ll want it within the second step of this tutorial to get all verified NFT collections of an deal with.
Subsequent, you moreover want to put in the Moralis SDK. As such, arrange a brand new challenge in your built-in improvement surroundings (IDE), open a brand new terminal, and run the next command within the root folder:
npm set up moralis @moralisweb3/common-evm-utils
That’s it for step one; you’re now prepared to start out coding and creating the script for getting verified NFT collections!
Step 2: Create a Script
To get verified NFT collections owned by an deal with, you merely want a single API name to the getWalletNFTCollections() endpoint. As such, begin by creating a brand new ”index.js” file in your challenge’s root folder and add the next code:
const Moralis = require(“moralis”).default;
const { EvmChain } = require(“@moralisweb3/common-evm-utils”);
const runApp = async () => {
await Moralis.begin({
apiKey: “YOUR_API_KEY”,
// …and some other configuration
});
const deal with = “0x1f9090aaE28b8a3dCeaDf281B0F12828e676c326”;
const chain = EvmChain.ETHEREUM;
const response = await Moralis.EvmApi.nft.getWalletNFTCollections({
deal with,
chain,
});
console.log(response.toJSON());
};
runApp();
From right here, you now must make just a few configurations to the code. To begin with, add the Moralis API key you copied earlier by changing YOUR_API_KEY:
![Showing where to paste the API key for verified nft collections](https://moralis.io/wp-content/uploads/2023/10/Showing-where-to-paste-the-API-key-for-verified-nft-collections-1024x771.png)
Subsequent, configure the deal with and chain parameters to suit your question:
![Configuring the chain and address parameters for the collections in question](https://moralis.io/wp-content/uploads/2023/10/Configuring-the-chain-and-address-parameters-for-the-collections-in-question-1024x710.png)
We then cross the parameters above when calling the getWalletNFTCollections() endpoint:
![Configuring the getWalletNFTCollections endpoint](https://moralis.io/wp-content/uploads/2023/10/Configuring-the-getWalletNFTCollections-endpoint-1024x712.png)
That’s it for the script; you solely want just a few traces of code to get verified NFT collections when working with Moralis. From right here, all that’s left is working the script!
Step 3: Run the Code
For the ultimate step, open a brand new terminal, cd into your challenge’s root folder, and run the next command:
node index.js
In return for working the code, you’ll get a response containing an array of all NFT collections owned by the deal with. Every assortment within the array has a verified_collection property that’s both set to true or false:
//…
{
“standing”: “SYNCING”,
“web page”: “2”,
“page_size”: “100”,
“outcome”: {
“token_address”: “0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB”,
“contract_type”: “ERC721”,
“identify”: “CryptoKitties”,
“image”: “RARI”,
“possible_spam”: “false”,
“verified_collection”: “false”
}
}
//…
If the verified_collection property is true, it signifies that the gathering is verified on OpenSea:
![Example of verified_collections endpoint response](https://moralis.io/wp-content/uploads/2023/10/Example-of-verified_collections-endpoint-response-1024x628.png)
From right here, you possibly can seamlessly kind by way of the array to get all verified NFT collections in a heartbeat!
Congratulations! That’s it; you now know the best way to get all of the verified NFT collections of an deal with utilizing Moralis!
When you’d wish to be taught extra about why that is useful, be part of us within the subsequent part as we discover use circumstances for when this knowledge can turn out to be useful.
Use Circumstances for Verified NFT Collections
It doesn’t matter what NFT challenge you’re constructing; you’ll shortly notice that you just want a simple method to get all verified NFT collections of an deal with. Nonetheless, to offer you an concept of when this knowledge can turn out to be useful, we’ll offer you three examples of use circumstances for verified NFT collections under:
NFT Market: An NFT market is a digital platform permitting customers to retailer, promote, purchase, show, and typically even mint tokens. Some outstanding examples of already present marketplaces embrace Rarible, OpenSea, and Blur.
When constructing an NFT market, it may considerably enhance the consumer expertise of your software if you happen to let customers filter for verified NFT collections. This can assist them discover legit tasks that they will belief.
![Verified NFT Collection Example on OpenSea](https://moralis.io/wp-content/uploads/2023/10/Verified-NFT-Collection-Example-on-OpenSea.png)
Web3 Pockets: Web3 wallets are platforms for storing each fungible and non-fungible property. Some established actors within the house embrace MetaMask, Rainbow, and Phantom.
Like when constructing an NFT market, verified NFT collections can be useful when making a Web3 pockets. For instance, a pockets can permit customers to handle their verified or unverified property, which may considerably enhance the consumer expertise.
Portfolio Tracker: Portfolio trackers are monetary dashboards for the crypto house. These instruments assist you to observe your property throughout wallets, marketplaces, networks, and many others. Some outstanding examples embrace Delta, Kubera, and Moralis Cash.
Getting verified NFT collections can be useful when constructing a portfolio tracker. This can permit customers solely to trace related property, because it turns into considerably simpler to filter out the noise.
When you’d wish to be taught extra about how one can leverage this knowledge, take a look at the clip under from the Moralis YouTube channel:
Exploring the Moralis NFT API Additional
Fetching all verified NFT collections of an deal with solely scratches the floor of what’s doable with the Moralis NFT API. In truth, this software gives a number of endpoints for getting all the info you want to construct subtle NFT tasks. As such, let’s briefly discover the ins and outs of the Moralis NFT API to spotlight the ability and capabilities of this programming interface!
![Marketing Material - Moralis NFT API Banner](https://moralis.io/wp-content/uploads/2023/10/Marketing-Material-Moralis-NFT-API-Banner.png)
The Moralis NFT API helps greater than three million NFT collections throughout a number of EVM-compatible blockchain networks. This contains every thing from established tasks like CryptoPunks, Pudgy Penguins, and many others., to less-known collections that dropped simply a few seconds in the past.
With a single line of code, you possibly can effortlessly get all NFT tokens owned by a consumer deal with, observe NFT trades by market, get ERC-721 on-chain metadata, and far more. And with this knowledge, you possibly can seamlessly construct every thing from a cryptocurrency pockets to an NFT market!
So, if you wish to construct superior Web3 tasks, make sure that to affix Moralis in the present day. You possibly can create an account totally free, and also you’ll acquire fast entry to the NFT API!
Abstract: The way to Get Verified NFT Collections
In in the present day’s article, we kicked issues off by masking the ins and outs of verified NFT collections. In doing so, we realized that they’re collections which have been checked by an NFT market like OpenSea, Rarible, or Blur. Subsequent, we defined why you want a simple method to question this knowledge, as it may make it easier to filter out the noise when constructing Web3 tasks.
From there, we demonstrated the best way to get all verified NFT collections of an deal with in three easy steps:
Set Up MoralisCreate a ScriptRun the Code
As such, in case you have adopted alongside this far, now you can get all verified NFT collections of an deal with in a heartbeat. From right here, now you can incorporate this performance into your subsequent NFT market, Web3 pockets, or portfolio tracker!
When you discovered this tutorial fascinating, take into account testing extra articles right here on the Moralis Web3 weblog. For example, learn our Polygon node information or discover the ins and outs of account abstraction.
Additionally, if you happen to’re severe about constructing Web3 tasks, make sure that to take a look at some further instruments Moralis presents. For example, take a look at the superb Streams API. With this software, you possibly can effortlessly arrange Web3 webhooks to mechanically get notified about related Web3 occasions!
If you would like entry to those industry-leading Web3 APIs, don’t neglect to enroll with Moralis. You possibly can create your account totally totally free and begin leveraging the total energy of blockchain expertise in the present day!