Marketplace has launched, further enabling blockchain developers! Learn more

Look up all NFTs for a given address on Ethereum mainnet

September 09, 2022

Overview

If you're running Ethereum mainnet, there is chance you will want the ability to look up all of the NFTs owned by an address. The first time this happens, you might create a small script to check a particular NFT contract for ownership. This works, but then you need to add another one, so you update your script and the same when you discover a new NFT project. This won't scale, especially if you're building a wallet or something of that sort.

That's why we've made an add-on available (it's still in beta) for customers who wish to aggregate data from NFTs on Ethereum mainnet, a simple NFT fetcher. It allows you to supply an address (such as 0x91b51c173a4bdaa1a60e234fc3f705a16d228740) and retrieve a list of NFTs currently in its wallet!

Let's take a quick look at how you can use this RPC method:

Example call

It's relatively simple: 

example call

Copy
curl -H "Content-type:application/json" \
     -d '{"id": 1, "method": "qn_fetchNFTs", "params": { "wallet": "0x91b51c173a4bdaa1a60e234fc3f705a16d228740" }}' \
     https://your-node-name.quiknode.pro/long-id-here/

That's it. Just specify your address and the contract address of any NFT projects you'd like to get ownership for while using the `qn_fetchNFTs` method. This call also supports batching like other RPC calls.

You can find more details in our complete documentation on Ethereum for this custom RPC method.

How to purchase

When creating your endpoint on QuickNode API, be sure to select the "NFT Fetch Tool" add-on to enable this feature. You should see something like this:

Thanks

Also, we want to thank the customers who let us know how important this feature was to them and helping us improve the  QuickNode pro network!

Related articles 12

How to Setup Domain Masking on QuickNode
Published: Apr 15, 2022
Updated: Sep 9, 2022

Domain masking or URL masking is the act of disguising the actual domain name of a web resource in favor of another domain name. This article will demonstrate how to set up domain masking on...

Continue reading
Blockchain Consensus Mechanisms
Published: May 25, 2022
Updated: Sep 9, 2022

Data consistency and security are the principles that guide blockchain technology. There are different mechanisms and algorithms blockchains use to regulate their working throughout the chain...

Continue reading
How to set a custom provider in MetaMask
Published: Jun 17, 2021
Updated: Nov 24, 2022

MetaMask is one of the essential tools for web3 development. It comes set up with Ethereum blockchain networks out of the box. But there can be some specific use cases where you might want to...

Continue reading
Web3 Glossary
Published: Jul 20, 2022
Updated: Sep 9, 2022

Your guide to navigating the lingo of Web3. If you have any feedback or would like to submit a suggestion to this glossary, kindly 

Continue reading