How to do Tagging and Searching

When you are minting your NFT, you can add unique tags to your NFT and can eliminate the time-consuming process to find your NFT among a lot of NFTs. Let's explore why tagging is so useful, and how to tag your NFT with help of APIs.

1388

NFT sorting and searching by tags

Calls return multiple NFTs and support flexible sorting options to zoom in on the most relevant content. Users can search quickly by tag, using the tags parameter on calls like /nft/marketplace and /nft/nfts. As a developer, you can refine the selection using the any_tags and all_tags filters, which are applied in combination with user-specified tags. This saves having to generate a complex AND / OR search query.

curl --location --request GET 
'https://api.nft.kred/nft/nfts?user=0x7744e3a72291a78e1c6395f1ffb527e807257cfa&tags=Pragmaapps&count=20&page=1' \
 --header 'Accept: application/json' \
 --header 'Authorization: Basic am9obndvb2R5OTg1MkBnbWFpbC5jb206QWRtaW5AMTI=='

NFT Search suggestions by tags

Tag analytics methods such as /nft/toptags, /nft/trendingtags and /nft/populartags can be used to provide search suggestions. These search suggestions can be used to filter the NFTs. Top tags are relative to the current user (based on NFTs they have minted or collected), while popular and trending tags are global.

Toptags:

curl --request GET \
     --url 'https://api.nft.kred/nft/toptags?token=YourTokenValue&user=615c1567e9b6cca6' \
     --header 'Accept: application/json' \
     --header 'Authorization: Basic am9obndvb2R5OTg1MkBnbWFpbC5jb206QWRtaW5AMTI=='

Trendingtags:

curl --request GET \
     --url 'https://api.nft.kred/nft/trendingtags?token=YourTokenValue&days=30&count=10' \
     --header 'Accept: application/json' \
     --header 'Authorization: Basic am9obndvb2R5OTg1MkBnbWFpbC5jb206QWRtaW5AMTI=='

Populartags:

curl --request GET \
     --url 'https://api.nft.kred/nft/populartags?token=YourTokenValue&days=30&count=10' \
     --header 'Accept: application/json' \
     --header 'Authorization: Basic am9obndvb2R5OTg1MkBnbWFpbC5jb206QWRtaW5AMTI=='

Tag and Search NFT using an application

Did you try to Tag and Search NFT using the application? You can check out this guide for tagging and searching NFT using our no-code application.