How to Get the Attributes, Mint Date, and type of an NFT

Follow this tutorial to learn how to get the attributes, mint date, and type of an NFT.

This tutorial explains the steps involved in getting Ethereum Mainnet NFT by contract address and token ID and finding its attributes, mint date, and type.

Here is an alternative way to access this information: How to Get an NFT by Unique ID

Step 1. Use the asset endpoint with the following details:

  • protocol: ethereum

  • network: mainnet

    https://svc.blockdaemon.com/nft/v1/ethereum/mainnet/asset
    

Step 2. Add the following parameters:

  • contract address

    • parameter: contract_address
    • value: e.g. 0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D
  • token ID

    • parameter: token_id
    • value: e.g. 9999
    https://svc.blockdaemon.com/nft/v1/ethereum/mainnet/asset?contract_address=0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D&token_id=9999
    

Step 3. Execute the query.

For example, in cURL, you should run the following code:

curl -X GET 'https://svc.blockdaemon.com/nft/v1/ethereum/mainnet/asset?contract_address=0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D&token_id=9999' -H 'Authorization: Bearer YOUR_API_KEY'

πŸ“˜

Note!

To authorize your request, you need to get an API key and use it as a bearer token or a query parameter. Learn more: Authentication Guide

Step 4. Your results will look something like this:

{
    "asset": {
        "token_id": "9999",
        "token_type": "ERC721",
        "media": {
            "image_url": "token/0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D/5e1f4454-34ff-5118-9987-96b481625128.png",
            "source": "ipfs://QmejYePrutbfWEV8wA3ogTHi2cf2j6hoaPhZSc6vNE43nH"
        },
        "name": "#9999",
        "mint_date": "1619858117",
        "token_uri": "ipfs://QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/9999",
        "description": "",
        "contract_address": "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D",
        "wallets": [],
        "attributes": [
            {
                "trait_type": "Hat",
                "value": "Army Hat"
            },
            {
                "trait_type": "Background",
                "value": "Purple"
            },
            {
                "trait_type": "Mouth",
                "value": "Bored Unshaven"
            },
            {
                "trait_type": "Earring",
                "value": "Gold Hoop"
            },
            {
                "trait_type": "Fur",
                "value": "Gray"
            },
            {
                "trait_type": "Eyes",
                "value": "Scumbag"
            }
        ],
        "burned": false,
        "rarity": [
            {
                "model": "open_rarity",
                "score": 0.9954297307820068,
                "rank": "5327"
            }
        ]
    }
}

The token type is returned by the token_type field, e.g.:

  • "token_type": "ERC721"

The mint date is returned in Unix time by the mint_date field:

  • "mint_date": "1619858117"

Attributes are located in the attributes section:

"attributes": [
   {
       "trait_type": "Hat",
       "value": "Army Hat"
   },
   {
       "trait_type": "Background",
       "value": "Purple"
   },
   {...more attributes...}
]

πŸ‘‹ Need Help?

Contact us through email or our support page for any issues, bugs, or assistance you may need.