Introduction
In this tutorial, you’ll learn how to retrieve a summary of all NFT collections owned by a wallet address using the Moralis API. Instead of listing every individual NFT, this endpoint groups NFTs by collection and provides counts, making it perfect for portfolio overviews and collection summaries. We’ll use the following Moralis API endpoint:- Get Wallet NFT Collections - Fetch a summary of NFT collections owned by a wallet
Prerequisites
- Node.js v18+ installed
- A Moralis API key (get one free)
Step 1: Set Up Your Project
Create a new directory for your project and initialize it:Step 2: Create the Script
Create a file calledindex.js and add the following code:
YOUR_API_KEY with your actual Moralis API key.
Step 3: Run the Script
Execute the script to fetch the collections:Example Response
Understanding the Response
| Field | Description |
|---|---|
token_address | Collection contract address |
contract_type | Token standard (ERC721 or ERC1155) |
name | Collection name |
symbol | Collection symbol |
count | Number of NFTs owned from this collection |
collection_logo | URL to collection logo |
possible_spam | Whether flagged as spam |
verified_collection | Whether collection is verified |
floor_price | Current floor price in ETH |
floor_price_usd | Floor price in USD |
Next Steps
- Get NFT Metadata - Get detailed NFT metadata
- Get NFT Floor Prices - Fetch collection floor prices
- NFT Metadata - explore detailed metadata
- NFT Media Images (CDN) - learn how we store NFT images

