I’m looking for the most effective method to gather all the NFT metadata for a particular collection on the NEAR blockchain. Does anyone know if there’s a ready-made solution available in the NEAR ecosystem for this task? I’m considering a few options but I’m not sure which one is best. Should I query the smart contract directly to get all the metadata? Or would it be better to set up an indexer and extract the data from events? My end goal is to store the NFT metadata in a database on my backend. What’s the recommended approach for this? I’d appreciate any insights or best practices from those who have experience with NEAR NFTs. Thanks!
Having worked extensively with NFTs on NEAR, I’d strongly recommend setting up an indexer for your use case. It’s the most efficient approach, especially for larger collections. I’ve used the NEAR Indexer Framework in the past, and it’s quite robust for this purpose.
The indexer allows you to listen to contract events in real-time, capturing metadata as it’s emitted. This way, you’re not constantly querying the contract, which can be slow and costly. Once set up, you can easily pipe this data into your backend database.
If you’re dealing with a smaller collection or need a quick solution, querying the contract directly might suffice. But for scalability and long-term efficiency, an indexer is the way to go. It’ll save you time and resources in the long run.
hey, i dealt with this before. indexers work great for big collections, but if u need speed, querying the contract might do. near indexer framework is solid and saves headaches later. just pipe the data to ur backend and you’re set. good luck!
hey there! just a thought - have you considered using the NEAR Lake Framework? it’s pretty awesome for what you’re trying to do. i’ve used it before and it’s way easier to set up than a full-blown indexer, especially if you’re not dealing with HUGE collections.
basically, it lets you stream data from the blockchain in real-time, including nft metadata. you could set it up to listen for the specific collection you’re interested in and then just pipe that data straight into your database. no need to query the contract over and over.
what size collection are we talking about here? that might help decide if lake is the way to go or if you need something beefier.
oh, and have you checked out the near explorer api? sometimes it can be a quick win for smaller projects. might be worth a look?
let me know if you want more details on lake. happy to share my experience!