Links
💹

Token Metadata API

Get both on-chain and off-chain metadata API for Solana tokens.
Returns metadata for a list of given token mint addresses. Common mints are internally cached for optimized performance.

v0/token-metadata

You can pass up to 100 mint accounts.
Use https://api-devnet.helius.xyz/v0/token-metadata for devnet metadata.
post
https://api.helius.xyz
/v0/token-metadata
Returns all metadata associated with an account, including data from the old token list.

Example Use Cases

Arguably the most interesting parts of the NFT such as image URL and attributes/traits are stored on the metadata. The NFT metadata endpoint can be used to either bulk fetch multiple NFTs' metadata or a single one. Some example use cases:
  • NFT Photo Gallery
  • Rarity calculator/analysis
  • Dynamic/evolving NFTs

Code Samples

getMetadata.js
const url = "https://api.helius.xyz/v0/token-metadata?api-key=<your-key>";
const nftAddresses = [
"BAAzgRGWY2v5AJBNZNFd2abiRXAUo56UxywKEjoCZW2",
"8s6kQUZfdm7GSaThAcsmSs56wMinXrbk6SdNVngutrz5"
]; // Monkes
const getMetadata = async () => {
const response = await fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
mintAccounts: nftAddresses,
includeOffChain: true,
disableCache: false,
}),
});
const data = await response.json();
console.log("metadata: ", data);
};
getMetadata();

v0/tokens/metadata (deprecated)

post
https://api.helius.xyz
/v0/tokens/metadata
Returns token metadata (whether NFT or Fungible) for a given token address.
Parameters
Query
api-key*
string
The api key.
Body
Example
Schema
{
"mintAccounts": [
"string"
]
}
Responses
200: OK
Returns the token metadata.
400: Bad Request
Invalid request.
401: Unauthorized
Unauthorized request.
403: Forbidden
Request was forbidden.
404: Not Found
The specified resource was not found.
429: Too Many Requests
Exceeded rate limit.
500: Internal Server Error
The server encountered an unexpected condition that prevented it from fulfilling the request.