NFT API

What is this request?

You can see all your ERC-721 tokens in these services ethereum and polygon network by wallet. Avalanche and binance smart chain supports is soon.

What can I do with this service?

With this service, you can obtain all NFTs of the given wallet address via multi-chain with a single request. With the received NFT information, you can request NFTs in your project or wallet application.

Tutorial

var axios = require('axios');

axios.get('https://api.getdefy.co/v2/wallet/nfts', {
    params: {
      address: '0x787970ad122d5947579e613c2464d9540081b46f',
      apikey: 'API_KEY',
    },
  })
  .then(function (response) {
    console.log(JSON.stringify(response.data));
  })
  .catch(function (error) {
    console.log(error);
  });

Options

  • address (required): A user address (i.e. 0x1a2b3x...). If specified, the user attached to the query is ignored and the address will be used instead.

  • apikey (required): API key for requests.

Request Example

GET https://api.getdefy.co/v2/wallet/nfts

Query Parameters

{
    "data": [
        {
            "name": "Global Movie Day",
            "image": "ipfs://QmWUwLVJ5G5aftJ3BrPLFFJqzot3cAG5zT6w2xi2zPJEPL",
            "media": [
                {
                    "raw": "ipfs://QmcHDfxPmCuGLSJfjF74GYt3VATtbqAR7ijcCJnZSBW653",
                    "gateway": "https://ipfs.io/ipfs/QmcHDfxPmCuGLSJfjF74GYt3VATtbqAR7ijcCJnZSBW653"
                }
            ],
            "chainId": 137,
            "network": "matic",
            "metadata": {
                "name": "Global Movie Day",
                "image": "ipfs://QmcHDfxPmCuGLSJfjF74GYt3VATtbqAR7ijcCJnZSBW653",
                "properties": {
                    "date": "11.02.2023 06:00",
                    "event": "Global Movie Day",
                    "place": "IMAX",
                    "eventId": 102,
                    "placeUri": "",
                    "ticketNo": 15,
                    "receiverRoyaltyPercentage": 10
                },
                "description": "Global Movie Day"
            },
            "token_id": "443",
            "token_type": "ERC721",
            "description": "Global Movie Day",
            "contract_name": "IceAssetBetaMXR",
            "contract_symbol": "ICASB",
            "contract_address": "0x6b538b553cfe0db05e44d45bd4b905fb384e7fbb"
        },
        {
            "name": "Global Movie Day",
            "image": "ipfs://QmWUwLVJ5G5aftJ3BrPLFFJqzot3cAG5zT6w2xi2zPJEPL",
            "media": [
                {
                    "raw": "ipfs://QmcHDfxPmCuGLSJfjF74GYt3VATtbqAR7ijcCJnZSBW653",
                    "bytes": 106464,
                    "format": "png",
                    "gateway": "https://nft-cdn.alchemy.com/matic-mainnet/64eea6bd2a6b4f59a66302a7a1bef6ab",
                    "thumbnail": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnail/matic-mainnet/64eea6bd2a6b4f59a66302a7a1bef6ab"
                }
            ],
            "chainId": 137,
            "network": "matic",
            "metadata": {
                "name": "Global Movie Day",
                "image": "ipfs://QmcHDfxPmCuGLSJfjF74GYt3VATtbqAR7ijcCJnZSBW653",
                "properties": {
                    "date": "11.02.2023 06:00",
                    "event": "Global Movie Day",
                    "place": "IMAX",
                    "eventId": 102,
                    "placeUri": "",
                    "ticketNo": 15,
                    "receiverRoyaltyPercentage": 10
                },
                "description": "Global Movie Day"
            },
            "token_id": "444",
            "token_type": "ERC721",
            "description": "Global Movie Day",
            "contract_name": "IceAssetBetaMXR",
            "contract_symbol": "ICASB",
            "contract_address": "0x6b538b553cfe0db05e44d45bd4b905fb384e7fbb"
        },
        {
            "name": "Waste",
            "image": "ipfs://QmcBqwhcZvbP38gMK2AGq4oNAt77R3PgTnu5Kg9TRZaRW8",
            "media": [
                {
                    "raw": "ipfs://bafybeifddn2vmxsabdo5iihpf5zn3ftraftptxmj7qpw52c3xmdi7axjkq",
                    "bytes": 38517597,
                    "format": "gif",
                    "gateway": "https://nft-cdn.alchemy.com/matic-mainnet/a52863cebd45f7b3471ebe9045f15d2c",
                    "thumbnail": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnail/matic-mainnet/a52863cebd45f7b3471ebe9045f15d2c"
                }
            ],
            "chainId": 137,
            "network": "matic",
            "metadata": {
                "name": "Waste",
                "image": "ipfs://bafybeifddn2vmxsabdo5iihpf5zn3ftraftptxmj7qpw52c3xmdi7axjkq",
                "attributes": [
                    {
                        "value": "Global Waste Systemsยฎ",
                        "trait_type": "Corporation"
                    },
                    {
                        "value": "Filthy",
                        "trait_type": "Status"
                    },
                    {
                        "value": "Black",
                        "trait_type": "Color"
                    },
                    {
                        "value": "1",
                        "trait_type": "Unit"
                    },
                    {
                        "value": "Bag",
                        "trait_type": "Type"
                    },
                    {
                        "value": "Kevlar",
                        "trait_type": "Material"
                    }
                ],
                "description": "Planet IX is trash. Literally. Toxic waste, remnants of ancient civilisations and carbon ash are just some of the vile contaminants that are collected into GWS trash bags. Waste is best collected through Harvester Drones. But keep an eye out for future waste collection contraptions supplied by Y_.",
                "external_url": "https://planetix.com/mint",
                "animation_url": "ipfs://QmWt9GEZjF6FkkT6v7ZJssQHJYpycrBT9rqRnKsNQzS4Yx"
            },
            "token_id": "7",
            "token_type": "ERC1155",
            "description": "Planet IX is trash. Literally. Toxic waste, remnants of ancient civilisations and carbon ash are just some of the vile contaminants that are collected into GWS trash bags. Waste is best collected through Harvester Drones. But keep an eye out for future waste collection contraptions supplied by Y_.",
            "contract_name": "Planet IX - Assets",
            "contract_symbol": "PIX-A",
            "contract_address": "0xba6666b118f8303f990f3519df07e160227cce87"
        }
    ],
    "code": 0,
    "message": "OK"
}

Last updated