Get Asset Batch
Get multiple assets by their IDs.
Last updated
Was this helpful?
Get multiple assets by their IDs.
Last updated
Was this helpful?
This method will return valuable NFT metadata for multiple compressed or standard NFTs. You can pass up to 1,000 IDs in this request.
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();
The version of the JSON-RPC protocol.
An ID to identify the request.
test
The name of the DAS method to invoke.
POST / HTTP/1.1
Host: mainnet.helius-rpc.com
Content-Type: application/json
Accept: */*
Content-Length: 120
{
"jsonrpc": "2.0",
"id": "test",
"method": "getAssetBatch",
"params": {
"ids": [
"F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk"
]
}
}
[
{
"interface": "ProgrammableNFT",
"id": "F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk",
"content": {
"$schema": "https://schema.metaplex.com/nft1.0.json",
"json_uri": "https://madlads.s3.us-west-2.amazonaws.com/json/8420.json",
"files": [
{
"uri": "https://madlads.s3.us-west-2.amazonaws.com/images/8420.png",
"cdn_uri": "https://cdn.helius-rpc.com/cdn-cgi/image//https://madlads.s3.us-west-2.amazonaws.com/images/8420.png",
"mime": "image/png"
}
],
"metadata": {
"attributes": [
{
"value": "Male",
"trait_type": "Gender"
},
{
"value": "King",
"trait_type": "Type"
}
],
"description": "Fock it.",
"name": "Mad Lads #8420",
"symbol": "MAD"
}
},
"authorities": [
{
"address": "2RtGg6fsFiiF1EQzHqbd66AhW7R5bWeQGpTbv2UMkCdW",
"scopes": [
"full"
]
}
],
"compression": {
"eligible": false,
"compressed": false,
"data_hash": "",
"creator_hash": "",
"asset_hash": "",
"tree": "",
"seq": 0,
"leaf_id": 0
},
"grouping": [
{
"group_key": "collection",
"group_value": "J1S9H3QjnRtBbbuD4HjPV6RpRhwuk4zKbxsnCHuTgh9w"
}
],
"royalty": {
"royalty_model": "creators",
"target": null,
"percent": 0.042,
"basis_points": 420,
"primary_sale_happened": true,
"locked": false
},
"creators": [
{
"address": "5XvhfmRjwXkGp3jHGmaKpqeerNYjkuZZBYLVQYdeVcRv",
"share": 0,
"verified": true
},
{
"address": "2RtGg6fsFiiF1EQzHqbd66AhW7R5bWeQGpTbv2UMkCdW",
"share": 100,
"verified": true
}
],
"ownership": {
"frozen": true,
"delegated": false,
"delegate": null,
"ownership_model": "single",
"owner": "4zdNGgAtFsW1cQgHqkiWyRsxaAgxrSRRynnuunxzjxue"
},
"supply": {
"print_max_supply": 0,
"print_current_supply": 0,
"edition_nonce": 254
},
"token_info": {
"supply": 1,
"decimals": 0,
"token_program": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
"mint_authority": "TdMA45ZnakQCBt5XUvm7ib2htKuTWdcgGKu1eUGrDyJ",
"freeze_authority": "TdMA45ZnakQCBt5XUvm7ib2htKuTWdcgGKu1eUGrDyJ"
},
"mint_extensions": {}
}
]