Overview
NFT rarity measures how unique an NFT is within its collection, based on how common or uncommon its attributes are compared to other NFTs in the same collection. In most NFT collections, traits such as background, color, accessories, or attributes appear at different frequencies. NFTs with less common trait combinations are considered rarer and are often perceived as more valuable by collectors, marketplaces, and analytics platforms. Moralis provides deterministic, collection-wide rarity scores and rankings, calculated directly from indexed NFT metadata. Related pages:How rarity is calculated
Moralis computes rarity per collection, not globally. The rarity calculation process consists of two layers:1. Trait-level analysis
For every trait across the collection, we compute:count
Number of NFTs that contain this traitpercentage
Percentage of the collection that contains this traitrarity_label
Human-readable label based on trait frequency
(e.g. “Top 1% trait”, “Top 10% trait”)
2. NFT-level rarity scoring
For each NFT, we compute:rarity_score
Numerical score derived from the combined rarity of all its traitsrarity_rank
Rank of the NFT within the collection (1 = rarest)rarity_percentage
Relative rarity compared to the entire collectionrarity_label
Human-readable summary (e.g. “Top 1% rarity”)
Supported collections
Rarity calculations are supported for:- ERC-721 collections
- ERC-1155 collections
- Maximum collection size: 50,000 NFTs
- All NFTs must be discoverable and indexed
- Metadata and traits must be available for the full collection
Supported chains
NFT rarity is supported on all EVM chains where Moralis NFT metadata is available, including:- Ethereum
- Polygon
- Base
- Arbitrum
- Optimism
- BNB Chain
- Other supported EVM chains
Trait syncing & rarity processing
Rarity is computed on demand, per collection.Initial sync flow
- A collection is queried using
getNFTTraitsByCollection - The collection is added to a processing queue
- Traits are synced for all NFTs
- Rarity scores and rankings are calculated
Processing times
Typical processing times:- Small collections: 5–15 seconds
- Medium collections: 15–60 seconds
- Large collections (20,000+ NFTs): may take longer
Refreshing rarity scores
Rarity scores can be refreshed after:- NFT reveals
- New mints
- Metadata or trait updates
Why rarity matters
NFT rarity enables:- Collection ranking & discovery
- Trait-based filtering
- Floor price and valuation analysis
- Wallet and portfolio insights
- Marketplace and analytics UIs
Best practices
- Don’t assume rarity exists until processing completes
- Handle
202responses gracefully - Cache rarity results when possible
- Re-sync after major collection events (e.g. reveals)
Summary
Moralis NFT Rarity provides:- Deterministic rarity scores
- Trait-level transparency
- Collection-wide rankings
- Multichain support (EVM)
- Refreshable, on-demand computation

