nft_metadata
Quickly get an NFT's metadata with contract address and token id.
You can specify the contract address and token ID of the NFT, then you can obtain the detailed metadata information like specific description of the certain NFT, the link of the image in IPFS and token URI, etc. Using this API, you could acquire abundant information of the certain NFT you want to get acknowledge.
Supported on Ethereum, BNB Chain, Optimism, and Arbitrum.

Parameters

Object - An object with the following fields (required):
  • contractAddress(hex string, required) - the contract address of the collection. BlockVision currently support both ERC721 and ERC1155.
  • tokenId(string, required) - id of the NFT.

Returns

Object - An object with the following fields:
  • id(integer number) - JSON-RPC id.
  • jsonrpc(string) - JSON-RPC version.
  • result(object, defined below) - an object with the following fields:
  • Object schema:
    • contractAddress(string) - contract address
    • tokenID(string) - id of the NFT.
    • tokenURI(hex string) - URI of the NFT.
    • protocol(string) - metadata storage protocol, The enumeration value is http, https, ipfs, or "".
    • image(string) - image address.
    • name(string) - name for NFT.
    • description(string) - description for NFT.
    • ercStandard(string) - ERC standard for NFT, The enumeration value is erc721, erc1155, or "".
    • attributes(array object) - traits/attributes/characteristics for each NFT asset.

Example

Request

curl --location --request POST 'https://apis.blockvision.org/v1/<api key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"jsonrpc": "2.0",
"method": "nft_metadata",
"params": {
"tokenId": "1",
"contractAddress": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d"
},
"id": 1
}'

Result

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"contractAddress": "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D",
"tokenID": "1",
"tokenURI": "ipfs://QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/1",
"protocol": "ipfs",
"image": "ipfs://QmPbxeGcXhYQQNgsC6a36dDyYUcHgMLnGKnF8pVFmGsvqi",
"name": "",
"description": "",
"attributes": [
{
"trait_type": "Mouth",
"value": "Grin"
},
{
"trait_type": "Clothes",
"value": "Vietnam Jacket"
},
{
"trait_type": "Background",
"value": "Orange"
},
{
"trait_type": "Eyes",
"value": "Blue Beams"
},
{
"trait_type": "Fur",
"value": "Robot"
}
],
"ercStandard": "erc721"
}
}
Copy link
Outline
Parameters
Returns
Example
Request
Result