Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escape special characters +-&|!(){}[]^"~*?:\ - e.g. \+ \* \!
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
How do you get data about NFTs of an address using an API?

How do you get data about a user's NFTs using an API? Specifically, I want to get NFT metadata with values. For example: If there is a defined NFT, the user gets additional functionality in the service.

Posted 11 months ago
Edited 11 months ago
Votes Newest


First, pick an endpoint for the http-api. There are many places you can get this:

Then, you can query the specific API of the NFT's metadata in accordance to the TEP-0062 standard:

From your question, I'm assuming you want to do this on the web. To do this, the TONWeb SDK has some options for you.

const NftCollection = TonWeb.token.nft.NftCollection;
const NftItem = TonWeb.token.nft.NftItem;
const nftCollection = new NftCollection(provider, {
     ownerAddress: walletAddress,
     nftItemCodeHex: NftItem.codeHex
const nftCollectionAddress = await nftCollection.getAddress()
const getNftCollectionInfo = async () => {
     const data = await nftCollection.getCollectionData()

Here's the testing script for NFTs in the TonWeb package:

Posted 11 months ago
384 × 5 Administrator