Token Metadata

We’re introducing metadata retrieval in our ERC20 token API!
You can now include token information—such as name, symbol, and decimals—in a single call to our /tokens/erc20 endpoint. Just add the new metadata=true parameter to the query string. For example:
GET /v1/tokens/erc20/vitalik.eth&metadata=true
This returns the token’s metadata along with the usual balance data, simplifying your workflows and saving you from making extra calls. We’ve also added caching so metadata lookups are faster after the first request.
You can try it in our playground by visiting here. See the example bellow:

Here is a Typescript example showing how to use it in your code:
const search = async () => {
try {
const response = await fetch('https://1.insight.thirdweb.com/v1/tokens/erc20/vitalik.eth?metadata=true', {
headers: {
"x-client-id": clientId,
},
});
const tokensResult = await response.json();
return tokensResult
} catch (error) {
console.error('Error:', error);
}
};