Skip to main content
Version: 2.2

How to get all the NFT collections owned by an address

Don't have an API key yet?

Start using this API for your project today.

Get your free API key

Step 1: Setup Moralis

Read the article Setting Up Moralis: Getting Started and make sure to finish all the steps. Only after that you can go ahead to complete this guide.

Step 2: Get All NFTs Collections Owned By An Address

In order to get all the NFTs owned by an address, Moralis provides you with a getWalletNFTCollections endpoint to do so.

Here you'll need two parameters: address and chain.

Once you've obtained both the address and chain, you can copy the following code:

const Moralis = require("moralis").default;
const { EvmChain } = require("@moralisweb3/common-evm-utils");

const runApp = async () => {
await Moralis.start({
apiKey: "YOUR_API_KEY",
// ...and any other configuration

const address = "0x26fcbd3afebbe28d0a8684f790c48368d21665b5";

const chain = EvmChain.ETHEREUM;

const response = await Moralis.EvmApi.nft.getWalletNFTCollections({



Step 3: Run the script

To run the script, enter the following command:

node index.js

In your terminal, you should see the following JSON response:

"total": 503,
"page": 1,
"page_size": 100,
"cursor": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0b21QYXJhbXMiOnsid2FsbGV0QWRkcmVzcyI6IjB4ZDhkYTZiZjI2OTY0YWY5ZDdlZWQ5ZTAzZTUzNDE1ZDM3YWE5NjA0NSJ9LCJrZXlzIjpbIjE2NTg2ODUyMDMuNzExIl0sIndoZXJlIjp7Im93bmVyX29mIjoiMHhkOGRhNmJmMjY5NjRhZjlkN2VlZDllMDNlNTM0MTVkMzdhYTk2MDQ1In0sImxpbWl0IjoxMDAsIm9mZnNldCI6MCwib3JkZXIiOltdLCJ0b3RhbCI6NTAzLCJwYWdlIjoxLCJ0YWlsT2Zmc2V0IjoxLCJpYXQiOjE2NjY4MDE3OTV9.wdLubHbqnGg36awXqwlJ7cnsdIX5DHDDnArnva72W5I",
"result": [
"token_address": "0xff8852a5f77c20094f0fabc7b225b417e0797907",
"contract_type": "ERC721",
"name": "VictoriasSecret",
"symbol": "VS"
"token_address": "0xff66f3c087b0e8e0d1349cadb218efd7bcf0ac99",
"contract_type": "ERC721",
"name": "Flower Shoppe",
"symbol": "FLWRSHP"
"token_address": "0xfeddc1448eb4480714a9942ba28a27b16caf9ce4",
"contract_type": "ERC721",
"name": "Impervious Registry",
"symbol": "IR"
"token_address": "0xfec64651c8b441f2526b1a54febb2122124bf041",
"contract_type": "ERC721",
"name": "Porsche",
"symbol": "Porsche"
"status": "SYNCED"

Congratulations 🥳 you just got all the NFT collections owned by an address with just a few lines of code using the Moralis NFT API!

Youtube Video

API Reference

If you want to know more details on the endpoint and optional parameters, check out:

Next Steps

Learn how to use the Moralis NFT API to build dapps:


If you face any trouble following the tutorial, feel free to reach out to our community engineers in our Discord or Forum to get 24/7 developer support.