APIs used:
  • Get NFTs for address  
  • Check ownership in NFT collection  
  • Get chain collections  

Is your wallet filled with tokens with names that look like ETHStation 1672656735919, smartdiving.game229, or NFTSprites.com? Unfortunately, spams are as common in the NFT world as cat memes. Not only are they annoying for your users, they might even be malicious.

Flag and Filter Out NFT Spam with the Covalent API

Fortunately, Covalent takes spam tokens very seriously and we have recently enhanced all of our NFT endpoints to include spam filters.

This takes the form of an additional is_spam field in the item responses of the following endpoints:

Check ownership in NFT collection

GET/v1/{chainName}/address/{walletAddress}/collection/{collectionContract}/

Commonly used to verify ownership of NFTs (including ERC-721 and ERC-1155) within a collection.

Check ownership in NFT collection for specific token

GET/v1/{chainName}/address/{walletAddress}/collection/{collectionContract}/token/{tokenId}/

Commonly used to verify ownership of a specific token (ERC-721 or ERC-1155) within a collection.

Get chain collections

GET/v1/{chainName}/nft/collections/

Commonly used to fetch the list of NFT collections with downloaded and cached off chain data like token metadata and asset files.

Get NFTs for address

GET/v1/{chainName}/address/{walletAddress}/balances_nft/

Commonly used to render the NFTs (including ERC721 and ERC1155) held by an address.

Get NFTs from contract with metadata

GET/v1/{chainName}/nft/{contractAddress}/metadata/

Commonly used to get NFT token IDs with metadata from a collection. Useful for building NFT card displays.

Get single NFT with cached metadata from contract

GET/v1/{chainName}/nft/{contractAddress}/metadata/{tokenId}/

Commonly used to get a single NFT metadata by token ID from a collection. Useful for building NFT card displays.

Get token balances for address

GET/v1/{chainName}/address/{walletAddress}/balances_v2/

Commonly used to fetch the native, fungible (ERC20), and non-fungible (ERC721 & ERC1155) tokens held by an address. Response includes spot prices and other metadata.

Get NFT transactions for contract

GET/v1/{chainName}/tokens/{contractAddress}/nft_transactions/{tokenId}/

Commonly used to get all transactions of an NFT token. Useful for building a transaction history table or price chart.

To deliver that clean, spam free experience for your users, simply filter the responses with is_spam === false on your frontend client and you’re good to go!

For the following endpoints, you can also specify no_spam=true in the query param to get only the non-spam response items:

Get chain collections

GET/v1/{chainName}/nft/collections/

Commonly used to fetch the list of NFT collections with downloaded and cached off chain data like token metadata and asset files.

Get NFTs for address

GET/v1/{chainName}/address/{walletAddress}/balances_nft/

Commonly used to render the NFTs (including ERC721 and ERC1155) held by an address.

Get token balances for address

GET/v1/{chainName}/address/{walletAddress}/balances_v2/

Commonly used to fetch the native, fungible (ERC20), and non-fungible (ERC721 & ERC1155) tokens held by an address. Response includes spot prices and other metadata.

Get NFT transactions for contract

GET/v1/{chainName}/tokens/{contractAddress}/nft_transactions/{tokenId}/

Commonly used to get all transactions of an NFT token. Useful for building a transaction history table or price chart.

To a safer, cleaner Web3, one spam contract at a time.

Happy buidling.