searchNFTs Function

in that function, I want to change the filter to ownerAddress, creatorAddress, actorAddress or walletAddress

const options = { q: "Pancake", chain: "bsc", filter: "name" };
const NFTs = await Moralis.Web3API.token.searchNFTs(options);

I did that change

const options = { q: "0x4bxxxxxxxxxxxxxxxxx", chain: "bsc", filter: "walletAddress" };
const NFTs = await Moralis.Web3API.token.searchNFTs(options);

But
Uncaught Error: Invalid filter
at Function. (moralis.js:7733:23)
at tryCatch (moralis.js:73345:40)
at Generator.invoke [as _invoke] (moralis.js:73576:22)
at Generator.throw (moralis.js:73401:21)
at asyncGeneratorStep (moralis.js:29991:24)
at _throw (moralis.js:30017:9)

ok Thanks, I got it

const options = {q: "0x4xxxxxxxx", chain: "bsc" };
const NFTs = await Moralis.Web3API.token.searchNFTs(options); console.log(NFTs);

without filter, got what i want…

1 Like