Query NFT metadata (Example)

Query Galaxy’s NFT metadata with our API

Last updated on December 22, 2021

This page describes how you can use the GraphQL explorer to query metadata of a Galaxy’s NFT.

The query includes NFT.

Please refer to the Query NFT holders (Example) for the complete request procedure.

 

Arguments

Name
Type
Description
id
ID of the NFT.
nftCoreAddress
address of the NFT contract.

Example

Request

query nftMetadata{
  nftInfo(id: 66, nftCoreAddress: "0x8AbD4CcD8DE6D111c437a87Ca0fdD5e9A0A60c98") {
    id
    nftCore {
      name
    }
    campaign {
      name
      id
      info
    }
    chain
    name
    image
    ipfsImage
    category
    description
    owner {
      address
    }
    status
    createdAt
    createBlock
    animationURL
    traits {
      displayType
      name
      value
    }
  }
}

Response

{
  "data": {
    "nftInfo": {
      "id": "66",
      "nftCore": {
        "name": "fantom testnet nft"
      },
      "campaign": {
        "name": "C.R.E.A.M. Finance’s Loot-Box Game",
        "id": "GCfS1UUz9q",
        "info": "In partnership with Galaxy, C.R.E.A.M. Finance has built a 2-week NFT campaign to reward existing and future users of C.R.E.A.M. Finance.\n\nWe have designed an NFT game where users complete quests on C.R.E.A.M. Finance to gain access to claim NFT loot-boxes, which contain 1 of 5 NFTs -  4 commons, 1 rare. \n\nOnce a user collects all 4 unique common NFTs, they are able to burn the full-set for 1 rare NFT. This rare NFT can then be redeemed for MetaFactory x C.R.E.A.M. swag.\n\nWe've worked with artist [@SaberTheTiger](https://twitter.com/SaberTheTiger) to create a series of gamified NFTs recognizing C.R.E.A.M. users and incentivize them to continue using the lending platform. \n\nFor more information please refer to the C.R.E.A.M. Finance blog post.\n"
      },
      "chain": "FANTOM_TESTNET",
      "name": "C.R.E.A.M Baby Dragon",
      "image": "https://d257b89266utxb.cloudfront.net/galaxy/images/galaxyspace/1634184110753663602.png",
      "ipfsImage": "https://dashboard.mypinata.cloud/ipfs/QmX6bm9bGcyJaat46ysDHpWUQry15zmK1887WDhZDtp4Nz",
      "category": "Baby Drago 2",
      "description": "",
      "owner": {
        "address": "0x5914c34b7Bd89971eEFBdAd28B13B615770Cc71c"
      },
      "status": "Alive",
      "createdAt": "1634208467",
      "createBlock": 0,
      "animationURL": "",
      "traits": [
        {
          "displayType": "",
          "name": "Skin",
          "value": "Blue"
        }
      ]
    }
  }
}

For more information on each attribute, see GraphQL API

 
Did this answer your question?
😞
😐
🤩