NFT Spam Detection
Our APIs automatically identify and filter potentially harmful or unwanted NFTs while giving you full control over the user experience.
Overview
NFT spam has become a significant problem in the ecosystem, with bad actors using airdrops to distribute scam NFTs, phishing attempts, and low-quality content. Our spam detection system analyzes multiple signals to identify problematic collections and provides flexible filtering options for developers.
Key Features:
- Automatic spam detection with scores from 0-100
- Default filtering to protect users by default
- Flexible controls for custom filtering experiences
- Real-time spam score updates
How Spam Detection Works
Our spam detection algorithm analyzes multiple signals to calculate a spam score between 0-100, where higher scores indicate a higher likelihood of spam.
Detection Criteria
We evaluate collections based on these key factors:
- 
Centralization of Ownership - Analyzes how distributed ownership is across wallets
- Highly centralized collections often indicate artificial activity
 
- 
All-Time Volume - Examines historical trading volume and patterns
- Legitimate collections typically show organic trading activity
 
- 
Unique Interactors - Counts the number of unique wallets that have interacted with the collection
- Spam collections often have limited genuine user interaction
 
- 
Honey Pot Airdrops - Detects patterns consistent with malicious airdrop campaigns
- Identifies collections used for phishing or scam attempts
 
- 
User Reporting - Incorporates community feedback and user reports
- Helps identify new spam patterns quickly
 
Spam Score Calculation
- Score Range: 0-100 (higher = more likely spam)
- Threshold: Collections scoring >50 are considered spam
Using the Hidden Filter
The simplest way to handle spam is to use the hidden filter found the nftBalances portfolio endpoint. When hidden=false, NFTs that have been identified as spam will not be returned.
Basic Hidden Filter Usage
Try it nowExample Variables
{
  "addresses": [
    "0x52c8ff44260056f896e20d8a43610dd88f05701b"
  ],
  "first": 10,
  "order": {
    "by": "LAST_RECEIVED"
  },
  "filters": {
    "hidden": false  // When false it will not return NFTs that have been indetified as spam
  }
}
Showing Hidden/Spam NFTs
To show spam NFTs (for advanced users or debugging), set hidden: true:
{
  "addresses": [
    "0x52c8ff44260056f896e20d8a43610dd88f05701b"
  ],
  "filters": {
    "hidden": true  // Returns only NFTs identified as spam
  }
}
Be cautious when showing spam NFTs to users, as they may contain malicious content or phishing attempts.
Checking Collection Spam Scores
For more granular control, you can query the spamScore of specific collections using the nftCollectionV2 endpoint.
Example Variables
{
  "input": {
    "address": "0xce2830932889c7fb5e5206287c43554e673dcc88",
    "chainId": 8453
  }
}
Example Query
query SpamExample($input: NftCollectionInputV2) {
  nftCollectionV2(input: $input) {
    name
    spamScore
    address
    networkV2 {
      chainId
      name
    }
  }
}
Example Response
{
  "data": {
    "nftCollectionV2": {
      "name": "OK COMPUTERS",
      "spamScore": "0",
      "address": "0xce2830932889c7fb5e5206287c43554e673dcc88",
      "networkV2": {
        "chainId": 8453,
        "name": "Base"
      }
    }
  }
}
Including Spam Scores in Portfolio Responses
You can include spam scores directly in the nftBalances portfolio endpoint to build custom filtering experiences.
Example Query with Spam Scores
query NFTBalances_WithSpamScores($addresses: [Address!]!, $first: Int, $order: PortfolioV2NftBalanceByTokenInputInput) {
  portfolioV2(addresses: $addresses) {
    nftBalances {
      totalBalanceUSD
      totalTokensOwned
      byToken(first: $first, order: $order) {
        edges {
          node {
            lastReceived
            token {
              tokenId
              name
              description
              supply
              circulatingSupply
              estimatedValue {
                valueUsd
                valueWithDenomination
                denomination {
                  address
                  symbol
                  network
                }
              }
              collection {
                network
                address
                name
                type
                spamScore  # Include spam score
                deployer
                deployedAt
                owner
                medias {
                  logo {
                    mimeType
                    fileSize
                    blurhash
                    height
                    width
                    originalUri
                    original
                    large
                    medium
                    thumbnail
                    predominantColor
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
Example Response with Spam Score
{
  "data": {
    "portfolioV2": {
      "nftBalances": {
        "totalBalanceUSD": 7330.6878496656,
        "totalTokensOwned": "31134",
        "byToken": {
          "edges": [
            {
              "node": {
                "lastReceived": 1734390407000,
                "token": {
                  "tokenId": "11410",
                  "name": "Opepen 11410",
                  "description": "This artwork may or may not be handmade.",
                  "supply": "1",
                  "circulatingSupply": "1",
                  "estimatedValue": {
                    "valueUsd": 458.7449105987138,
                    "valueWithDenomination": 0.2543792169395613,
                    "denomination": {
                      "address": "0x0000000000000000000000000000000000000000",
                      "symbol": "ETH",
                      "network": "ethereum"
                    }
                  },
                  "collection": {
                    "network": "ETHEREUM_MAINNET",
                    "address": "0x6339e5e072086621540d0362c4e3cea0d643e114",
                    "name": "Opepen Edition",
                    "type": "GENERAL",
                    "spamScore": "0",
                    "deployer": "0xf74b146ce44cc162b601dec3be331784db111dc1",
                    "deployedAt": 1673205671000,
                    "owner": "0xc8f8e2f59dd95ff67c3d39109eca2e2a017d4c8a"
                  }
                }
              }
            }
          ]
        }
      }
    }
  }
}
Custom Filtering Strategies
With access to spam scores, you can implement custom filtering strategies:
Custom Threshold
// Set a custom threshold
const userThreshold = 30; // User preference
const shouldShow = collection.spamScore <= userThreshold;
Graduated Display
// Show different UI based on spam score
if (collection.spamScore <= 50) {
  // Display normally
} else if (collection.spamScore <= 75) {
  // Display with warning
} else {
  // Hide or show with strong warning
}
Best Practices
1. Default to Safety
Always use the default hidden: false filter unless users explicitly request to see spam NFTs.
// Good: Safe by default
const filters = { hidden: false };
// Risky: Showing all NFTs including spam
const filters = { hidden: true };
2. Provide User Control
For advanced users, consider providing spam score thresholds as a setting:
const userSettings = {
  spamThreshold: 50, // User-defined comfort level
  showWarnings: true  // Show warnings for borderline NFTs
};
3. Monitor and Report
Help improve the system by reporting false positives or new spam patterns.
Related Endpoints
Learn more about the endpoints used in spam detection:
- Portfolio V2 NFT Balances: Main endpoint for querying NFT holdings with spam filtering
- Collection Metadata: Detailed collection information including spam scores
Summary
Our NFT spam detection system provides multiple layers of protection while maintaining flexibility for developers:
- Automatic Protection: Default filtering keeps users safe
- Granular Control: Spam scores allow custom filtering logic
- Real-time Updates: Scores update as new data becomes available
- User Choice: Let users decide their comfort level with spam
By leveraging these tools, you can create a safer, more enjoyable NFT experience for your users while maintaining the flexibility to handle edge cases and power user needs.