Get Asset Batch

Get multiple assets by their IDs.

This method is the fastest way to lookup multiple NFTs (including metadata) on Solana.

You can pass up to 1,000 IDs in this request.

Overview

This method will return valuable NFT metadata for compressed or standard NFTs.

Example

const url = `https://mainnet.helius-rpc.com/?api-key=<api_key>`

const getAssetBatch = async () => {
  const response = await fetch(url, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      jsonrpc: '2.0',
      id: 'my-id',
      method: 'getAssetBatch',
      params: {
        ids: [
          '81bxPqYCE8j34nQm7Rooqi8Vt3iMHLzgZJ71rUVbQQuz',
          'CWHuz6GPjWYdwt7rTfRHKaorMwZP58Spyd7aqGK7xFbn'
        ]
      },
    }),
  });
  const { result } = await response.json();
  console.log("Assets: ", result);
};
getAssetBatch();

Last updated