getNFTs - NFT API

Gets all NFTs currently owned by a given address.

This endpoint is supported on the following chains and networks:

  • Conflux: Core

Parameters

  • owner: [string] address for NFT owner
  • page [number] page number
  • limit [number] max number of results
  • contractAddresses[]: [array of strings] (optional) Array of contract addresses to filter the responses with. Max limit 20 contracts.

Returns (by default)

  • ownedNfts: List of objects that represent NFTs owned by the address.
    • Object schema:
      • contract:
        • address: address of NFT contract
      • id:
        • tokenId: Id for NFT (hex)
        • tokenMetadata
          • tokenType: "CRC721"
      • balance: token balance
      • title: name of the NFT asset
      • description: brief human-readable description
      • tokenUri:
        • raw: Uri representing the location of the NFT's original metadata blob. This is a backup for you to parse when the metadata field is not automatically populated.
        • gateway: Public gateway uri for the raw uri above.
      • metadata: Relevant metadata for NFT contract. This is useful for viewing image url, traits, etc. without having to follow the metadata url in tokenUri to parse manually.
        NOTE:Not all metadata fields may be filled in if the provided NFT contract does not contain relevant information.
        • nameName of the NFT asset.
        • description: Human-readable description of the NFT asset. (Markdown is supported/rendered on OpenSea and other NFT platforms)
        • image: URL to the NFT asset image.
  • totalCount: Total number of NFTs owned by the given address.

Examples

Request

curl 'https://cfx-core.unifra.io/v1/cf455a9802364d88b8f87b5273d9ddbb/nft-api/getNFTs?owner=0x19241022053a3e2236c48E86B62957C8654B65a1'

Response

{
    "ownedNfts": [
        {
            "contract": {
                "address": "cfx:acb7hr0ecyatev5gzjnys9mt31xxa22hzuzb3tprps"
            },
            "id": {
                "tokenId": "65162",
                "tokenMetadata": {
                    "tokenType": "CRC-721"
                }
            },
            "balance": "4176",
            "title": "传说款:篮球飞人",
            "tokenUri": {
                "raw": "https://nft.taopainft.com/v1/token/metadata/870Cda3Dfe708aC0c993fb1fF423A243ca0ca94E/fe8a.json",
                "gateway": "https://nft.taopainft.com/v1/token/metadata/870Cda3Dfe708aC0c993fb1fF423A243ca0ca94E/fe8a.json"
            },
            "metadata": {
                "name": "传说款:篮球飞人",
                "description": "",
                "image": "https://taopainft.oss-cn-hangzhou.aliyuncs.com/%E4%BD%9B%E7%B3%BB%E6%83%A0%E4%BA%8C_0x870cda3dfe708ac0c993fb1ff423a243ca0ca94e/7.4%E5%8B%8B%E7%AB%A0%E7%A9%BA%E6%8A%95/%E4%BD%9B%E7%B3%BB%E4%BC%A0%E8%AF%B4%E6%AC%BE/%E4%BC%A0%E8%AF%B4%E6%AC%BE%EF%BC%9A%E7%AF%AE%E7%90%83%E9%A3%9E%E4%BA%BA.jpg"
            },
            "timeLastUpdated": "2022-07-14T16:28:31.821964Z"
        }
        ...
    ],
    "totalCount": 229281
}
Language
Click Try It! to start a request and see the response here!