Search
⌃K
Links

Get the metadata of a specific NFT

As non-fungible tokens (NFTs) gain popularity in the digital asset space, it becomes increasingly important for creators, collectors, and traders to have access to detailed information about individual NFTs. This guide introduces you to the operation of retrieving the metadata of a specific NFT, providing valuable insights into the unique properties, characteristics, and history of the digital asset. By leveraging this functionality, you can better understand the provenance, rarity, and artistic attributes of the NFT, make well-informed decisions about buying, selling, or holding it, and navigate the dynamic NFT market with greater confidence. Ultimately, this operation allows you to manage your digital assets more effectively and fosters a deeper appreciation for the unique qualities of each NFT.

How to get the metada of the NFT on the Ethereum network

Use the TatumSDK (@tatumio/tatum) to get the metadata of the specific NFT.
TypeScript
JavaScript
curl
1
// yarn add @tatumio/tatum
2
import {TatumSDK, Network, Ethereum, ResponseDto, NftTokenDetail} from '@tatumio/tatum'
3
​
4
const tatum = await TatumSDK.init<Ethereum>({network: Network.ETHEREUM})
5
​
6
const metadata: ResponseDto<NftTokenDetail|null> = await tatum.nft.getNftMetadata({
7
tokenAddress: '0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d', // replace with your collection
8
tokenId: '1'
9
})
10
​
11
console.log(metadata.data)
1
// Install with: npm install @tatumio/tatum
2
const { TatumSDK, Network } = require("@tatumio/tatum");
3
​
4
(async () => {
5
try {
6
const tatum = await TatumSDK.init({ network: Network.ETHEREUM });
7
const metadata = await tatum.nft.getNftMetadata({
8
tokenAddress: "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d", // replace with your collection
9
tokenId: "1"
10
});
11
console.log(metadata.data);
12
} catch (error) {
13
console.error("Error getting NFT metadata:", error);
14
}
15
})();
1
curl --location --request GET 'https://api.tatum.io/v4/data/metadata?chain=ethereum&tokenAddress=0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d&tokenIds=1'

Request interface

1
interface GetNftMetadata {
2
/**
3
* Token ID
4
*/
5
tokenId: string
6
/**
7
* Token contract address
8
*/
9
tokenAddress: string
10
}

Response interface

1
interface NftTokenDetail {
2
/**
3
* Blockchain network
4
*/
5
chain: string
6
/**
7
* Token ID
8
*/
9
tokenId: string
10
/**
11
* Token contract address
12
*/
13
tokenAddress: string
14
/**
15
* Token type. Either 'nft' (ERC-721) or 'multitoken' (ERC-1155)
16
*/
17
type: 'nft' | 'multitoken'
18
/**
19
* Token URI
20
*/
21
metadataURI: string
22
/**
23
* Token metadata
24
*/
25
metadata?: {
26
name: string
27
description: string
28
image: string
29
[metadataKey: string]: unknown
30
}
31
}

Supported blockchain networks

Network
Support
Ethereum / Ethereum Sepolia / Ethereum Goerli BNB Smart Chain / BNB Smart Chain Testnet Celo / Celo Alfajores Polygon / Polygon Mumbai
NFTs (BAYC,...) ERC-1155 Tokens
© Tatum Technology, LLC