1

I was wondering if, apart from the magic eden API, if it was possible to directly fetch on-chain NFT collection data(in JSON) with javascript? Or does that have to be done via web scraping?

1 Answer 1

1

Sure can! But the NFT metadata is stored off-chain actually (Arweave, NFT storage etc...) the on-chain data has the URI that holds the NFT metadata.

You can try the metaplex findByMint method, just give it a mint Address and it'll returns an Nft object.

const nft = await metaplex.nfts().findByMint({ mintAddress }).run();

Also see the Solana Cookbook for a more complete example.

P.S. There's also 3rd party API's from Quicknode and Moralis you could try.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.