I'm curious web3 developer. I've been researching several NFTs marketplace and I'm wondering how are they returning all the NFTs based on Contract Address.
For example, LOOKSRARE has an API that returns the NFTs of a given contractAddress, Opensea does the same but with their api url.
I'd like to know how is this possible? How can I build an API that goes through all the NFTs of a collection address and returned them. I thought of building a subgraph but not sure how useful it could be. Another approach I thought about was:
- Getting the contract address
- Reading the metadata / baseURI from the NFT contract and return it.
But not sure how to collect all of them. Is this really decentralized if its living in a database?