# Accessing NFT data

Non-fungible tokens, or NFTs, became one of the most popular use cases in the current blockchain world. CSPR.cloud keeps track of all NFT contracts compatible with the [CEP-47](https://github.com/casper-ecosystem/casper-nft-cep47) and [CEP-78](https://github.com/casper-ecosystem/cep-78-enhanced-nft) NFT standards on the Casper Network. CSPR.cloud provides a possibility to:

* [Get list of NFTs owned by an account](/rest-api/non-fungible-token/get-account-tokens.md)
* [Get list of NFTs minted within a contract](/rest-api/non-fungible-token/get-contract-package-tokens.md)
* [Get list of NFTs owners for a contract](/rest-api/non-fungible-token-ownership/get-contract-package-token-ownership.md)
* [Get account NFT activity](/rest-api/non-fungible-token-action/get-account-token-actions.md)
* [Get contract NFT activity](/rest-api/non-fungible-token-action/get-contract-package-token-actions.md)
* and more

Moreover, CSPR.cloud not only tracks on-chain NFT data but also fetches the off-chain metadata for you, which can be particularly slow when the metadata is stored on [IPFS](https://ipfs.tech). Below is an example that demonstrated fetching NFT tokens for the [CasperPunks](https://cspr.live/contract-package/ad0cd4ef3cfd9e7222706786e51773af771f063ecce4606282999a7a6d6ac495) contracts, which is a [CEP-78](https://github.com/casper-ecosystem/cep-78-enhanced-nft) smart NFT contract that stores the token metadata on IPFS:

```bash
curl -X 'GET' \
  'https://api.cspr.cloud/contract-packages/ad0cd4ef3cfd9e7222706786e51773af771f063ecce4606282999a7a6d6ac495/nft-tokens' \
  -H 'accept: application/json' \
  -H 'authorization: 55f79117-fc4d-4d60-9956-65423f39a06a'
```

```json
{
  "data": [
    {
      "contract_package_hash": "ad0cd4ef3cfd9e7222706786e51773af771f063ecce4606282999a7a6d6ac495",
      "is_burned": false,
      "offchain_metadata": {
        "attributes": [
          {
            "trait_type": "background",
            "value": "Red"
          },
          {
            "trait_type": "body",
            "value": "Grey"
          },
          {
            "trait_type": "eyes",
            "value": "Narrow"
          },
          {
            "trait_type": "hat",
            "value": "tophat"
          },
          {
            "trait_type": "mouth",
            "value": "StacheBrown"
          }
        ],
        "compiler": "HashLips Art Engine",
        "date": 1682468152509,
        "description": "The first generation of generative CasperPunks",
        "dna": "5dd6a50e43d44cda7af7d50c7d314af724c2851d",
        "edition": 1,
        "image": "https://api-box.casperpunks.io/metadata/images/1.png",
        "name": "Casper Punks Gen 1 #1"
      },
      "offchain_metadata_status": 2,
      "onchain_metadata": {
        "checksum": "",
        "name": "CasperPunks Gen1",
        "symbol": "CP-GEN1",
        "token_uri": "https://api-box.casperpunks.io/metadata/1"
      },
      "owner_hash": "909ce489ea31a76c8f3ca97364b209b942d023a1a0447dc63263444c1566338a",
      "owner_type": 0,
      "timestamp": "2023-05-23T06:38:53Z",
      "token_id": "1",
      "token_standard_id": 2,
      "tracking_id": 19236
    },
    {
      "contract_package_hash": "ad0cd4ef3cfd9e7222706786e51773af771f063ecce4606282999a7a6d6ac495",
      "is_burned": false,
      "offchain_metadata": {
        "attributes": [
          {
            "trait_type": "background",
            "value": "Purple"
          },
          {
            "trait_type": "body",
            "value": "Grey"
          },
          {
            "trait_type": "eyes",
            "value": "Bulging"
          },
          {
            "trait_type": "hat",
            "value": "PinkMohawk"
          },
          {
            "trait_type": "mouth",
            "value": "Patch"
          }
        ],
        "compiler": "HashLips Art Engine",
        "date": 1682468131158,
        "description": "The first generation of generative CasperPunks",
        "dna": "0de5f3c56c496630c56d0b78739c69a68cbe2824",
        "edition": 10,
        "image": "https://api-box.casperpunks.io/metadata/images/10.png",
        "name": "Casper Punks Gen 1 #10"
      },
      "offchain_metadata_status": 2,
      "onchain_metadata": {
        "checksum": "",
        "name": "CasperPunks Gen1",
        "symbol": "CP-GEN1",
        "token_uri": "https://api-box.casperpunks.io/metadata/10"
      },
      "owner_hash": "6d230cf0b8f2a1aae9b88108f483e66c83a301f59b2c8118e0c7765081e36fe9",
      "owner_type": 0,
      "timestamp": "2023-05-24T14:52:46Z",
      "token_id": "10",
      "token_standard_id": 2,
      "tracking_id": 19247
    },
    ...
    {
      "contract_package_hash": "ad0cd4ef3cfd9e7222706786e51773af771f063ecce4606282999a7a6d6ac495",
      "is_burned": false,
      "offchain_metadata": {
        "attributes": [
          {
            "trait_type": "background",
            "value": "Mint"
          },
          {
            "trait_type": "body",
            "value": "Grey"
          },
          {
            "trait_type": "eyes",
            "value": "Frown"
          },
          {
            "trait_type": "hat",
            "value": "beanie"
          },
          {
            "trait_type": "mouth",
            "value": "Laugh"
          }
        ],
        "compiler": "HashLips Art Engine",
        "date": 1682468103314,
        "description": "The first generation of generative CasperPunks",
        "dna": "1df66a2d43f0de7784136685eb8f85531e53d7d1",
        "edition": 1006,
        "image": "https://api-box.casperpunks.io/metadata/images/1006.png",
        "name": "Casper Punks Gen 1 #1006"
      },
      "offchain_metadata_status": 2,
      "onchain_metadata": {
        "checksum": "",
        "name": "CasperPunks Gen1",
        "symbol": "CP-GEN1",
        "token_uri": "https://api-box.casperpunks.io/metadata/1006"
      },
      "owner_hash": "96609d29c02388c81b6b1bd08feef31d3f3f1331ae39c0ad4f921e43c14d5393",
      "owner_type": 1,
      "timestamp": "2023-05-25T02:24:28Z",
      "token_id": "1006",
      "token_standard_id": 2,
      "tracking_id": 20245
    }
  ],
  "item_count": 2166,
  "page_count": 217
}
```

Note the `offchain_metadata` property, which contains the off-chain token metadata.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cspr.cloud/documentation/highlights/accessing-nft-data.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
