Alchemy SDK V2 vs. V3 Method Differences

Detailed differences between Alchemy SDK V2 and V3 methods

Detailed Method Mappings

This page aims to provide a comprehensive and detailed mapping of the changes that have occurred in each endpoint between Alchemy SDK V2 and V3. For each method, we will outline any changes in the method name, provide example requests in both V2 and V3, and present a mapping table highlighting the differences in the response structure (where applicable). Additionally, we will include examples of the V2 and V3 responses to help illustrate the changes.


Returns the floor prices of an NFT contract by marketplace.

Overview of Changes

  • An error field has been added to both openSea and looksRare objects in the response structure in V3.

Example Requests

V2 Example Request

// Imports the Alchemy SDK
const { Alchemy, Network } = require("alchemy-sdk");

// Configures the Alchemy SDK
const config = {
    apiKey: "alchemy-replit", // Replace with your API key
    network: Network.ETH_MAINNET, // Replace with your network
};

// Creates an Alchemy object instance with the config to use for making requests
const alchemy = new Alchemy(config);

const main = async () => {
    // define the contract address
    const address = "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D";

    //Call the method to check the contract floor price
    const response = await alchemy.nft.getFloorPrice(address)

    //Logging the response to the console
    console.log(response)
}

main();

V3 Example Request

Same as V2

V2 <> V3 Mapping

V2 ParameterV3 Parameter
openSea.floorPriceopenSea.floorPrice
openSea.priceCurrencyopenSea.priceCurrency
openSea.collectionUrlopenSea.collectionUrl
openSea.retrievedAtopenSea.retrievedAt
openSea.error (New in V3)
looksRare.floorPricelooksRare.floorPrice
looksRare.priceCurrencylooksRare.priceCurrency
looksRare.collectionUrllooksRare.collectionUrl
looksRare.retrievedAtlooksRare.retrievedAt
looksRare.error (New in V3)

Example Responses

V2 Example Response

{
  openSea: {
    floorPrice: 44.5,
    priceCurrency: 'ETH',
    collectionUrl: 'https://opensea.io/collection/boredapeyachtclub',
    retrievedAt: '2023-06-19T00:07:11.601Z'
  },
  looksRare: {
    floorPrice: 43.65,
    priceCurrency: 'ETH',
    collectionUrl: 'https://looksrare.org/collections/0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d',
    retrievedAt: '2023-06-19T00:07:11.639Z'
  }
}

V3 Example Response

{
    "openSea": {
        "floorPrice": 24.979951,
        "priceCurrency": "ETH",
        "collectionUrl": "https://opensea.io/collection/boredapeyachtclub",
        "retrievedAt": "2023-09-21T15:22:06.168Z",
        "error": undefined
    },
    "looksRare": {
        "floorPrice": 24.98,
        "priceCurrency": "ETH",
        "collectionUrl": "https://looksrare.org/collections/0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d",
        "retrievedAt": "2023-09-21T15:22:06.097Z",
        "error": undefined
    }
}

Get all NFTs for an owner.

This method returns the full NFTs in the contract. To get all NFTs without their associated metadata, use the options parameter by setting omitMetadata to true in the body of the request.

Overview of Changes

  • The openSea object in the parent contract object has been changed to openSeaMetadata in the V3 response.
  • The collectionSlug and bannerImageUrl parameters have been added to the contract.openSeaMetadata object in V3.
  • The title parameter in V2 has been changed to an optional name parameter in V3.
  • The media parameter in V2 has been replaced with an image object in V3.
  • The blockHash parameter has been removed in V3.
  • The metadataError in V2 has been replaced with the raw.error parameter in the V3 response.
  • The rawMetadataobject parameter has been changed to a raw object in V3, which contains the tokenUri and metadata parameters
  • The tokenUri object in V2 has been changed to a tokenUri string parameter in V3.
  • The isSpam and classifications parameters for spamInfo on V2 has been added to the contract object in V3.
  • The mint object parameter has been added to the V3 response containing optional mintAddress?, blockNumber?, timestamp?, and transactionHash? parameters.
  • The collection object has been added to the V3 response containing the name, slug?, externalUrl?, and bannerImageUrl? parameters.
  • The validAt object has been added to the V3 response. It contains the blockNumber, blockHash, and blockTimestamp parameters.
  • The acquiredAt object has been added to the V3 response.

Example Requests

V2 Example Request

// Imports the Alchemy SDK
const { Alchemy, Network } = require("alchemy-sdk");

// Configures the Alchemy SDK
const config = {
    apiKey: "alchemy-replit", // Replace with your API key
    network: Network.ETH_MAINNET, // Replace with your network
};

// Creates an Alchemy object instance with the config to use for making requests
const alchemy = new Alchemy(config);

const main = async () => {
    let owner  = "vitalik.eth";
    
    //Call the method to get the nfts owned by this address
    let response = await alchemy.nft.getNftsForOwner(owner)

    //Logging the response to the console
    console.log(response)
};

main();

V3 Example Request

Same as V2.

V2 <> V3 Mapping

V2 ParameterV3 Parameter
contract.addresscontract.address
contract.namecontract.name
contract.symbolcontract.symbol
contract.tokenTypecontract.tokenType
contract.contractDeployercontract.contractDeployer
contract.deployedBlockNumbercontract.deployedBlockNumber
spamInfo.isSpamcontract.isSpam
spamInfo.classificationscontract.spamClassifications
contract.openSea.collectionNamecontract.openSeaMetadata.collectionName
-contract.openSeaMetadata.collectionSlug (New in V3)
contract.openSea.safelistRequestStatuscontract.openSeaMetadata.safelistRequestStatus
contract.openSea.imageUrlcontract.openSeaMetadata.imageUrl
contract.openSea.descriptioncontract.openSeaMetadata.description
contract.openSea.externalUrlcontract.openSeaMetadata.externalUrl
-contract.openSeaMetadata.bannerImageUrl (New in V3)
contract.openSea.lastIngestedAtcontract.openSeaMetadata.lastIngestedAt
tokenIdtokenId
tokenTypetokenType
tokenUritokenUri
titlename
descriptiondescription
metadataErrorraw.error
rawMetadataraw
rawMetadata.metadataraw.metadata
rawMetadata.attributesraw.metadata.attributes
-raw.tokenUri
mediaimage
spamInfo(Removed in V3 and moved to contract)
-collection (New in V3)
-mint(New in V3)
balancebalance
timeLastUpdatedtimeLastUpdated
-validAt.blockNumber(New in V3)
-validAt.blockHash(New in V3)
-validAt.blockTimestamp(New in V3)
pageKeypageKey
totalCounttotalCount
blockHash(Removed in V3)
-acquiredAt(New in V3)

Example Responses

V2 Example Response

{
    "ownedNfts": [
        {
            "contract": {
                "address": "0x000386e3f7559d9b6a2f5c46b4ad1a9587d59dc3",
                "name": "Bored Ape Nike Club",
                "symbol": "BANC",
                "tokenType": "ERC721",
                "openSea": {
                    "collectionName": "BoredApeNikeClub",
                    "safelistRequestStatus": "not_requested",
                    "imageUrl": "https://i.seadn.io/gae/yJ9DgXqjRwgdCkrQmHj7krCbixM8fPVAyYJWJ5NHXap1L0c3QL5MPvrNT0QDINIStGOK857lOvab8MpNQS9X4pkHPktmhVmN82qoVw?w=500&auto=format",
                    "description": "COUNTDOWN OVER. MINTING LIVE.\n\n[Mint on the website.](https://nikemetaverse.xyz)\n",
                    "externalUrl": "https://nikemetaverse.xyz",
                    "lastIngestedAt": "2023-07-15T19:05:35.000Z"
                },
                "contractDeployer": "0x51d7d428041e23ef51422e110dfeff906e821cfe",
                "deployedBlockNumber": 14276343
            },
            "tokenId": "1",
            "tokenType": "ERC721",
            "title": "",
            "description": "",
            "timeLastUpdated": "2023-07-19T10:54:51.000Z",
            "metadataError": "Contract returned a broken token uri",
            "rawMetadata": {
                "metadata": [],
                "attributes": []
            },
            "tokenUri": {
                "gateway": "http://api.nikeapenft.xyz/ipfs/1",
                "raw": "http://api.nikeapenft.xyz/ipfs/1"
            },
            "media": [],
            "spamInfo": {
                "isSpam": true,
                "classifications": [
                    "OwnedByMostHoneyPots",
                    "Erc721TooManyOwners",
                    "Erc721TooManyTokens",
                    "NoSalesActivity",
                    "HighAirdropPercent",
                    "HighHoneyPotPercent",
                    "HoneyPotsOwnMultipleTokens"
                ]
            },
            "balance": 26
        },
        {
            "contract": {
                "address": "0x000386e3f7559d9b6a2f5c46b4ad1a9587d59dc3",
                "name": "Bored Ape Nike Club",
                "symbol": "BANC",
                "tokenType": "ERC721",
                "openSea": {
                    "collectionName": "BoredApeNikeClub",
                    "safelistRequestStatus": "not_requested",
                    "imageUrl": "https://i.seadn.io/gae/yJ9DgXqjRwgdCkrQmHj7krCbixM8fPVAyYJWJ5NHXap1L0c3QL5MPvrNT0QDINIStGOK857lOvab8MpNQS9X4pkHPktmhVmN82qoVw?w=500&auto=format",
                    "description": "COUNTDOWN OVER. MINTING LIVE.\n\n[Mint on the website.](https://nikemetaverse.xyz)\n",
                    "externalUrl": "https://nikemetaverse.xyz",
                    "lastIngestedAt": "2023-07-15T19:05:35.000Z"
                },
                "contractDeployer": "0x51d7d428041e23ef51422e110dfeff906e821cfe",
                "deployedBlockNumber": 14276343
            },
            "tokenId": "2",
            "tokenType": "ERC721",
            "title": "",
            "description": "",
            "timeLastUpdated": "2023-07-19T10:54:50.978Z",
            "metadataError": "Contract returned a broken token uri",
            "rawMetadata": {
                "metadata": [],
                "attributes": []
            },
            "tokenUri": {
                "gateway": "http://api.nikeapenft.xyz/ipfs/2",
                "raw": "http://api.nikeapenft.xyz/ipfs/2"
            },
            "media": [],
            "spamInfo": {
                "isSpam": true,
                "classifications": [
                    "OwnedByMostHoneyPots",
                    "Erc721TooManyOwners",
                    "Erc721TooManyTokens",
                    "NoSalesActivity",
                    "HighAirdropPercent",
                    "HighHoneyPotPercent",
                    "HoneyPotsOwnMultipleTokens"
                ]
            },
            "balance": 31
        },
        {
            "contract": {
                "address": "0x00703f9b11f2ac02d391a11e7b97c6ee80cd8563",
                "name": "Elon Musk",
                "symbol": "MUSK",
                "tokenType": "ERC721",
                "openSea": {
                    "collectionName": "ELON MUSK LICENSE",
                    "safelistRequestStatus": "not_requested",
                    "imageUrl": "https://i.seadn.io/gae/7O8H5tVTUPfi03LBY3xI29wkuzp8sSsRvr_BjOxXUfsU7mrkV7WxhOMedXKBp-dqDtCLjSfLwzWEMg6_yrxw8YPXC7OY9TqelDm9?w=500&auto=format",
                    "description": "COUNTDOWN OVER. MINTING LIVE.\n\n[Mint on the website.](https://elonmusknftworld.shop)",
                    "externalUrl": "https://elonmusknftworld.shop",
                    "lastIngestedAt": "2023-07-15T19:21:16.000Z"
                },
                "contractDeployer": "0x69a3c97428bad2c431a70b886d4d03b042df5670",
                "deployedBlockNumber": 14268680
            },
            "tokenId": "5",
            "tokenType": "ERC721",
            "title": "",
            "description": "",
            "timeLastUpdated": "2023-07-19T10:54:51.011Z",
            "metadataError": "Contract returned a broken token uri",
            "rawMetadata": {
                "metadata": [],
                "attributes": []
            },
            "tokenUri": {
                "gateway": "http://api.elonmusknfts.xyz/ipfs/5",
                "raw": "http://api.elonmusknfts.xyz/ipfs/5"
            },
            "media": [],
            "spamInfo": {
                "isSpam": true,
                "classifications": [
                    "OwnedByMostHoneyPots",
                    "Erc721TooManyOwners",
                    "Erc721TooManyTokens",
                    "NoSalesActivity",
                    "HighAirdropPercent",
                    "HighHoneyPotPercent",
                    "HoneyPotsOwnMultipleTokens"
                ]
            },
            "balance": 11
        }
    ],
    "pageKey": "MHgwMDcwM2Y5YjExZjJhYzAyZDM5MWExMWU3Yjk3YzZlZTgwY2Q4NTYzOjB4MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwNTpmYWxzZQ==",
    "totalCount": 26525,
    "blockHash": "0x7f9574679a4ee645fc34683464ee4c038cb968112c912cb7ddce46d5abdeac94"
}

V3 Example Response

{
    "ownedNfts": [
        {
            "contract": {
                "address": "0x000386E3F7559d9B6a2F5c46B4aD1A9587D59Dc3",
                "name": "Bored Ape Nike Club",
                "symbol": "BANC",
                "tokenType": "ERC721",
                "contractDeployer": "0x51D7D428041E23ef51422e110dfEfF906e821CFe",
                "deployedBlockNumber": 14276343,
                "openSeaMetadata": {
                    "collectionName": "BoredApeNikeClub",
                    "collectionSlug": "bored-ape-nike-club-v2",
                    "safelistRequestStatus": "not_requested",
                    "imageUrl": "https://i.seadn.io/gae/yJ9DgXqjRwgdCkrQmHj7krCbixM8fPVAyYJWJ5NHXap1L0c3QL5MPvrNT0QDINIStGOK857lOvab8MpNQS9X4pkHPktmhVmN82qoVw?w=500&auto=format",
                    "description": "COUNTDOWN OVER. MINTING LIVE.\n\n[Mint on the website.](https://nikemetaverse.xyz)\n",
                    "externalUrl": "https://nikemetaverse.xyz",
                    "bannerImageUrl": "https://i.seadn.io/gae/i84LsC2dtbF5I3YiuaXzzfvSijlBI-ZJ8UEta04Ukl4V57Uoj0ZGw8tNyuPdwrF7N5pclyzdqSJjxHZ65z4G5jQrVRK_DHUMVrzTYQ?w=500&auto=format",
                    "lastIngestedAt": "2023-09-11T13:59:53.000Z"
                },
                "isSpam": true,
                "spamClassifications": [
                    "OwnedByMostHoneyPots",
                    "Erc721TooManyOwners",
                    "Erc721TooManyTokens",
                    "NoSalesActivity",
                    "HighAirdropPercent",
                    "HighHoneyPotPercent",
                    "HoneyPotsOwnMultipleTokens"
                ]
            },
            "tokenId": "1",
            "tokenType": "ERC721",
            "tokenUri": "http://api.nikeapenft.xyz/ipfs/1",
            "image": {},
            "raw": {
                "tokenUri": "http://api.nikeapenft.xyz/ipfs/1",
                "metadata": {}
            },
            "collection": {
                "name": "BoredApeNikeClub",
                "slug": "bored-ape-nike-club-v2",
                "externalUrl": "https://nikemetaverse.xyz",
                "bannerImageUrl": "https://i.seadn.io/gae/i84LsC2dtbF5I3YiuaXzzfvSijlBI-ZJ8UEta04Ukl4V57Uoj0ZGw8tNyuPdwrF7N5pclyzdqSJjxHZ65z4G5jQrVRK_DHUMVrzTYQ?w=500&auto=format"
            },
            "mint": {},
            "timeLastUpdated": "2023-09-20T12:18:35.890Z",
            "balance": "26",
            "acquiredAt": {}
        },
        {
            "contract": {
                "address": "0x000386E3F7559d9B6a2F5c46B4aD1A9587D59Dc3",
                "name": "Bored Ape Nike Club",
                "symbol": "BANC",
                "tokenType": "ERC721",
                "contractDeployer": "0x51D7D428041E23ef51422e110dfEfF906e821CFe",
                "deployedBlockNumber": 14276343,
                "openSeaMetadata": {
                    "collectionName": "BoredApeNikeClub",
                    "collectionSlug": "bored-ape-nike-club-v2",
                    "safelistRequestStatus": "not_requested",
                    "imageUrl": "https://i.seadn.io/gae/yJ9DgXqjRwgdCkrQmHj7krCbixM8fPVAyYJWJ5NHXap1L0c3QL5MPvrNT0QDINIStGOK857lOvab8MpNQS9X4pkHPktmhVmN82qoVw?w=500&auto=format",
                    "description": "COUNTDOWN OVER. MINTING LIVE.\n\n[Mint on the website.](https://nikemetaverse.xyz)\n",
                    "externalUrl": "https://nikemetaverse.xyz",
                    "bannerImageUrl": "https://i.seadn.io/gae/i84LsC2dtbF5I3YiuaXzzfvSijlBI-ZJ8UEta04Ukl4V57Uoj0ZGw8tNyuPdwrF7N5pclyzdqSJjxHZ65z4G5jQrVRK_DHUMVrzTYQ?w=500&auto=format",
                    "lastIngestedAt": "2023-09-11T13:59:53.000Z"
                },
                "isSpam": true,
                "spamClassifications": [
                    "OwnedByMostHoneyPots",
                    "Erc721TooManyOwners",
                    "Erc721TooManyTokens",
                    "NoSalesActivity",
                    "HighAirdropPercent",
                    "HighHoneyPotPercent",
                    "HoneyPotsOwnMultipleTokens"
                ]
            },
            "tokenId": "2",
            "tokenType": "ERC721",
            "tokenUri": "http://api.nikeapenft.xyz/ipfs/2",
            "image": {},
            "raw": {
                "tokenUri": "http://api.nikeapenft.xyz/ipfs/2",
                "metadata": {},
                "error": "Contract returned a broken token uri"
            },
            "collection": {
                "name": "BoredApeNikeClub",
                "slug": "bored-ape-nike-club-v2",
                "externalUrl": "https://nikemetaverse.xyz",
                "bannerImageUrl": "https://i.seadn.io/gae/i84LsC2dtbF5I3YiuaXzzfvSijlBI-ZJ8UEta04Ukl4V57Uoj0ZGw8tNyuPdwrF7N5pclyzdqSJjxHZ65z4G5jQrVRK_DHUMVrzTYQ?w=500&auto=format"
            },
            "mint": {},
            "timeLastUpdated": "2023-09-20T13:13:54.798Z",
            "balance": "31",
            "acquiredAt": {}
        },
        {
            "contract": {
                "address": "0x000386E3F7559d9B6a2F5c46B4aD1A9587D59Dc3",
                "name": "Bored Ape Nike Club",
                "symbol": "BANC",
                "tokenType": "ERC721",
                "contractDeployer": "0x51D7D428041E23ef51422e110dfEfF906e821CFe",
                "deployedBlockNumber": 14276343,
                "openSeaMetadata": {
                    "collectionName": "BoredApeNikeClub",
                    "collectionSlug": "bored-ape-nike-club-v2",
                    "safelistRequestStatus": "not_requested",
                    "imageUrl": "https://i.seadn.io/gae/yJ9DgXqjRwgdCkrQmHj7krCbixM8fPVAyYJWJ5NHXap1L0c3QL5MPvrNT0QDINIStGOK857lOvab8MpNQS9X4pkHPktmhVmN82qoVw?w=500&auto=format",
                    "description": "COUNTDOWN OVER. MINTING LIVE.\n\n[Mint on the website.](https://nikemetaverse.xyz)\n",
                    "externalUrl": "https://nikemetaverse.xyz",
                    "bannerImageUrl": "https://i.seadn.io/gae/i84LsC2dtbF5I3YiuaXzzfvSijlBI-ZJ8UEta04Ukl4V57Uoj0ZGw8tNyuPdwrF7N5pclyzdqSJjxHZ65z4G5jQrVRK_DHUMVrzTYQ?w=500&auto=format",
                    "lastIngestedAt": "2023-09-11T13:59:53.000Z"
                },
                "isSpam": true,
                "spamClassifications": [
                    "OwnedByMostHoneyPots",
                    "Erc721TooManyOwners",
                    "Erc721TooManyTokens",
                    "NoSalesActivity",
                    "HighAirdropPercent",
                    "HighHoneyPotPercent",
                    "HoneyPotsOwnMultipleTokens"
                ]
            },
            "tokenId": "2",
            "tokenType": "ERC721",
            "tokenUri": "http://api.nikeapenft.xyz/ipfs/2",
            "image": {},
            "raw": {
                "tokenUri": "http://api.nikeapenft.xyz/ipfs/2",
                "metadata": {}
            },
            "collection": {
                "name": "BoredApeNikeClub",
                "slug": "bored-ape-nike-club-v2",
                "externalUrl": "https://nikemetaverse.xyz",
                "bannerImageUrl": "https://i.seadn.io/gae/i84LsC2dtbF5I3YiuaXzzfvSijlBI-ZJ8UEta04Ukl4V57Uoj0ZGw8tNyuPdwrF7N5pclyzdqSJjxHZ65z4G5jQrVRK_DHUMVrzTYQ?w=500&auto=format"
            },
            "mint": {},
            "timeLastUpdated": "2023-09-18T11:02:14.698Z",
            "balance": "31",
            "acquiredAt": {}
        },
      ],
    "pageKey": "MHgwMDcwM2Y5YjExZjJhYzAyZDM5MWExMWU3Yjk3YzZlZTgwY2Q4NTYzOjB4MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwNTpmYWxzZQ==",
    "totalCount": 26585,
    "validAt": {
        "blockNumber": 18162406,
        "blockHash": "0x670957987df0a8d0838a05a25d8a1945fbeea24f547a4e59e748c42a12d7cfce",
        "blockTimestamp": "2023-09-18T11:02:47Z"
    }
}

Get the NFT metadata associated with the provided parameters.

Overview of Changes

  • The openSea object in the parent contract object has been changed to openSeaMetadata in the V3 response.
  • The contract object in the V3 response now includes new parameters called isSpam and spamClassifications.
  • The isSpam and classifications parameters for spamInfo on V2 has been added to the contract object in V3.
  • The collectionSlug and bannerImageUrl parameters have been added to the contract.openSeaMetadata object in V3.
  • The title parameter in V2 has been changed to an optional name parameter in V3.
  • The media parameter in V2 has been replaced with an image object in V3.
  • The rawMetadata.attributes parameter has been removed and changed to raw.metadata.attributes in the V3 response.
  • The rawMetadataobject parameter has been changed to a raw object in V3 response, which contains the tokenUri, error and metadata parameters
  • The tokenUri object in V2 has been changed to a tokenUri string parameter in the V3 response.
  • The mint object parameter has been added to the V3 response containing optional mintAddress?, blockNumber?, timestamp?, and transactionHash? parameters.
  • The collection object has been added to the V3 response containing the name, slug?, externalUrl?, and bannerImageUrl? parameters.

Example Requests

V2 Example Request

// Imports the Alchemy SDK
const { Alchemy, Network } = require("alchemy-sdk");

// Configures the Alchemy SDK
const config = {
    apiKey: "alchemy-replit", // Replace with your API key
    network: Network.ETH_MAINNET, // Replace with your network
};

// Creates an Alchemy object instance with the config to use for making requests
const alchemy = new Alchemy(config);

const main = async () => {
    let owner  = "0xe785E82358879F061BC3dcAC6f0444462D4b5330";
    let tokenId = 44;
    
    //Call the method to get the nfts owned by this address
    let response = await alchemy.nft.getNftMetadata(owner, tokenId)

    //Logging the response to the console
    console.log(response)
};

main();

V3 Example Request

Same as V2.

V2 <> V3 Mapping

V2 ParameterV3 Parameter
contract.addresscontract.address
contract.namecontract.name
contract.symbolcontract.symbol
contract.tokenTypecontract.tokenType
contract.contractDeployercontract.contractDeployer
contract.deployedBlockNumbercontract.deployedBlockNumber
spamInfo.isSpamcontract.isSpam
spamInfo.classificationscontract.spamClassifications
contract.openSea.floorPricecontract.openSeaMetadata.floorPrice
contract.openSea.collectionNamecontract.openSeaMetadata.collectionName
-contract.openSeaMetadata.collectionSlug (New in V3)
contract.openSea.safelistRequestStatuscontract.openSeaMetadata.safelistRequestStatus
contract.openSea.imageUrlcontract.openSeaMetadata.imageUrl
contract.openSea.descriptioncontract.openSeaMetadata.description
contract.openSea.externalUrlcontract.openSeaMetadata.externalUrl
-contract.openSeaMetadata.bannerImageUrl (New in V3)
contract.openSea.lastIngestedAtcontract.openSeaMetadata.lastIngestedAt
tokenIdtokenId
tokenTypetokenType
tokenUritokenUri
titlename
descriptiondescription
rawMetadataraw
rawMetadata.metadataraw.metadata
rawMetadata.attributesraw.metadata.attributes
rawMetadata.errorraw.error
-raw.tokenUri
mediaimage
-collection (New in V3)
-mint(New in V3)
timeLastUpdatedtimeLastUpdated

Example Responses

V2 Example Response

{
    "contract": {
        "address": "0xe785e82358879f061bc3dcac6f0444462d4b5330",
        "name": "World Of Women",
        "symbol": "WOW",
        "totalSupply": "10000",
        "tokenType": "ERC721",
        "openSea": {
            "floorPrice": 0.7999,
            "collectionName": "World of Women",
            "safelistRequestStatus": "verified",
            "imageUrl": "https://i.seadn.io/gcs/files/8604de2d9aaec98dd389e3af1b1a14b6.gif?w=500&auto=format",
            "description": "World of Women is a collection of 10,000 NFTs that gives you full access to our network of artists, creators, entrepreneurs, and executives who are championing diversity and equal opportunity on the blockchain.\n\nCreated and illustrated by Yam Karkai (@ykarkai), World of Women has made prominent appearances at Christie's, The New Yorker and Billboard.\n\nJoin us to receive exclusive access to NFT drops, experiences, and much more.\n\nThe Time is WoW.",
            "externalUrl": "http://worldofwomen.art",
            "twitterUsername": "worldofwomennft",
            "discordUrl": "https://discord.gg/worldofwomen",
            "lastIngestedAt": "2023-07-11T11:58:25.000Z"
        },
        "contractDeployer": "0xc9b6321dc216d91e626e9baa61b06b0e4d55bdb1",
        "deployedBlockNumber": 12907782
    },
    "tokenId": "44",
    "tokenType": "ERC721",
    "title": "WoW #44",
    "description": "",
    "timeLastUpdated": "2023-07-13T08:14:36.601Z",
    "rawMetadata": {
        "name": "WoW #44",
        "image": "ipfs://QmUkdJKCsV8ixm2eDLJGosH8Bntwwx942YXxfuF9yXPBzi",
        "attributes": [
            {
                "value": "Green Orange",
                "trait_type": "Background"
            },
            {
                "value": "Medium Gold",
                "trait_type": "Skin Tone"
            },
            {
                "value": "Green To The Left",
                "trait_type": "Eyes"
            },
            {
                "value": "Freckles",
                "trait_type": "Facial Features"
            },
            {
                "value": "Boy Cut",
                "trait_type": "Hairstyle"
            },
            {
                "value": "Tunic",
                "trait_type": "Clothes"
            },
            {
                "value": "Spikes",
                "trait_type": "Earrings"
            },
            {
                "value": "Slight Smile",
                "trait_type": "Mouth"
            },
            {
                "value": "Purple",
                "trait_type": "Lips Color"
            }
        ]
    },
    "tokenUri": {
        "gateway": "https://alchemy.mypinata.cloud/ipfs/QmTNBQDbggLZdKF1fRgWnXsnRikd52zL5ciNu769g9JoUP/44",
        "raw": "ipfs://QmTNBQDbggLZdKF1fRgWnXsnRikd52zL5ciNu769g9JoUP/44"
    },
    "media": [
        {
            "gateway": "https://nft-cdn.alchemy.com/eth-mainnet/9316855d8f60a32cd44aa71f07cd7dc1",
            "thumbnail": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/9316855d8f60a32cd44aa71f07cd7dc1",
            "raw": "ipfs://QmUkdJKCsV8ixm2eDLJGosH8Bntwwx942YXxfuF9yXPBzi",
            "format": "png",
            "bytes": 105117
        }
    ]
}

V3 Example Response

{
    "contract": {
        "address": "0xe785E82358879F061BC3dcAC6f0444462D4b5330",
        "name": "World Of Women",
        "symbol": "WOW",
        "totalSupply": "10000",
        "tokenType": "ERC721",
        "contractDeployer": "0xc9b6321dc216D91E626E9BAA61b06B0E4d55bdb1",
        "deployedBlockNumber": 12907782,
        "openSeaMetadata": {
            "floorPrice": 0.6021,
            "collectionName": "World of Women",
            "collectionSlug": "world-of-women-nft",
            "safelistRequestStatus": "verified",
            "imageUrl": "https://i.seadn.io/gcs/files/8604de2d9aaec98dd389e3af1b1a14b6.gif?w=500&auto=format",
            "description": "World of Women is a collection of 10,000 NFTs that gives you full access to our network of artists, creators, entrepreneurs, and executives who are championing diversity and equal opportunity on the blockchain.\n\nCreated and illustrated by Yam Karkai (@ykarkai), World of Women has made prominent appearances at Christie's, The New Yorker and Billboard.\n\nJoin us to receive exclusive access to NFT drops, experiences, and much more.\n\nThe Time is WoW.",
            "externalUrl": "http://worldofwomen.art",
            "twitterUsername": "worldofwomennft",
            "discordUrl": "https://discord.gg/worldofwomen",
            "bannerImageUrl": "https://i.seadn.io/gae/GHhptRLebBOWOy8kfXpYCVqsqdes-1-6I_jbuRnGTHHW6TD63CtciH75Dotfu2u8v6EmkWt-tjhkFRVLxRUwgMfKqqy5W24AolJayeo?w=500&auto=format",
            "lastIngestedAt": "2023-09-18T12:28:27.000Z"
        },
        "spamClassifications": []
    },
    "tokenId": "44",
    "tokenType": "ERC721",
    "name": "WoW #44",
    "tokenUri": "https://alchemy.mypinata.cloud/ipfs/QmTNBQDbggLZdKF1fRgWnXsnRikd52zL5ciNu769g9JoUP/44",
    "image": {
        "cachedUrl": "https://nft-cdn.alchemy.com/eth-mainnet/9316855d8f60a32cd44aa71f07cd7dc1",
        "thumbnailUrl": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/9316855d8f60a32cd44aa71f07cd7dc1",
        "pngUrl": "https://res.cloudinary.com/alchemyapi/image/upload/convert-png/eth-mainnet/9316855d8f60a32cd44aa71f07cd7dc1",
        "contentType": "image/png",
        "size": 105117,
        "originalUrl": "https://ipfs.io/ipfs/QmUkdJKCsV8ixm2eDLJGosH8Bntwwx942YXxfuF9yXPBzi"
    },
    "raw": {
        "tokenUri": "ipfs://QmTNBQDbggLZdKF1fRgWnXsnRikd52zL5ciNu769g9JoUP/44",
        "metadata": {
            "name": "WoW #44",
            "image": "ipfs://QmUkdJKCsV8ixm2eDLJGosH8Bntwwx942YXxfuF9yXPBzi",
            "attributes": [
                {
                    "value": "Green Orange",
                    "trait_type": "Background"
                },
                {
                    "value": "Medium Gold",
                    "trait_type": "Skin Tone"
                },
                {
                    "value": "Slight Smile",
                    "trait_type": "Mouth"
                },
                {
                    "value": "Purple",
                    "trait_type": "Lips Color"
                }
            ]
        }
    },
    "collection": {
        "name": "World of Women",
        "slug": "world-of-women-nft",
        "externalUrl": "http://worldofwomen.art",
        "bannerImageUrl": "https://i.seadn.io/gae/GHhptRLebBOWOy8kfXpYCVqsqdes-1-6I_jbuRnGTHHW6TD63CtciH75Dotfu2u8v6EmkWt-tjhkFRVLxRUwgMfKqqy5W24AolJayeo?w=500&auto=format"
    },
    "mint": {},
    "timeLastUpdated": "2023-09-18T13:25:41.833Z"
}

Gets the NFT metadata for multiple NFT tokens.

Overview of Changes

  • The getNftMetadataBatch method now returns an nft array in the V3 response instead of an array of NFTs in V2.
  • The openSea object in the parent contract object has been changed to openSeaMetadata in the V3 response.
  • The isSpam and classifications parameters for spamInfo on V2 has been added to the contract object in V3.
  • The collectionSlug and bannerImageUrl parameters have been added to the contract.openSeaMetadata object in V3.
  • The title parameter in V2 has been changed to an optional name parameter in V3.
  • The media parameter in V2 has been replaced with an image object in V3.
  • The rawMetadata.attributes parameter has been changed to raw.metadata.attributes in the V3 response.
  • The rawMetadataobject parameter has been changed to a raw object in V3 response, which contains the tokenUri and metadata parameters
  • The tokenUri object in V2 has been changed to a tokenUri string parameter in the V3 response.
  • The mint object parameter has been added to the V3 response containing optional mintAddress?, blockNumber?, timestamp?, and transactionHash? parameters.
  • The collection object has been added to the V3 response containing the name, slug?, externalUrl?, and bannerImageUrl? parameters.

Example Requests

V2 Example Request

// Imports the Alchemy SDK
const { Alchemy, Network } = require("alchemy-sdk");

// Configures the Alchemy SDK
const config = {
    apiKey: "alchemy-replit", // Replace with your API key
    network: Network.ETH_MAINNET, // Replace with your network
};

// Creates an Alchemy object instance with the config to use for making requests
const alchemy = new Alchemy(config);

const main = async () => {
    
    //Call the method
    let response = await alchemy.nft.getNftMetadataBatch(
        [
            {
              contractAddress: "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D",
              tokenId: "3",
              tokenType: "ERC721"
            },
            {
              contractAddress: "0x8a90CAb2b38dba80c64b7734e58Ee1dB38B8992e",
              tokenId: "4",
              tokenType: "ERC721"
            }
          ],
          {
            tokenUriTimeoutInMs: 5000,
            refreshCache: true
          }
    )

    //Logging the response to the console
    console.log(response)
};

main();

V3 Example Request

Same as V2.

V2 <> V3 Mapping

V2 ParameterV3 Parameter
contract.addresscontract.address
contract.namecontract.name
contract.symbolcontract.symbol
contract.tokenTypecontract.tokenType
contract.contractDeployercontract.contractDeployer
contract.deployedBlockNumbercontract.deployedBlockNumber
spamInfo.isSpamcontract.isSpam
spamInfo.classificationscontract.spamClassifications
contract.openSea.floorPricecontract.openSeaMetadata.floorPrice
contract.openSea.collectionNamecontract.openSeaMetadata.collectionName
-contract.openSeaMetadata.collectionSlug (New in V3)
contract.openSea.safelistRequestStatuscontract.openSeaMetadata.safelistRequestStatus
contract.openSea.imageUrlcontract.openSeaMetadata.imageUrl
contract.openSea.descriptioncontract.openSeaMetadata.description
contract.openSea.externalUrlcontract.openSeaMetadata.externalUrl
-contract.openSeaMetadata.bannerImageUrl (New in V3)
contract.openSea.lastIngestedAtcontract.openSeaMetadata.lastIngestedAt
tokenIdtokenId
tokenTypetokenType
tokenUritokenUri
titlename
descriptiondescription
rawMetadataraw
rawMetadata.metadataraw.metadata
rawMetadata.attributesraw.metadata.attributes
rawMetadata.errorraw.error
-raw.tokenUri
mediaimage
-collection (New in V3)
-mint(New in V3)
timeLastUpdatedtimeLastUpdated

Example Responses

V2 Example Response

[
    {
        "contract": {
            "address": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d",
            "name": "BoredApeYachtClub",
            "symbol": "BAYC",
            "totalSupply": "10000",
            "tokenType": "ERC721",
            "openSea": {
                "floorPrice": 34.5,
                "collectionName": "Bored Ape Yacht Club",
                "safelistRequestStatus": "verified",
                "imageUrl": "https://i.seadn.io/gae/Ju9CkWtV-1Okvf45wo8UctR-M9He2PjILP0oOvxE89AyiPPGtrR3gysu1Zgy0hjd2xKIgjJJtWIc0ybj4Vd7wv8t3pxDGHoJBzDB?w=500&auto=format",
                "description": "The Bored Ape Yacht Club is a collection of 10,000 unique Bored Ape NFTs— unique digital collectibles living on the Ethereum blockchain. Your Bored Ape doubles as your Yacht Club membership card, and grants access to members-only benefits, the first of which is access to THE BATHROOM, a collaborative graffiti board. Future areas and perks can be unlocked by the community through roadmap activation. Visit www.BoredApeYachtClub.com for more details.",
                "externalUrl": "http://www.boredapeyachtclub.com/",
                "twitterUsername": "BoredApeYC",
                "discordUrl": "https://discord.gg/3P5K3dzgdB",
                "lastIngestedAt": "2023-07-10T01:34:04.000Z"
            },
            "contractDeployer": "0xaba7161a7fb69c88e16ed9f455ce62b791ee4d03",
            "deployedBlockNumber": 12287507
        },
        "tokenId": "3",
        "tokenType": "ERC721",
        "title": "",
        "description": "",
        "timeLastUpdated": "2023-07-19T19:18:42.867Z",
        "rawMetadata": {
            "image": "ipfs://QmYxT4LnK8sqLupjbS6eRvu1si7Ly2wFQAqFebxhWntcf6",
            "attributes": [
                {
                    "trait_type": "Background",
                    "value": "Purple"
                },
                {
                    "trait_type": "Eyes",
                    "value": "Bored"
                },
                {
                    "trait_type": "Mouth",
                    "value": "Tongue Out"
                },
                {
                    "trait_type": "Clothes",
                    "value": "Bone Necklace"
                },
                {
                    "trait_type": "Fur",
                    "value": "Cheetah"
                }
            ]
        },
        "tokenUri": {
            "gateway": "https://ipfs.io/ipfs/QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/3",
            "raw": "ipfs://QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/3"
        },
        "media": [
            {
                "gateway": "https://nft-cdn.alchemy.com/eth-mainnet/e93ceab748985031d68b8ac5a3e38ed1",
                "thumbnail": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/e93ceab748985031d68b8ac5a3e38ed1",
                "raw": "ipfs://QmYxT4LnK8sqLupjbS6eRvu1si7Ly2wFQAqFebxhWntcf6",
                "format": "png",
                "bytes": 208822
            }
        ]
    }
]

V3 Example Response

{
    "nfts": [
        {
            "contract": {
                "address": "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D",
                "name": "BoredApeYachtClub",
                "symbol": "BAYC",
                "totalSupply": "10000",
                "tokenType": "ERC721",
                "contractDeployer": "0xaBA7161A7fb69c88e16ED9f455CE62B791EE4D03",
                "deployedBlockNumber": 12287507,
                "openSeaMetadata": {
                    "floorPrice": 24.76,
                    "collectionName": "Bored Ape Yacht Club",
                    "collectionSlug": "boredapeyachtclub",
                    "safelistRequestStatus": "verified",
                    "imageUrl": "https://i.seadn.io/gae/Ju9CkWtV-1Okvf45wo8UctR-M9He2PjILP0oOvxE89AyiPPGtrR3gysu1Zgy0hjd2xKIgjJJtWIc0ybj4Vd7wv8t3pxDGHoJBzDB?w=500&auto=format",
                    "description": "The Bored Ape Yacht Club is a collection of 10,000 unique Bored Ape NFTs— unique digital collectibles living on the Ethereum blockchain. Your Bored Ape doubles as your Yacht Club membership card, and grants access to members-only benefits, the first of which is access to THE BATHROOM, a collaborative graffiti board. Future areas and perks can be unlocked by the community through roadmap activation. Visit www.BoredApeYachtClub.com for more details.",
                    "externalUrl": "http://www.boredapeyachtclub.com/",
                    "twitterUsername": "BoredApeYC",
                    "discordUrl": "https://discord.gg/3P5K3dzgdB",
                    "bannerImageUrl": "https://i.seadn.io/gae/i5dYZRkVCUK97bfprQ3WXyrT9BnLSZtVKGJlKQ919uaUB0sxbngVCioaiyu9r6snqfi2aaTyIvv6DHm4m2R3y7hMajbsv14pSZK8mhs?w=500&auto=format",
                    "lastIngestedAt": "2023-09-18T09:58:23.000Z"
                },
                "spamClassifications": []
            },
            "tokenId": "3",
            "tokenType": "ERC721",
            "tokenUri": "https://ipfs.io/ipfs/QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/3",
            "image": {
                "cachedUrl": "https://nft-cdn.alchemy.com/eth-mainnet/e93ceab748985031d68b8ac5a3e38ed1",
                "thumbnailUrl": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/e93ceab748985031d68b8ac5a3e38ed1",
                "pngUrl": "https://res.cloudinary.com/alchemyapi/image/upload/convert-png/eth-mainnet/e93ceab748985031d68b8ac5a3e38ed1",
                "contentType": "image/png",
                "size": 208822,
                "originalUrl": "https://ipfs.io/ipfs/QmYxT4LnK8sqLupjbS6eRvu1si7Ly2wFQAqFebxhWntcf6"
            },
            "raw": {
                "tokenUri": "ipfs://QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/3",
                "metadata": {
                    "image": "ipfs://QmYxT4LnK8sqLupjbS6eRvu1si7Ly2wFQAqFebxhWntcf6",
                    "attributes": [
                        {
                            "trait_type": "Background",
                            "value": "Purple"
                        },
                        {
                            "trait_type": "Fur",
                            "value": "Cheetah"
                        }
                    ]
                }
            },
            "collection": {
                "name": "Bored Ape Yacht Club",
                "slug": "boredapeyachtclub",
                "externalUrl": "http://www.boredapeyachtclub.com/",
                "bannerImageUrl": "https://i.seadn.io/gae/i5dYZRkVCUK97bfprQ3WXyrT9BnLSZtVKGJlKQ919uaUB0sxbngVCioaiyu9r6snqfi2aaTyIvv6DHm4m2R3y7hMajbsv14pSZK8mhs?w=500&auto=format"
            },
            "mint": {},
            "timeLastUpdated": "2023-09-18T18:14:22.829Z"
        },
        {
            "contract": {
                "address": "0x8a90CAb2b38dba80c64b7734e58Ee1dB38B8992e",
                "name": "Doodles",
                "symbol": "DOODLE",
                "totalSupply": "10000",
                "tokenType": "ERC721",
                "contractDeployer": "0x2B3Ab8e7BB14988616359B78709538b10900AB7D",
                "deployedBlockNumber": 13430097,
                "openSeaMetadata": {
                    "floorPrice": 1.55,
                    "collectionName": "Doodles",
                    "collectionSlug": "doodles-official",
                    "safelistRequestStatus": "verified",
                    "imageUrl": "https://i.seadn.io/gae/7B0qai02OdHA8P_EOVK672qUliyjQdQDGNrACxs7WnTgZAkJa_wWURnIFKeOh5VTf8cfTqW3wQpozGedaC9mteKphEOtztls02RlWQ?w=500&auto=format",
                    "description": "A community-driven collectibles project featuring art by Burnt Toast. Doodles come in a joyful range of colors, traits and sizes with a collection size of 10,000. Each Doodle allows its owner to vote for experiences and activations paid for by the Doodles Community Treasury.",
                    "externalUrl": "https://doodles.app",
                    "twitterUsername": "doodles",
                    "discordUrl": "https://discord.gg/doodles",
                    "bannerImageUrl": "https://i.seadn.io/gae/svc_rQkHVGf3aMI14v3pN-ZTI7uDRwN-QayvixX-nHSMZBgb1L1LReSg1-rXj4gNLJgAB0-yD8ERoT-Q2Gu4cy5AuSg-RdHF9bOxFDw?w=500&auto=format",
                    "lastIngestedAt": "2023-09-10T05:19:20.000Z"
                },
                "spamClassifications": []
            },
            "tokenId": "4",
            "tokenType": "ERC721",
            "name": "Doodle #4",
            "description": "A community-driven collectibles project featuring art by Burnt Toast. Doodles come in a joyful range of colors, traits and sizes with a collection size of 10,000. Each Doodle allows its owner to vote for experiences and activations paid for by the Doodles Community Treasury. Burnt Toast is the working alias for Scott Martin, a Canadian–based illustrator, designer, animator and muralist.",
            "tokenUri": "https://ipfs.io/ipfs/QmPMc4tcBsMqLRuCQtPmPe84bpSjrC3Ky7t3JWuHXYB4aS/4",
            "image": {
                "cachedUrl": "https://nft-cdn.alchemy.com/eth-mainnet/f1fa2cc9dd6ddfc0449c5c30fb30fca4",
                "thumbnailUrl": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/f1fa2cc9dd6ddfc0449c5c30fb30fca4",
                "pngUrl": "https://res.cloudinary.com/alchemyapi/image/upload/convert-png/eth-mainnet/f1fa2cc9dd6ddfc0449c5c30fb30fca4",
                "contentType": "image/png",
                "size": 129566,
                "originalUrl": "https://ipfs.io/ipfs/QmcyuFVLbfBmSeQ9ynu4dk67r97nB1abEekotuVuRGWedm"
            },
            "raw": {
                "tokenUri": "ipfs://QmPMc4tcBsMqLRuCQtPmPe84bpSjrC3Ky7t3JWuHXYB4aS/4",
                "metadata": {
                    "name": "Doodle #4",
                    "image": "ipfs://QmcyuFVLbfBmSeQ9ynu4dk67r97nB1abEekotuVuRGWedm",
                    "description": "A community-driven collectibles project featuring art by Burnt Toast. Doodles come in a joyful range of colors, traits and sizes with a collection size of 10,000. Each Doodle allows its owner to vote for experiences and activations paid for by the Doodles Community Treasury. Burnt Toast is the working alias for Scott Martin, a Canadian–based illustrator, designer, animator and muralist.",
                    "attributes": [
                        {
                            "value": "happy",
                            "trait_type": "face"
                        },
                        {
                            "value": "purple",
                            "trait_type": "head"
                        }
                    ]
                }
            },
            "collection": {
                "name": "Doodles",
                "slug": "doodles-official",
                "externalUrl": "https://doodles.app",
                "bannerImageUrl": "https://i.seadn.io/gae/svc_rQkHVGf3aMI14v3pN-ZTI7uDRwN-QayvixX-nHSMZBgb1L1LReSg1-rXj4gNLJgAB0-yD8ERoT-Q2Gu4cy5AuSg-RdHF9bOxFDw?w=500&auto=format"
            },
            "mint": {},
            "timeLastUpdated": "2023-09-18T08:18:52.566Z"
        }
    ]
}

Refreshes the cached metadata for a provided NFT contract address and token id. Returns a boolean value indicating whether the metadata was refreshed.

Overview of Changes

  • There are no changes in the request structure or method name between V2 and V3.

Example Requests

V2 Example Request

// Imports the Alchemy SDK
const { Alchemy, Network } = require("alchemy-sdk");

// Configures the Alchemy SDK
const config = {
    apiKey: "alchemy-replit", // Replace with your API key
    network: Network.ETH_MAINNET, // Replace with your network
};

// Creates an Alchemy object instance with the config to use for making requests
const alchemy = new Alchemy(config);

const main = async () => {
    const contractAddress = "0x06012c8cf97bead5deae237070f9587f8e7a266d";
    const tokenId = "1";
    //Call the method
    let response = await alchemy.nft.refreshNftMetadata(contractAddress, tokenId)

    //Logging the response to the console
    console.log(response)
};

main();

V3 Example Request

Same as V2.

V2 <> V3 Mapping

V2 ParameterV3 Parameter
booleanboolean

Example Responses

V2 Example Response

false

V3 Example Response

true

Returns NFT sales that have happened through on-chain marketplaces.

Overview of Changes

  • The marketplaceAddress parameter has been added to the V3 response.
  • The marketplaceFee has been removed from the V3 response.

Example Requests

V2 Example Request

// Imports the Alchemy SDK
const { Alchemy, Network } = require("alchemy-sdk");

// Configures the Alchemy SDK
const config = {
    apiKey: "alchemy-replit", // Replace with your API key
    network: Network.ETH_MAINNET, // Replace with your network
};

// Creates an Alchemy object instance with the config to use for making requests
const alchemy = new Alchemy(config);

const main = async () => {
    //Call the method to return the nft sales data
    const response = await alchemy.nft.getNftSales()

    //Logging the response to the console
    console.log(response)
};

main();

V3 Example Request

Same as V2.

V2 <> V3 Mapping

V2 ParameterV3 Parameter
marketplacemarketplace
-marketplaceAddress(New in V3)
contractAddresscontractAddress
tokenIdtokenId
quantityquantity
buyerAddressbuyerAddress
sellerAddresssellerAddress
takertaker
sellerFeesellerFee
marketplaceFee(Removed in V3)
protocolFeeprotocolFee
royaltyFeeroyaltyFee
blockNumberblockNumber
logIndexlogIndex
bundleIndexbundleIndex
transactionHashtransactionHash
validAtvalidAt
validAt.blockNumbervalidAt.blockNumber
validAt.blockHashvalidAt.blockHash
validAt.blockTimestampvalidAt.blockTimestamp
pageKeypageKey

Example Responses

V2 Example Response

{
    "nftSales": [
        {
            "marketplace": "cryptopunks",
            "contractAddress": "0xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb",
            "tokenId": "544",
            "quantity": "1",
            "buyerAddress": "0x5b098b00621eda6a96b7a476220661ad265f083f",
            "sellerAddress": "0xc352b534e8b987e036a93539fd6897f53488e56a",
            "taker": "seller",
            "sellerFee": {
                "amount": "10000000000000000",
                "tokenAddress": "0x0000000000000000000000000000000000000000",
                "symbol": "ETH",
                "decimals": 18
            },
            "marketplaceFee": {},
            "protocolFee": {},
            "royaltyFee": {},
            "blockNumber": 3919706,
            "logIndex": 25,
            "bundleIndex": 0,
            "transactionHash": "0xb28b5f2c186bf534e4fc4b8604b1496c9632e42269424f70ef1bdce61ea8ba52"
        },
        {
            "marketplace": "cryptopunks",
            "contractAddress": "0xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb",
            "tokenId": "3134",
            "quantity": "1",
            "buyerAddress": "0xc352b534e8b987e036a93539fd6897f53488e56a",
            "sellerAddress": "0x5b098b00621eda6a96b7a476220661ad265f083f",
            "taker": "buyer",
            "sellerFee": {
                "amount": "10000000000000000",
                "tokenAddress": "0x0000000000000000000000000000000000000000",
                "symbol": "ETH",
                "decimals": 18
            },
            "marketplaceFee": {},
            "protocolFee": {},
            "royaltyFee": {},
            "blockNumber": 3919721,
            "logIndex": 9,
            "bundleIndex": 0,
            "transactionHash": "0x65579455ac3227e7b3db72b4e359e988bb16cae6d26c88818d1a6991b478b274"
        },
        {
            "marketplace": "cryptopunks",
            "contractAddress": "0xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb",
            "tokenId": "5056",
            "quantity": "1",
            "buyerAddress": "0x00bd9fd57c423a1b1c969823d409156d90974d77",
            "sellerAddress": "0xc352b534e8b987e036a93539fd6897f53488e56a",
            "taker": "buyer",
            "sellerFee": {
                "amount": "100000000000000000",
                "tokenAddress": "0x0000000000000000000000000000000000000000",
                "symbol": "ETH",
                "decimals": 18
            },
            "marketplaceFee": {},
            "protocolFee": {},
            "royaltyFee": {},
            "blockNumber": 3919847,
            "logIndex": 35,
            "bundleIndex": 0,
            "transactionHash": "0xd79cca9282c06a0edb8f9426aae734119f0f2ed0d9683dfe3723dc7814f5fccd"
        },
        {
            "marketplace": "cryptopunks",
            "contractAddress": "0xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb",
            "tokenId": "5719",
            "quantity": "1",
            "buyerAddress": "0x00bd3a6660309fb9e0129b9b777a9ccb9c2869dc",
            "sellerAddress": "0x5b098b00621eda6a96b7a476220661ad265f083f",
            "taker": "buyer",
            "sellerFee": {
                "amount": "40000000000000000",
                "tokenAddress": "0x0000000000000000000000000000000000000000",
                "symbol": "ETH",
                "decimals": 18
            },
            "marketplaceFee": {},
            "protocolFee": {},
            "royaltyFee": {},
            "blockNumber": 4367925,
            "logIndex": 71,
            "bundleIndex": 0,
            "transactionHash": "0xe6e1885bd2dd142c63b79df6aca0ad3213e37c3a9f01a550c30fa1b234d3c7f2"
        }
    ],
    "validAt": {
        "blockNumber": 17736688,
        "blockHash": "0x09c001045ba91210c239bf53948ce23329306cd64fe9c1618d6b9459ff283817",
        "blockTimestamp": "2023-07-20T20:13:35Z"
    },
    "pageKey": "NDM2ODAyNSw3Miww"
}

V3 Example Response

{
    "nftSales": [
        {
            "marketplace": "cryptopunks",
            "marketplaceAddress": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB",
            "contractAddress": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB",
            "tokenId": "544",
            "quantity": "1",
            "buyerAddress": "0x5b098b00621EDa6a96b7a476220661ad265F083f",
            "sellerAddress": "0xC352B534e8b987e036A93539Fd6897F53488e56a",
            "taker": "seller",
            "sellerFee": {
                "amount": "10000000000000000",
                "tokenAddress": "0x0000000000000000000000000000000000000000",
                "symbol": "ETH",
                "decimals": 18
            },
            "protocolFee": {},
            "royaltyFee": {},
            "blockNumber": 3919706,
            "logIndex": 25,
            "bundleIndex": 0,
            "transactionHash": "0xb28b5f2c186bf534e4fc4b8604b1496c9632e42269424f70ef1bdce61ea8ba52"
        },
        {
            "marketplace": "cryptopunks",
            "marketplaceAddress": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB",
            "contractAddress": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB",
            "tokenId": "3134",
            "quantity": "1",
            "buyerAddress": "0xC352B534e8b987e036A93539Fd6897F53488e56a",
            "sellerAddress": "0x5b098b00621EDa6a96b7a476220661ad265F083f",
            "taker": "buyer",
            "sellerFee": {
                "amount": "10000000000000000",
                "tokenAddress": "0x0000000000000000000000000000000000000000",
                "symbol": "ETH",
                "decimals": 18
            },
            "protocolFee": {},
            "royaltyFee": {},
            "blockNumber": 3919721,
            "logIndex": 9,
            "bundleIndex": 0,
            "transactionHash": "0x65579455ac3227e7b3db72b4e359e988bb16cae6d26c88818d1a6991b478b274"
        },
        {
            "marketplace": "cryptopunks",
            "marketplaceAddress": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB",
            "contractAddress": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB",
            "tokenId": "5445",
            "quantity": "1",
            "buyerAddress": "0x0f4023208058ecfFCb22A7409Df11F6D6013FE8A",
            "sellerAddress": "0x0B30fD3a500608413837Bb025c2018933130F9DB",
            "taker": "buyer",
            "sellerFee": {
                "amount": "130000000000000000",
                "tokenAddress": "0x0000000000000000000000000000000000000000",
                "symbol": "ETH",
                "decimals": 18
            },
            "protocolFee": {},
            "royaltyFee": {},
            "blockNumber": 4367925,
            "logIndex": 71,
            "bundleIndex": 0,
            "transactionHash": "0xe6e1885bd2dd142c63b79df6aca0ad3213e37c3a9f01a550c30fa1b234d3c7f2"
        }
    ],
    "validAt": {
        "blockNumber": 18213475,
        "blockHash": "0xc839e3f01f73b8818899bad0d043b39c6ca0c9ec2150c62a9d195796b39c61a9",
        "blockTimestamp": "2023-09-25T14:44:35Z"
    },
    "pageKey": "NDM2ODAyNSw3Miww"
}

Get a summary of attribute prevalence for an NFT collection.

Overview of Changes

  • There are no changes in the method's request, response format, or parameter names/structures between V2 and V3.

Example Requests

V2 Example Request

// Imports the Alchemy SDK
const { Alchemy, Network } = require("alchemy-sdk");

// Configures the Alchemy SDK
const config = {
    apiKey: "alchemy-replit", // Replace with your API key
    network: Network.ETH_MAINNET, // Replace with your network
};

// Creates an Alchemy object instance with the config to use for making requests
const alchemy = new Alchemy(config);

const main = async () => {
    const collection = "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D";

    //Call the method to fetch a summary a attribute prevalence for an NFT collection.
    const response = await alchemy.nft.summarizeNftAttributes(collection)

    //Logging the response to the console
    console.log(response)
};

main();

V3 Example Request

Same as V2.

Overview of Changes

  • No changes have been made to the request or response structure in the transition from V2 to V3.

V2 <> V3 Mapping

V2 ParameterV3 Parameter
totalSupplytotalSupply
contractAddresscontractAddress
summarysummary

Example Responses

V2 Example Response

{
    "summary": {
        "Fur": {
            "Tan": 626,
            "Death Bot": 175,
            "Trippy": 77,
            "Brown": 1370,
            "Gray": 496,
            "Golden Brown": 778,
            "Blue": 490,
            "Noise": 155,
            "Zombie": 302,
            "Cream": 636,
            "Solid Gold": 46,
            "Dmt": 215,
            "Black": 1229,
            "Cheetah": 406,
            "Dark Brown": 1352,
            "Red": 474,
            "Pink": 511,
            "White": 397,
            "Robot": 265
        },
        "Eyes": {
            "Heart": 394,
            "Sleepy": 751,
            "Eyepatch": 333,
            "X Eyes": 243,
            "Zombie": 308,
            "Angry": 432,
            "Coins": 479,
            "Blue Beams": 49,
            "Wide Eyed": 549,
            "Hypnotized": 220,
            "Bloodshot": 846,
            "Blindfold": 264,
            "Sunglasses": 352,
            "3d": 487,
            "Bored": 1714,
            "Laser Eyes": 69,
            "Cyborg": 108,
            "Crazy": 407,
            "Closed": 710,
            "Sad": 551,
            "Scumbag": 233,
            "Robot": 350,
            "Holographic": 151
        },
        "Background": {
            "Gray": 1170,
            "Aquamarine": 1266,
            "Blue": 1242,
            "Purple": 1291,
            "Yellow": 1283,
            "New Punk Blue": 1232,
            "Army Green": 1243,
            "Orange": 1273
        },
        "Mouth": {
            "Phoneme Vuh": 333,
            "Discomfort": 208,
            "Bored Unshaven Pipe": 101,
            "Bored Cigarette": 710,
            "Rage": 266,
            "Bored Bubblegum": 119,
            "Bored Pizza": 50,
            "Grin": 713,
            "Bored Party Horn": 88,
            "Bored": 2272,
            "Bored Unshaven Bubblegum": 65,
            "Bored Unshaven Cigarette": 438,
            "Jovial": 296,
            "Tongue Out": 202,
            "Grin Multicolored": 116,
            "Small Grin": 272,
            "Bored Unshaven Party horn": 45,
            "Phoneme  ooo": 255,
            "Bored Unshaven": 1551,
            "Bored Unshaven Pizza": 26,
            "Bored Unshaven Dagger": 28,
            "Phoneme Wah": 163,
            "Phoneme Oh": 237,
            "Dumbfounded": 505,
            "Bored Pipe": 132,
            "Grin Gold Grill": 91,
            "Bored Unshaven Cigar": 94,
            "Phoneme L": 241,
            "Bored Unshaven Kazoo": 61,
            "Grin Diamond Grill": 78,
            "Bored Dagger": 49,
            "Bored Cigar": 121,
            "Bored Kazoo": 74
        },
        "Clothes": {
            "Smoking Jacket": 221,
            "Bone Necklace": 203,
            "Leather Jacket": 206,
            "Striped Tee": 412,
            "Bone Tee": 230,
            "Tweed Suit": 141,
            "Puffy Vest": 227,
            "Vietnam Jacket": 224,
            "Toga": 202,
            "Black Holes T": 205,
            "Prom Dress": 103,
            "Work Vest": 188,
            "Sleeveless Logo T": 144,
            "Tanktop": 235,
            "Hawaiian": 283,
            "Bayc T Black": 215,
            "Lumberjack Shirt": 213,
            "Hip Hop": 128,
            "Admirals Coat": 64,
            "Lab Coat": 144,
            "Pimp Coat": 80,
            "Prison Jumpsuit": 235,
            "Black Suit": 42,
            "Service": 142,
            "Blue Dress": 95,
            "Caveman Pelt": 163,
            "Sleeveless T": 252,
            "Guayabera": 232,
            "Sailor Shirt": 284,
            "Bayc T Red": 140,
            "Bandolier": 163,
            "Rainbow Suspenders": 135,
            "Tie Dye": 144,
            "Biker Vest": 253,
            "Space Suit": 105,
            "Cowboy Shirt": 119,
            "Navy Striped Tee": 334,
            "Stunt Jacket": 178,
            "Kings Robe": 68,
            "Wool Turtleneck": 240,
            "Leather Punk Jacket": 153,
            "Black T": 334,
            "Tuxedo Tee": 235
        },
        "Earring": {
            "Gold Hoop": 462,
            "Silver Hoop": 882,
            "Silver Stud": 823,
            "Gold Stud": 439,
            "Cross": 149,
            "Diamond Stud": 222
        },
        "Hat": {
            "Trippy Captain's Hat": 65,
            "Bayc Flipped Brim": 231,
            "Short Mohawk": 318,
            "Safari": 182,
            "Cowboy Hat": 354,
            "Sea Captain's Hat": 304,
            "Vietnam Era Helmet": 223,
            "Sushi Chef Headband": 187,
            "Irish Boho": 225,
            "Girl's Hair Short": 150,
            "Laurel Wreath": 72,
            "Girl's Hair Pink": 105,
            "Bayc Hat Red": 119,
            "Horns": 252,
            "Fisherman's Hat": 345,
            "Bowler": 262,
            "Spinner Hat": 181,
            "Faux Hawk": 136,
            "Seaman's Hat": 420,
            "Ww2 Pilot Helm": 110,
            "Party Hat 1": 120,
            "Party Hat 2": 107,
            "Beanie": 578,
            "King's Crown": 77,
            "Army Hat": 294,
            "Commie Hat": 304,
            "Bunny Ears": 195,
            "S&m Hat": 235,
            "Stuntman Helmet": 157,
            "Fez": 377,
            "Bandana Blue": 89,
            "Bayc Hat Black": 228,
            "Halo": 324,
            "Police Motorcycle Helmet": 130,
            "Prussian Helmet": 130,
            "Baby's Bonnet": 158
        }
    },
    "totalSupply": 10000,
    "contractAddress": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d"
}

V3 Example Response

{
    "summary": {
        "Fur": {
            "Tan": 626,
            "Death Bot": 175,
            "Trippy": 77,
            "Brown": 1370,
            "Gray": 496,
            "Golden Brown": 778,
            "Blue": 490,
            "Noise": 155,
            "Zombie": 302,
            "Cream": 636,
            "Solid Gold": 46,
            "Dmt": 215,
            "Black": 1229,
            "Cheetah": 406,
            "Dark Brown": 1352,
            "Red": 474,
            "Pink": 511,
            "White": 397,
            "Robot": 265
        },
        "Eyes": {
            "Heart": 394,
            "Sleepy": 751,
            "Eyepatch": 333,
            "X Eyes": 243,
            "Zombie": 308,
            "Angry": 432,
            "Coins": 479,
            "Blue Beams": 49,
            "Wide Eyed": 549,
            "Hypnotized": 220,
            "Bloodshot": 846,
            "Blindfold": 264,
            "Sunglasses": 352,
            "3d": 487,
            "Bored": 1714,
            "Laser Eyes": 69,
            "Cyborg": 108,
            "Crazy": 407,
            "Closed": 710,
            "Sad": 551,
            "Scumbag": 233,
            "Robot": 350,
            "Holographic": 151
        },
        "Background": {
            "Gray": 1170,
            "Aquamarine": 1266,
            "Blue": 1242,
            "Purple": 1291,
            "Yellow": 1283,
            "New Punk Blue": 1232,
            "Army Green": 1243,
            "Orange": 1273
        },
        "Mouth": {
            "Phoneme Vuh": 333,
            "Discomfort": 208,
            "Bored Unshaven Pipe": 101,
            "Bored Cigarette": 710,
            "Rage": 266,
            "Bored Bubblegum": 119,
            "Bored Pizza": 50,
            "Grin": 713,
            "Bored Party Horn": 88,
            "Bored": 2272,
            "Bored Unshaven Bubblegum": 65,
            "Bored Unshaven Cigarette": 438,
            "Jovial": 296,
            "Tongue Out": 202,
            "Grin Multicolored": 116,
            "Small Grin": 272,
            "Bored Unshaven Party horn": 45,
            "Phoneme  ooo": 255,
            "Bored Unshaven": 1551,
            "Bored Unshaven Pizza": 26,
            "Bored Unshaven Dagger": 28,
            "Phoneme Wah": 163,
            "Phoneme Oh": 237,
            "Dumbfounded": 505,
            "Bored Pipe": 132,
            "Grin Gold Grill": 91,
            "Bored Unshaven Cigar": 94,
            "Phoneme L": 241,
            "Bored Unshaven Kazoo": 61,
            "Grin Diamond Grill": 78,
            "Bored Dagger": 49,
            "Bored Cigar": 121,
            "Bored Kazoo": 74
        },
        "Clothes": {
            "Smoking Jacket": 221,
            "Bone Necklace": 203,
            "Leather Jacket": 206,
            "Striped Tee": 412,
            "Bone Tee": 230,
            "Tweed Suit": 141,
            "Puffy Vest": 227,
            "Vietnam Jacket": 224,
            "Toga": 202,
            "Black Holes T": 205,
            "Prom Dress": 103,
            "Work Vest": 188,
            "Sleeveless Logo T": 144,
            "Tanktop": 235,
            "Hawaiian": 283,
            "Bayc T Black": 215,
            "Lumberjack Shirt": 213,
            "Hip Hop": 128,
            "Admirals Coat": 64,
            "Lab Coat": 144,
            "Pimp Coat": 80,
            "Prison Jumpsuit": 235,
            "Black Suit": 42,
            "Service": 142,
            "Blue Dress": 95,
            "Caveman Pelt": 163,
            "Sleeveless T": 252,
            "Guayabera": 232,
            "Sailor Shirt": 284,
            "Bayc T Red": 140,
            "Bandolier": 163,
            "Rainbow Suspenders": 135,
            "Tie Dye": 144,
            "Biker Vest": 253,
            "Space Suit": 105,
            "Cowboy Shirt": 119,
            "Navy Striped Tee": 334,
            "Stunt Jacket": 178,
            "Kings Robe": 68,
            "Wool Turtleneck": 240,
            "Leather Punk Jacket": 153,
            "Black T": 334,
            "Tuxedo Tee": 235
        },
        "Earring": {
            "Gold Hoop": 462,
            "Silver Hoop": 882,
            "Silver Stud": 823,
            "Gold Stud": 439,
            "Cross": 149,
            "Diamond Stud": 222
        },
        "Hat": {
            "Trippy Captain's Hat": 65,
            "Bayc Flipped Brim": 231,
            "Short Mohawk": 318,
            "Safari": 182,
            "Cowboy Hat": 354,
            "Sea Captain's Hat": 304,
            "Vietnam Era Helmet": 223,
            "Sushi Chef Headband": 187,
            "Irish Boho": 225,
            "Girl's Hair Short": 150,
            "Laurel Wreath": 72,
            "Girl's Hair Pink": 105,
            "Bayc Hat Red": 119,
            "Horns": 252,
            "Fisherman's Hat": 345,
            "Bowler": 262,
            "Spinner Hat": 181,
            "Faux Hawk": 136,
            "Seaman's Hat": 420,
            "Ww2 Pilot Helm": 110,
            "Party Hat 1": 120,
            "Party Hat 2": 107,
            "Beanie": 578,
            "King's Crown": 77,
            "Army Hat": 294,
            "Commie Hat": 304,
            "Bunny Ears": 195,
            "S&m Hat": 235,
            "Stuntman Helmet": 157,
            "Fez": 377,
            "Bandana Blue": 89,
            "Bayc Hat Black": 228,
            "Halo": 324,
            "Police Motorcycle Helmet": 130,
            "Prussian Helmet": 130,
            "Baby's Bonnet": 158
        }
    },
    "totalSupply": 10000,
    "contractAddress": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d"
}

Search for a keyword across the metadata of all ERC-721 and ERC-1155 smart contracts.

Overview of Changes

  • The V3 response now lists the metadata objects within a contracts Array.
  • The openSea object in the V2 response has been changed to openSeaMetadata in the V3 response.
  • The openSeaMetadataobject in the V3 response now contains the collectionSlug and bannerImageUrl parameters.

Example Requests

V2 Example Request

// Imports the Alchemy SDK
const { Alchemy, Network } = require("alchemy-sdk");

// Configures the Alchemy SDK
const config = {
    apiKey: "alchemy-replit", // Replace with your API key
    network: Network.ETH_MAINNET, // Replace with your network
};

// Creates an Alchemy object instance with the config to use for making requests
const alchemy = new Alchemy(config);

const main = async () => {
    const kw = "hair"

    //Call the method to fetch metadata
    const response = await alchemy.nft.searchContractMetadata(kw)

    //Logging the response to the console
    console.log(response)
};

main();

V3 Example Request

Same as V2.

V2 <> V3 Mapping

V2 ParameterV3 Parameter
addressaddress
namename
symbolsymbol
totalSupplytotalSupply
tokenTypetokenType
openSea.floorPriceopenSeaMetadata.floorPrice
openSea.collectionNameopenSeaMetadata.collectionName
-openSeaMetadata.collectionSlug(New in V3)
openSea.safelistRequestStatusopenSeaMetadata.safelistRequestStatus
openSea.imageUrlopenSeaMetadata.imageUrl
openSea.descriptionopenSeaMetadata.description
openSea.externalUrlopenSeaMetadata.externalUrl
openSea.twitterUsernameopenSeaMetadata.twitterUsername
openSea.discordUrlopenSeaMetadata.discordUrl
openSea.lastIngestedAtopenSeaMetadata.lastIngestedAt
-openSeaMetada.bannerImageUrl(New in V3)
contractDeployercontractDeployer
deployedBlockNumberdeployedBlockNumber

Example Responses

V2 Example Response

[
    {
        "address": "0x1eac31a0b93e81bd093d116f5d36a83be08f381b",
        "name": "Sneakr Token",
        "symbol": "SNKR",
        "totalSupply": "326",
        "tokenType": "ERC721",
        "openSea": {
            "floorPrice": 0,
            "collectionName": "SneakrCred Drop 1: EthAIReum",
            "safelistRequestStatus": "verified",
            "imageUrl": "https://i.seadn.io/gae/7JKgjQsQP6PNiuuT6J7upfs4Iq3btwg1zFMxpzvW9ZFpGFWrf0i2H08vbG-1glj9ZY9HDUxco5z_xMWc7e_f5myd5A?w=500&auto=format",
            "description": "The first official Sneakr Drop.",
            "externalUrl": "https://www.sneakrcred.com",
            "lastIngestedAt": "2023-07-12T23:18:43.000Z"
        },
        "contractDeployer": "0xccb74148d315b0397da4e3c7482036dbadd762e5",
        "deployedBlockNumber": 9458121
    },
    {
        "address": "0x7e2a853626d75321d2b6ed060f6320324d31b7e8",
        "name": "Happy Little Hairdos",
        "symbol": "HLHD",
        "totalSupply": "240",
        "tokenType": "ERC721",
        "openSea": {
            "floorPrice": 0.05,
            "collectionName": "Happy Little Hairdos",
            "safelistRequestStatus": "approved",
            "imageUrl": "https://i.seadn.io/gae/bx3ZIky25jfqxG_ield-BWVNuWvoOLJsqm-1TPN90xVuzyLrEjROQAX_Qf2jgMb5OrCsF_OKaRWq3DEpWztPRK2DriuRMN997kar?w=500&auto=format",
            "description": "Happy Little Hairdos is a parody collection of 10,000 unique NFTs celebrating the man we all know as the painter with a Fro. Straight from the imagination & hand of artist J.J. Weinberg, what began as a Prismacolor illustration on paper in 2014 & an idea of a ☕ table ???? has found its way onto the blockchain. Weinberg is determined to push the envelope on the connection of the metaverse & the physical world. Let the #FROMO begin!\r\n\r\nDetails - www.happylittlehairdos.com\r\n\r\nHighlights\r\n\r\nArt / Print quality images 3000x3000k (Set to print at 10”x10” 300 dpi)\r\nCoffee table book featuring “Curated Cuts” & randomly chosen HLHD’s\r\nInfinite “Bob”jects\r\nEarly access to merch via the Fromo Boutique\r\n“Curated Cuts for a Cause” the rarity’s for charity on these special tokens outside of the 10K\r\nAccess to Alexander Bill’s “ART”cade\r\nSpecial token access to commissioned work by the artist & derivative license\r\nJoy of Minting mini-series\r\nSpecial thanks @cheforche - IG @jjweinberg - IG",
            "externalUrl": "https://www.happylittlehairdos.com",
            "twitterUsername": "happylittlehair",
            "discordUrl": "https://discord.gg/kWFU5xP74W",
            "lastIngestedAt": "2023-07-12T23:20:03.000Z"
        },
        "contractDeployer": "0x5582809dd5d7b8848397c6033d8a41e4b06f8ded",
        "deployedBlockNumber": 12885162
    },
    {
        "address": "0x82cb9d20862641301c987f0b096086d32bc11b65",
        "name": "AStrandOfHair",
        "symbol": "ASOH",
        "totalSupply": "10358",
        "tokenType": "ERC721",
        "openSea": {
            "floorPrice": 0,
            "collectionName": "AStrandOfHair",
            "safelistRequestStatus": "approved",
            "imageUrl": "https://i.seadn.io/gcs/files/5aa37f4f867ad6f1d5ab710f67f6cfdd.jpg?w=500&auto=format",
            "description": "It's a metaverse built by wizards. From just a strand of hair to the entire world. We are not just a meme, we are a culture strongly rooted by our community. ",
            "externalUrl": "https://astrandofhair.xyz/",
            "twitterUsername": "Hair_xyz",
            "lastIngestedAt": "2023-07-13T04:09:33.000Z"
        },
        "contractDeployer": "0xc4c2a776a352a8994be83d2ef2bb4a9604dc6e97",
        "deployedBlockNumber": 15210942
    },
    {
        "address": "0xbd5bd01e9445d24d83e8607ac0a64d71c9d36933",
        "name": "Queens+KingsHair",
        "symbol": "Q+KTH",
        "totalSupply": "3623",
        "tokenType": "ERC721",
        "openSea": {
            "floorPrice": 0.0045,
            "collectionName": "Queens+Kings Traits",
            "safelistRequestStatus": "approved",
            "imageUrl": "https://i.seadn.io/gae/0OkPiJqvKO7oAJYU7pNGp3Y2nGgCm98itXBnCa12xpEttaVw9HuUFhFNXmE0lfaQjZGpxa6N8KrZtHcX1InpNzNtaBkW8kslTwYwAQ?w=500&auto=format",
            "description": "Queens+Kings overthrow hierarchies in contemporary art and re-mint your CryptoRealm:\nCreated by Hackatao and NFT Studios, supported by Sotheby’s\n\n6,900 Queens+Kings: interchangeable NFT traits, randomly allocated and algorithmically generated. The avatars can then be hacked by the collectors, customized, disassembled and assembled on the [dedicated website](http://queenskings.hackatao.com) builder. In the cryptoverse, a non-hierarchical community is in charge, traditional roles of the art world are subverted.  Hack the Royals, let the Self-Crowning begin.  ",
            "externalUrl": "https://queenskings.hackatao.com/",
            "twitterUsername": "Hackatao",
            "discordUrl": "https://discord.gg/hackatao",
            "lastIngestedAt": "2023-07-14T19:19:37.000Z"
        },
        "contractDeployer": "0x139c8919ce2b7fb8a04f929d83b8c54c116c692b",
        "deployedBlockNumber": 13984623
    },
    {
        "address": "0xcba843509a832131eb6f72845482abd440f75dc7",
        "name": "Wind In Her Hair ",
        "symbol": "PHOTO",
        "totalSupply": "1",
        "tokenType": "ERC721",
        "openSea": {
            "floorPrice": 0,
            "collectionName": "Wind In Her Hair.",
            "safelistRequestStatus": "requested",
            "imageUrl": "https://i.seadn.io/gae/zZvfeMVYtZRk92TFIb7-ytogC7D7kbG50V_V_35yFBilinbVoZNEzHJ_wuqAzFK59BvejB0gM2SlFsVpiwWKJZNjWc0Xoytc2H-2?w=500&auto=format",
            "description": "Stories about loneliness on a lost island",
            "twitterUsername": "xeniiau",
            "lastIngestedAt": "2023-07-15T01:43:37.000Z"
        },
        "contractDeployer": "0x56e6b5de6a4e680e49bf1de3e14b2d49e51103ff",
        "deployedBlockNumber": 14423329
    },
    {
        "address": "0x55fd148b0b0df020b5cc49d00bc9b1464afd85dd",
        "name": "A Portrait Study of Hair",
        "symbol": "HAIR",
        "totalSupply": "4",
        "tokenType": "ERC721",
        "openSea": {
            "floorPrice": 0,
            "collectionName": "A Portrait Study of Hair",
            "safelistRequestStatus": "not_requested",
            "lastIngestedAt": "2023-07-09T22:59:19.000Z"
        },
        "contractDeployer": "0x3ae33a926a69aeb1ca977cec976b9e53fa84fc25",
        "deployedBlockNumber": 14230101
    }
]

V3 Example Response

{
    "contracts": [
        {
            "address": "0x1EaC31A0B93E81bd093d116f5D36a83Be08f381B",
            "name": "Sneakr Token",
            "symbol": "SNKR",
            "totalSupply": "326",
            "tokenType": "ERC721",
            "contractDeployer": "0xccB74148D315B0397dA4e3C7482036dbaDD762e5",
            "deployedBlockNumber": 9458121,
            "openSeaMetadata": {
                "floorPrice": 0,
                "collectionName": "SneakrCred Drop 1: EthAIReum",
                "collectionSlug": "sneakr-token",
                "safelistRequestStatus": "verified",
                "imageUrl": "https://i.seadn.io/gae/7JKgjQsQP6PNiuuT6J7upfs4Iq3btwg1zFMxpzvW9ZFpGFWrf0i2H08vbG-1glj9ZY9HDUxco5z_xMWc7e_f5myd5A?w=500&auto=format",
                "description": "The first official Sneakr Drop.",
                "externalUrl": "https://www.sneakrcred.com",
                "lastIngestedAt": "2023-09-09T23:18:24.000Z"
            }
        },
        {
            "address": "0x7E2A853626D75321d2B6eD060f6320324D31b7e8",
            "name": "Happy Little Hairdos",
            "symbol": "HLHD",
            "totalSupply": "241",
            "tokenType": "ERC721",
            "contractDeployer": "0x5582809Dd5d7b8848397C6033D8a41e4b06F8dEd",
            "deployedBlockNumber": 12885162,
            "openSeaMetadata": {
                "floorPrice": 0.05,
                "collectionName": "Happy Little Hairdos",
                "collectionSlug": "hlhd",
                "safelistRequestStatus": "approved",
                "imageUrl": "https://i.seadn.io/gae/bx3ZIky25jfqxG_ield-BWVNuWvoOLJsqm-1TPN90xVuzyLrEjROQAX_Qf2jgMb5OrCsF_OKaRWq3DEpWztPRK2DriuRMN997kar?w=500&auto=format",
                "description": "Happy Little Hairdos is a parody collection of 10,000 unique NFTs celebrating the man we all know as the painter with a Fro. Straight from the imagination & hand of artist J.J. Weinberg, what began as a Prismacolor illustration on paper in 2014 & an idea of a ☕ table ???? has found its way onto the blockchain. Weinberg is determined to push the envelope on the connection of the metaverse & the physical world. Let the #FROMO begin!\r\n\r\nDetails - www.happylittlehairdos.com\r\n\r\nHighlights\r\n\r\nArt / Print quality images 3000x3000k (Set to print at 10”x10” 300 dpi)\r\nCoffee table book featuring “Curated Cuts” & randomly chosen HLHD’s\r\nInfinite “Bob”jects\r\nEarly access to merch via the Fromo Boutique\r\n“Curated Cuts for a Cause” the rarity’s for charity on these special tokens outside of the 10K\r\nAccess to Alexander Bill’s “ART”cade\r\nSpecial token access to commissioned work by the artist & derivative license\r\nJoy of Minting mini-series\r\nSpecial thanks @cheforche - IG @jjweinberg - IG",
                "externalUrl": "https://www.happylittlehairdos.com",
                "twitterUsername": "happylittlehair",
                "discordUrl": "https://discord.gg/kWFU5xP74W",
                "bannerImageUrl": "https://i.seadn.io/gae/WhmKRaraSN-sWNMtKm6BIiZ95ikkJ9Ey9Q6KaVtwxpAmI7MmaOi8D6X_JrBsJBU0bY4VRmNaRDXP7jnSpBnCvrtMevqJL6UJGjhByg?w=500&auto=format",
                "lastIngestedAt": "2023-09-09T23:19:57.000Z"
            }
        },
        {
            "address": "0x82Cb9D20862641301C987f0b096086d32bC11B65",
            "name": "AStrandOfHair",
            "symbol": "ASOH",
            "totalSupply": "10358",
            "tokenType": "ERC721",
            "contractDeployer": "0xC4c2a776A352A8994be83D2ef2Bb4A9604DC6E97",
            "deployedBlockNumber": 15210942,
            "openSeaMetadata": {
                "floorPrice": 0,
                "collectionName": "AStrandOfHair",
                "collectionSlug": "astrandofhair",
                "safelistRequestStatus": "approved",
                "imageUrl": "https://i.seadn.io/gcs/files/5aa37f4f867ad6f1d5ab710f67f6cfdd.jpg?w=500&auto=format",
                "description": "It's a metaverse built by wizards. From just a strand of hair to the entire world. We are not just a meme, we are a culture strongly rooted by our community. ",
                "externalUrl": "https://astrandofhair.xyz/",
                "twitterUsername": "Hair_xyz",
                "bannerImageUrl": "https://i.seadn.io/gcs/files/3e75adaed1ac45184ea446175e8856d9.jpg?w=500&auto=format",
                "lastIngestedAt": "2023-09-10T01:35:01.000Z"
            }
        },
        {
            "address": "0xBd5BD01e9445d24D83E8607Ac0a64D71C9D36933",
            "name": "Queens+KingsHair",
            "symbol": "Q+KTH",
            "totalSupply": "3638",
            "tokenType": "ERC721",
            "contractDeployer": "0x139C8919Ce2B7fb8A04F929d83b8C54C116c692b",
            "deployedBlockNumber": 13984623,
            "openSeaMetadata": {
                "floorPrice": 0.003,
                "collectionName": "Queens+Kings Traits",
                "collectionSlug": "queenskings-traits",
                "safelistRequestStatus": "approved",
                "imageUrl": "https://i.seadn.io/gae/0OkPiJqvKO7oAJYU7pNGp3Y2nGgCm98itXBnCa12xpEttaVw9HuUFhFNXmE0lfaQjZGpxa6N8KrZtHcX1InpNzNtaBkW8kslTwYwAQ?w=500&auto=format",
                "description": "Queens+Kings overthrow hierarchies in contemporary art and re-mint your CryptoRealm:\nCreated by Hackatao and NFT Studios, supported by Sotheby’s\n\n6,900 Queens+Kings: interchangeable NFT traits, randomly allocated and algorithmically generated. The avatars can then be hacked by the collectors, customized, disassembled and assembled on the [dedicated website](http://queenskings.hackatao.com) builder. In the cryptoverse, a non-hierarchical community is in charge, traditional roles of the art world are subverted.  Hack the Royals, let the Self-Crowning begin.  ",
                "externalUrl": "https://queenskings.hackatao.com/",
                "twitterUsername": "Hackatao",
                "discordUrl": "https://discord.gg/hackatao",
                "bannerImageUrl": "https://i.seadn.io/gae/k8DXM0eWdF14zud9pr7RURMhC0_zwuEigV_oG3hy5A9HlnKkjoH4lYaPVU5-2O4qC0g46HTWTwUQhKM3ZElgaIJJgqCGcgusGWWIK8Q?w=500&auto=format",
                "lastIngestedAt": "2023-09-10T18:44:05.000Z"
            }
        },
        {
            "address": "0x57e876FaEFD30bCEF9B154812Ba4d29396308C38",
            "name": "A CHAIR IN THE SKY",
            "symbol": "SKYCHAIR",
            "totalSupply": "5",
            "tokenType": "ERC721",
            "contractDeployer": "0xaB3627317c43D394eb171170f818153B976D28A3",
            "deployedBlockNumber": 16288864,
            "openSeaMetadata": {
                "floorPrice": 0,
                "collectionName": "A CHAIR IN THE SKY",
                "collectionSlug": "a-chair-in-the-sky",
                "safelistRequestStatus": "not_requested",
                "lastIngestedAt": "2023-09-18T10:20:33.000Z"
            }
        }
    ]
}

Fetches all NFTs for a given owner and yields them in an async iterable.

This method returns the full NFT for the owner and pages through all page keys until all NFTs have been fetched. To get all NFTs without their associated metadata, use the options parameter in the request's body.

Overview of Changes

  • The openSea object in the parent contract object has been changed to openSeaMetadata in V3.
  • The collectionSlug and bannerImageUrl parameters have been added to the contract.openSeaMetadata object in V3.
  • The title parameter in V2 has been changed to a name parameter in V3.
  • The media parameter in V2 has been replaced with an image object in V3.
  • The rawMetadata.attributes parameter has been changed to raw.metadata.attributes in V3.
  • The rawMetadataobject parameter has been changed to a raw object in V3, which contains the tokenUri and metadata parameters
  • The tokenUri object in V2 has been changed to a tokenUri string parameter in the V3 response.
  • The isSpam and spamClassifications parameters for spamInfo in V2 have been added to the contract object in V3.
  • The mint object parameter has been added to the V3 response containing optional mintAddress?, blockNumber?, timestamp?, and transactionHash? parameters.
  • The collection object has been added to the V3 response containing the name, slug?, externalUrl?, and bannerImageUrl? parameters.
  • The acquiredAt object has been added to the V3 response.

Example Requests

V2 Example Request

// Imports the Alchemy SDK
const { Alchemy, Network } = require("alchemy-sdk");

// Configures the Alchemy SDK
const config = {
    apiKey: "alchemy-replit", // Replace with your API key
    network: Network.ETH_MAINNET, // Replace with your network
};

// Creates an Alchemy object instance with the config to use for making requests
const alchemy = new Alchemy(config);

const main = async () => {
    // define the owner address whose NFTs you want to fetch
    const owner = "0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8";

    // create an async generator function that uses the getNftsForOwnerIterator method
    async function getNftsForOwner() {
        try {
            let nfts = [];
            // Get the async iterable for the owner's NFTs.
            const nftsIterable = alchemy.nft.getNftsForOwnerIterator(owner);

            // Iterate over the NFTs and add them to the nfts array.
            for await (const nft of nftsIterable) {
                nfts.push(nft);
            }

            // Log the NFTs.
            console.log(nfts);
        } catch (error) {
            console.log(error);
        }
    }

    getNftsForOwner();
};

main();

V3 Example Request

Same as V2

V2 <> V3 Mapping

V2 ParameterV3 Parameter
contract.addresscontract.address
contract.namecontract.name
contract.symbolcontract.symbol
contract.tokenTypecontract.tokenType
contract.contractDeployercontract.contractDeployer
contract.deployedBlockNumbercontract.deployedBlockNumber
spamInfo.isSpamcontract.isSpam
spamInfo.classificationscontract.spamClassifications
contract.openSea.collectionNamecontract.openSeaMetadata.collectionName
-contract.openSeaMetadata.collectionSlug (New in V3)
contract.openSea.safelistRequestStatuscontract.openSeaMetadata.safelistRequestStatus
contract.openSea.imageUrlcontract.openSeaMetadata.imageUrl
contract.openSea.descriptioncontract.openSeaMetadata.description
contract.openSea.externalUrlcontract.openSeaMetadata.externalUrl
-contract.openSeaMetadata.bannerImageUrl (New in V3)
contract.openSea.lastIngestedAtcontract.openSeaMetadata.lastIngestedAt
tokenIdtokenId
tokenTypetokenType
tokenUritokenUri
titlename
descriptiondescription
rawMetadataraw
rawMetadata.metadataraw.metadata
rawMetadata.attributesraw.metadata.attributes
rawMetadata.errorraw.error
-raw.tokenUri
mediaimage
-collection (New in V3)
-mint(New in V3)
balancebalance
timeLastUpdatedtimeLastUpdated
-acquiredAt

Example Responses

V2 Example Response

[
    {
        "contract": {
            "address": "0x06012c8cf97bead5deae237070f9587f8e7a266d",
            "name": "CryptoKitties",
            "symbol": "CK",
            "totalSupply": "2022876",
            "tokenType": "ERC721",
            "openSea": {
                "floorPrice": 0.0039,
                "collectionName": "CryptoKitties",
                "safelistRequestStatus": "verified",
                "imageUrl": "https://i.seadn.io/gae/C272ZRW1RGGef9vKMePFSCeKc1Lw6U40wl9ofNVxzUxFdj84hH9xJRQNf-7wgs7W8qw8RWe-1ybKp-VKuU5D-tg?w=500&auto=format",
                "description": "CryptoKitties is a game centered around breedable, collectible, and oh-so-adorable creatures we call CryptoKitties! Each cat is one-of-a-kind and 100% owned by you; it cannot be replicated, taken away, or destroyed.",
                "externalUrl": "https://www.cryptokitties.co/",
                "twitterUsername": "CryptoKitties",
                "discordUrl": "https://discord.gg/cryptokitties",
                "lastIngestedAt": "2023-07-15T21:20:09.000Z"
            },
            "contractDeployer": "0xba52c75764d6f594735dc735be7f1830cdf58ddf",
            "deployedBlockNumber": 4605167
        },
        "tokenId": "1289657",
        "tokenType": "ERC721",
        "title": "Nala",
        "description": "",
        "timeLastUpdated": "2023-07-10T19:05:02.342Z",
        "rawMetadata": {
            "birthday": "2018-12-16T00:00:00.000Z",
            "hatched": true,
            "enhanced_cattributes": [
                {
                    "description": "spock",
                    "position": 5850,
                    "type": "pattern",
                    "kittyId": 680104
                },
                {
                    "description": "soserious",
                    "type": "mouth",
                    "kittyId": 1289657
                },
                {
                    "description": "chronic",
                    "position": 87,
                    "type": "eyes",
                    "kittyId": 468466
                },
                {
                    "description": "fox",
                    "position": 28,
                    "type": "body",
                    "kittyId": 916054
                },
                {
                    "description": "mauveover",
                    "position": 13,
                    "type": "colorprimary",
                    "kittyId": 11610
                },
                {
                    "description": "se7",
                    "position": -1,
                    "type": "secret",
                    "kittyId": 1289657
                }
            ],
            "color": "cyan",
            "created_at": "2018-12-16T08:12:41.000Z",
            "bio": "En Taro Adun! I'm Nala. I am currently trying to start my own company making berets for tripod kitties. I combine the best qualities of Ryan Gosling, Benjamin Franklin, and Raekwon. I can tell you like to get into trouble.",
            "language": "en",
            "auction": {},
            "offer": {},
            "children": [
                {
                    "generation": 14,
                    "owner": {
                        "address": "0x002781a27becd321d831d815e3fa386944b329c8"
                    },
                    "hatched": true,
                    "enhanced_cattributes": [],
                    "color": "cyan",
                    "image_url": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1290051.png",
                    "is_exclusive": false,
                    "created_at": "2018-12-16T10:31:23.000Z",
                    "is_special_edition": false,
                    "image_url_png": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1290051.png",
                    "kitty_type": "fancy",
                    "fancy_type": "Pawrula",
                    "name": "Pawrula The Bright",
                    "owner_wallet_address": "0x002781a27becd321d831d815e3fa386944b329c8",
                    "id": 1290051,
                    "is_fancy": true,
                    "wrapped": true,
                    "image_url_cdn": "https://img.cn.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1290051.png",
                    "status": {
                        "is_ready": true,
                        "cooldown": 1527648022509,
                        "is_gestating": false
                    }
                },
                {
                    "generation": 14,
                    "owner": {
                        "address": "0x65e10a29e0bf9bfda353ab3d44fe127bf2e09a4b"
                    },
                    "hatched": true,
                    "enhanced_cattributes": [
                        {
                            "description": "soserious",
                            "position": -1,
                            "type": "mouth",
                            "kittyId": 1903269
                        },
                        {
                            "description": "chronic",
                            "position": 87,
                            "type": "eyes",
                            "kittyId": 468466
                        },
                        {
                            "description": "camo",
                            "position": 1001,
                            "type": "pattern",
                            "kittyId": 680201
                        },
                        {
                            "description": "koladiviya",
                            "position": 31,
                            "type": "body",
                            "kittyId": 744561
                        },
                        {
                            "description": "mauveover",
                            "position": 13,
                            "type": "colorprimary",
                            "kittyId": 11610
                        },
                        {
                            "description": "coffee",
                            "position": -1,
                            "type": "colorsecondary",
                            "kittyId": 1903269
                        },
                        {
                            "description": "sandalwood",
                            "position": 60,
                            "type": "colortertiary",
                            "kittyId": 337860
                        },
                        {
                            "description": "doridnudibranch",
                            "position": 132,
                            "type": "coloreyes",
                            "kittyId": 680079
                        }
                    ],
                    "color": "doridnudibranch",
                    "image_url": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1903269.svg",
                    "is_exclusive": false,
                    "created_at": "2020-04-23T22:10:56.000Z",
                    "is_special_edition": false,
                    "image_url_png": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1903269.png",
                    "name": "Fressbert",
                    "owner_wallet_address": "0x65e10a29e0bf9bfda353ab3d44fe127bf2e09a4b",
                    "id": 1903269,
                    "is_fancy": false,
                    "wrapped": false,
                    "image_url_cdn": "https://img.cn.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1903269.svg",
                    "status": {
                        "is_ready": true,
                        "cooldown": 1607028977617,
                        "is_gestating": false
                    }
                }
            ],
            "id": 1289657,
            "is_fancy": false,
            "wrapped": true,
            "generation": 13,
            "owner": {
                "address": "0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8",
                "hasDapper": false
            },
            "genes": "508101394017420297960203117038449397458346282085579186181678174847507224",
            "image_url": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1289657.svg",
            "is_prestige": false,
            "is_exclusive": false,
            "is_special_edition": false,
            "purrs": {
                "count": 1,
                "is_purred": false
            },
            "image_url_png": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1289657.png",
            "hatcher": {
                "image": "5",
                "address": "0x68b42e44079d1d0a4a037e8c6ecd62c48967e69f",
                "hasDapper": false,
                "nickname": "Kitten Mittens LLC 10D 10K 10H"
            },
            "background_color": "#c5eefa",
            "name": "Nala",
            "matron": {
                "generation": 12,
                "owner": {
                    "address": "0x68b42e44079d1d0a4a037e8c6ecd62c48967e69f"
                },
                "hatched": true,
                "enhanced_cattributes": [
                    {
                        "description": "soserious",
                        "position": -1,
                        "type": "mouth",
                        "kittyId": 1289248
                    },
                    {
                        "description": "chronic",
                        "position": 87,
                        "type": "eyes",
                        "kittyId": 468466
                    },
                    {
                        "description": "camo",
                        "position": 1001,
                        "type": "pattern",
                        "kittyId": 680201
                    },
                    {
                        "description": "manul",
                        "position": 36,
                        "type": "body",
                        "kittyId": 803032
                    },
                    {
                        "description": "martian",
                        "position": 72,
                        "type": "colorprimary",
                        "kittyId": 916364
                    },
                    {
                        "description": "butterscotch",
                        "position": 13,
                        "type": "colorsecondary",
                        "kittyId": 750763
                    },
                    {
                        "description": "purplehaze",
                        "position": 28,
                        "type": "colortertiary",
                        "kittyId": 484303
                    },
                    {
                        "description": "topaz",
                        "position": -1,
                        "type": "coloreyes",
                        "kittyId": 1289248
                    }
                ],
                "color": "topaz",
                "image_url": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1289248.svg",
                "is_exclusive": false,
                "created_at": "2018-12-16T05:37:33.000Z",
                "is_special_edition": false,
                "image_url_png": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1289248.png",
                "name": "Sergeant Delibinky",
                "owner_wallet_address": "0x68b42e44079d1d0a4a037e8c6ecd62c48967e69f",
                "id": 1289248,
                "is_fancy": false,
                "wrapped": false,
                "image_url_cdn": "https://img.cn.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1289248.svg",
                "status": {
                    "is_ready": true,
                    "cooldown": 1521350296999,
                    "is_gestating": false
                }
            },
            "sire": {
                "generation": 12,
                "owner": {
                    "address": "0x68b42e44079d1d0a4a037e8c6ecd62c48967e69f"
                },
                "hatched": true,
                "enhanced_cattributes": [],
                "color": "topaz",
                "image_url": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1289336.png",
                "is_exclusive": false,
                "created_at": "2018-12-16T06:15:48.000Z",
                "is_special_edition": false,
                "image_url_png": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1289336.png",
                "kitty_type": "fancy",
                "fancy_type": "Pawrula",
                "name": "Pawrula The Bright",
                "owner_wallet_address": "0x68b42e44079d1d0a4a037e8c6ecd62c48967e69f",
                "id": 1289336,
                "is_fancy": true,
                "wrapped": false,
                "image_url_cdn": "https://img.cn.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1289336.png",
                "status": {
                    "is_ready": true,
                    "cooldown": 1521366384221,
                    "is_gestating": false
                }
            },
            "image_url_cdn": "https://img.cn.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1289657.svg",
            "watchlist": {
                "count": 0,
                "is_watchlisted": false
            },
            "status": {
                "is_ready": true,
                "cooldown_end_block": 9932251,
                "cooldown": 1571707809089,
                "dynamic_cooldown": 1595199834562,
                "cooldown_index": 8,
                "is_gestating": false
            }
        },
        "tokenUri": {
            "gateway": "https://api.cryptokitties.co/v3/kitties/1289657",
            "raw": "https://api.cryptokitties.co/v3/kitties/1289657"
        },
        "media": [
            {
                "gateway": "https://nft-cdn.alchemy.com/eth-mainnet/5bd85609cdacb4214faab3d08e13bd9f",
                "thumbnail": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/5bd85609cdacb4214faab3d08e13bd9f",
                "raw": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1289657.svg",
                "format": "svg+xml",
                "bytes": 63131
            }
        ],
        "balance": 1
    }
  ]

V3 Example Response

[
    {
        "contract": {
            "address": "0x06012c8cf97BEaD5deAe237070F9587f8E7A266d",
            "name": "CryptoKitties",
            "symbol": "CK",
            "totalSupply": "2023232",
            "tokenType": "ERC721",
            "contractDeployer": "0xba52c75764d6F594735dc735Be7F1830CDf58dDf",
            "deployedBlockNumber": 4605167,
            "openSeaMetadata": {
                "floorPrice": 0.006,
                "collectionName": "CryptoKitties",
                "collectionSlug": "cryptokitties",
                "safelistRequestStatus": "verified",
                "imageUrl": "https://i.seadn.io/gae/C272ZRW1RGGef9vKMePFSCeKc1Lw6U40wl9ofNVxzUxFdj84hH9xJRQNf-7wgs7W8qw8RWe-1ybKp-VKuU5D-tg?w=500&auto=format",
                "description": "CryptoKitties is a game centered around breedable, collectible, and oh-so-adorable creatures we call CryptoKitties! Each cat is one-of-a-kind and 100% owned by you; it cannot be replicated, taken away, or destroyed.",
                "externalUrl": "https://www.cryptokitties.co/",
                "twitterUsername": "CryptoKitties",
                "discordUrl": "https://discord.gg/cryptokitties",
                "bannerImageUrl": "https://i.seadn.io/gcs/static/banners/cryptokitties-banner2.png?w=500&auto=format",
                "lastIngestedAt": "2023-09-18T00:29:33.000Z"
            },
            "spamClassifications": []
        },
        "tokenId": "1289657",
        "tokenType": "ERC721",
        "name": "Nala",
        "tokenUri": "https://api.cryptokitties.co/v3/kitties/1289657",
        "image": {
            "cachedUrl": "https://nft-cdn.alchemy.com/eth-mainnet/5bd85609cdacb4214faab3d08e13bd9f",
            "thumbnailUrl": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/5bd85609cdacb4214faab3d08e13bd9f",
            "pngUrl": "https://res.cloudinary.com/alchemyapi/image/upload/convert-png/eth-mainnet/5bd85609cdacb4214faab3d08e13bd9f",
            "contentType": "image/svg+xml",
            "size": 63131,
            "originalUrl": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1289657.svg"
        },
        "raw": {
            "tokenUri": "https://api.cryptokitties.co/v3/kitties/1289657",
            "metadata": {
                "birthday": "2018-12-16T00:00:00.000Z",
                "hatched": true,
                "enhanced_cattributes": [
                    {
                        "description": "spock",
                        "position": 5850,
                        "type": "pattern",
                        "kittyId": 680104
                    },
                    {
                        "description": "se7",
                        "position": -1,
                        "type": "secret",
                        "kittyId": 1289657
                    }
                ],
                "color": "cyan",
                "created_at": "2018-12-16T08:12:41.000Z",
                "bio": "En Taro Adun! I'm Nala. I am currently trying to start my own company making berets for tripod kitties. I combine the best qualities of Ryan Gosling, Benjamin Franklin, and Raekwon. I can tell you like to get into trouble.",
                "language": "en",
                "auction": {},
                "offer": {},
                "children": [
                    {
                        "generation": 14,
                        "owner": {
                            "address": "0x002781a27becd321d831d815e3fa386944b329c8"
                        },
                        "hatched": true,
                        "enhanced_cattributes": [],
                        "color": "cyan",
                        "image_url": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1290051.png",
                        "is_exclusive": false,
                        "created_at": "2018-12-16T10:31:23.000Z",
                        "is_special_edition": false,
                        "image_url_png": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1290051.png",
                        "kitty_type": "fancy",
                        "fancy_type": "Pawrula",
                        "name": "Pawrula The Bright",
                        "owner_wallet_address": "0x002781a27becd321d831d815e3fa386944b329c8",
                        "id": 1290051,
                        "is_fancy": true,
                        "wrapped": true,
                        "image_url_cdn": "https://img.cn.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1290051.png",
                        "status": {
                            "is_ready": true,
                            "cooldown": 1527648022509,
                            "is_gestating": false
                        }
                    },
                    {
                        "generation": 14,
                        "owner": {
                            "address": "0x65e10a29e0bf9bfda353ab3d44fe127bf2e09a4b"
                        },
                        "hatched": true,
                        "enhanced_cattributes": [
                            {
                                "description": "soserious",
                                "position": -1,
                                "type": "mouth",
                                "kittyId": 1903269
                            },
                            {
                                "description": "doridnudibranch",
                                "position": 132,
                                "type": "coloreyes",
                                "kittyId": 680079
                            }
                        ],
                        "color": "doridnudibranch",
                        "image_url": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1903269.svg",
                        "is_exclusive": false,
                        "created_at": "2020-04-23T22:10:56.000Z",
                        "is_special_edition": false,
                        "image_url_png": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1903269.png",
                        "name": "Fressbert",
                        "owner_wallet_address": "0x65e10a29e0bf9bfda353ab3d44fe127bf2e09a4b",
                        "id": 1903269,
                        "is_fancy": false,
                        "wrapped": false,
                        "image_url_cdn": "https://img.cn.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1903269.svg",
                        "status": {
                            "is_ready": true,
                            "cooldown": 1607028977617,
                            "is_gestating": false
                        }
                    }
                ],
                "id": 1289657,
                "is_fancy": false,
                "wrapped": true,
                "generation": 13,
                "owner": {
                    "address": "0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8",
                    "hasDapper": false
                },
                "genes": "508101394017420297960203117038449397458346282085579186181678174847507224",
                "image_url": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1289657.svg",
                "is_prestige": false,
                "is_exclusive": false,
                "is_special_edition": false,
                "purrs": {
                    "count": 1,
                    "is_purred": false
                },
                "image_url_png": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1289657.png",
                "hatcher": {
                    "image": "5",
                    "address": "0x68b42e44079d1d0a4a037e8c6ecd62c48967e69f",
                    "hasDapper": false,
                    "nickname": "Kitten Mittens LLC 10D 10K 10H"
                },
                "background_color": "#c5eefa",
                "name": "Nala",
                "matron": {
                    "generation": 12,
                    "owner": {
                        "address": "0x68b42e44079d1d0a4a037e8c6ecd62c48967e69f"
                    },
                    "hatched": true,
                    "enhanced_cattributes": [
                        {
                            "description": "soserious",
                            "position": -1,
                            "type": "mouth",
                            "kittyId": 1289248
                        },
                        {
                            "description": "chronic",
                            "position": 87,
                            "type": "eyes",
                            "kittyId": 468466
                        },
                        {
                            "description": "topaz",
                            "position": -1,
                            "type": "coloreyes",
                            "kittyId": 1289248
                        }
                    ],
                    "color": "topaz",
                    "image_url": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1289248.svg",
                    "is_exclusive": false,
                    "created_at": "2018-12-16T05:37:33.000Z",
                    "is_special_edition": false,
                    "image_url_png": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1289248.png",
                    "name": "Sergeant Delibinky",
                    "owner_wallet_address": "0x68b42e44079d1d0a4a037e8c6ecd62c48967e69f",
                    "id": 1289248,
                    "is_fancy": false,
                    "wrapped": false,
                    "image_url_cdn": "https://img.cn.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1289248.svg",
                    "status": {
                        "is_ready": true,
                        "cooldown": 1521350296999,
                        "is_gestating": false
                    }
                },
                "sire": {
                    "generation": 12,
                    "owner": {
                        "address": "0x68b42e44079d1d0a4a037e8c6ecd62c48967e69f"
                    },
                    "hatched": true,
                    "enhanced_cattributes": [],
                    "color": "topaz",
                    "image_url": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1289336.png",
                    "is_exclusive": false,
                    "created_at": "2018-12-16T06:15:48.000Z",
                    "is_special_edition": false,
                    "image_url_png": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1289336.png",
                    "kitty_type": "fancy",
                    "fancy_type": "Pawrula",
                    "name": "Pawrula The Bright",
                    "owner_wallet_address": "0x68b42e44079d1d0a4a037e8c6ecd62c48967e69f",
                    "id": 1289336,
                    "is_fancy": true,
                    "wrapped": false,
                    "image_url_cdn": "https://img.cn.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1289336.png",
                    "status": {
                        "is_ready": true,
                        "cooldown": 1521366384221,
                        "is_gestating": false
                    }
                },
                "image_url_cdn": "https://img.cn.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1289657.svg",
                "watchlist": {
                    "count": 0,
                    "is_watchlisted": false
                },
                "status": {
                    "is_ready": true,
                    "cooldown_end_block": 9932251,
                    "cooldown": 1571707809089,
                    "dynamic_cooldown": 1595681023241,
                    "cooldown_index": 8,
                    "is_gestating": false
                }
            }
        },
        "collection": {
            "name": "CryptoKitties",
            "slug": "cryptokitties",
            "externalUrl": "https://www.cryptokitties.co/",
            "bannerImageUrl": "https://i.seadn.io/gcs/static/banners/cryptokitties-banner2.png?w=500&auto=format"
        },
        "mint": {},
        "timeLastUpdated": "2023-09-18T19:21:52.169Z",
        "balance": "1",
        "acquiredAt": {}
    },
    {
        "contract": {
            "address": "0xEA67b4DD7BaCAE340Bc4E43652044B5CDED1963c",
            "name": "Moonkys",
            "symbol": "MOONK",
            "totalSupply": "8968",
            "tokenType": "ERC721",
            "contractDeployer": "0x94f65107EB422c67E61588682Fcf9D85AaC940B8",
            "deployedBlockNumber": 14045176,
            "openSeaMetadata": {
                "floorPrice": 0.0019,
                "collectionName": "The MoonkysNFT",
                "collectionSlug": "the-moonkysnft",
                "safelistRequestStatus": "approved",
                "imageUrl": "https://i.seadn.io/gae/HagE-EZ6Wrf5Odw56FjtlSmfFvyEAz5Vg1p76yH-ARh_erNiiWMknrktD7mphF_9QRP_SOzx_Gmm1HrgFv9reHr6eMBxh4FWUg2j5A?w=500&auto=format",
                "description": "A collection of 9000 Moonkys!\r\nAll different, all endearing, from the jungle to the moon and beyond.",
                "externalUrl": "https://www.moonkys.art",
                "twitterUsername": "MoonkysNFT",
                "discordUrl": "https://discord.gg/8sZyt3SNUY",
                "bannerImageUrl": "https://i.seadn.io/gae/NwDkjH5GU0DsDmQUUnkHk0i6gQcil-pNMPs9su9r2V_mgsTjgBhbg1YM9450riZYsxTAE9HlbDd0R269vfTDVrCZDkN4S_m5hH-5qQ?w=500&auto=format",
                "lastIngestedAt": "2023-09-18T05:52:19.000Z"
            },
            "spamClassifications": []
        },
        "tokenId": "2378",
        "tokenType": "ERC721",
        "name": "Moonky #2378",
        "description": "A collection of 9000 randomly generated Moonkys, living on ETH Blockchain. All different, All endearing.",
        "tokenUri": "https://ipfs.io/ipfs/QmThsntJV1wZuF3HdvYWG9QkVVSW1WwU5TZrCH36skCe21/2378",
        "image": {
            "cachedUrl": "https://nft-cdn.alchemy.com/eth-mainnet/a29980483f4257bde13a28906ca87267",
            "thumbnailUrl": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/a29980483f4257bde13a28906ca87267",
            "pngUrl": "https://res.cloudinary.com/alchemyapi/image/upload/convert-png/eth-mainnet/a29980483f4257bde13a28906ca87267",
            "contentType": "image/png",
            "size": 233824,
            "originalUrl": "https://ipfs.io/ipfs/QmRmquSbLpiYRd8nCURUmP2fJ9LbaEtG3tJLGGscFp1WAT"
        },
        "raw": {
            "tokenUri": "https://ipfs.io/ipfs/QmThsntJV1wZuF3HdvYWG9QkVVSW1WwU5TZrCH36skCe21/2378",
            "metadata": {
                "name": "Moonky #2378",
                "description": "A collection of 9000 randomly generated Moonkys, living on ETH Blockchain. All different, All endearing.",
                "image": "https://ipfs.io/ipfs/QmRmquSbLpiYRd8nCURUmP2fJ9LbaEtG3tJLGGscFp1WAT",
                "attributes": [
                    {
                        "value": "Orange",
                        "trait_type": "Background"
                    },
                    {
                        "value": "Cobra Kai",
                        "trait_type": "Hat"
                    }
                ],
                "external_link": "https://www.moonkys.art"
            }
        },
        "collection": {
            "name": "The MoonkysNFT",
            "slug": "the-moonkysnft",
            "externalUrl": "https://www.moonkys.art",
            "bannerImageUrl": "https://i.seadn.io/gae/NwDkjH5GU0DsDmQUUnkHk0i6gQcil-pNMPs9su9r2V_mgsTjgBhbg1YM9450riZYsxTAE9HlbDd0R269vfTDVrCZDkN4S_m5hH-5qQ?w=500&auto=format"
        },
        "mint": {
            "mintAddress": "0xffa6c931719cf546df7e48010bde2b0fd0bfc431",
            "blockNumber": 15108732,
            "timestamp": "2022-07-09T13:47:51Z",
            "transactionHash": "0xce02924d42c0d6f1e5144bbfea8a49fc4fb0330a42782ac8c7c00b7d10b8a4c4"
        },
        "timeLastUpdated": "2023-08-01T07:40:39.116Z",
        "balance": "1",
        "acquiredAt": {}
    }
]

Fetches all NFTs for a given contract address and yields them in an async iterable.

This method returns the full NFTs in the contract and pages through all page keys until all NFTs have been fetched.

Overview of Changes

  • The openSea object in the parent contract object has been changed to openSeaMetadata in V3.
  • The collectionSlug and bannerImageUrl parameters have been added to the contract.openSeaMetadata object in V3.
  • The title parameter in V2 has been changed to a name parameter in V3.
  • The media parameter in V2 has been replaced with an image object in V3.
  • The rawMetadataobject parameter has been changed to a raw object in V3, which contains the tokenUri, error, and metadata parameters
  • The tokenUri object in V2 has been changed to a tokenUri string parameter in the V3 response.
  • The isSpam and spamClassifications parameters for spamInfo in V2 have been added to the contract object in V3.
  • The mint object parameter has been added to the V3 response containing optional mintAddress?, blockNumber?, timestamp?, and transactionHash? parameters.
  • The collection object has been added to the V3 response containing the name, slug?, externalUrl?, and bannerImageUrl? parameters.
  • The acquiredAt object has been added to the V3 response.

Example Requests

V2 Example Request

// Imports the Alchemy SDK
const { Alchemy, Network } = require("alchemy-sdk");

// Configures the Alchemy SDK
const config = {
    apiKey: "alchemy-replit", // Replace with your API key
    network: Network.ETH_MAINNET, // Replace with your network
};

// Creates an Alchemy object instance with the config to use for making requests
const alchemy = new Alchemy(config);

const main = async () => {
    // define the contract address whose NFTs you want to fetch
    const contractAddress = "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D";

    // create an async generator function that uses the getNftsForContractIterator method
    async function getNftsForContract() {
        try {
            let nfts = [];
            // Get the async iterable for the contract's NFTs.
            const nftsIterable = alchemy.nft.getNftsForContractIterator(contractAddress);

            // Iterate over the NFTs and add them to the nfts array.
            for await (const nft of nftsIterable) {
                nfts.push(nft);
            }

            // Log the NFTs.
            console.log(nfts);
        } catch (error) {
            console.log(error);
        }
    }

    // call the async generator function
    getNftsForContract();

};

main();

V3 Example Request

Same as V2

V2 <> V3 Mapping

V2 ParameterV3 Parameter
contract.addresscontract.address
contract.namecontract.name
contract.symbolcontract.symbol
contract.tokenTypecontract.tokenType
contract.contractDeployercontract.contractDeployer
contract.deployedBlockNumbercontract.deployedBlockNumber
spamInfo.isSpamcontract.isSpam
spamInfo.classificationscontract.spamClassifications
contract.openSea.collectionNamecontract.openSeaMetadata.collectionName
-contract.openSeaMetadata.collectionSlug (New in V3)
contract.openSea.safelistRequestStatuscontract.openSeaMetadata.safelistRequestStatus
contract.openSea.imageUrlcontract.openSeaMetadata.imageUrl
contract.openSea.descriptioncontract.openSeaMetadata.description
contract.openSea.externalUrlcontract.openSeaMetadata.externalUrl
-contract.openSeaMetadata.bannerImageUrl (New in V3)
contract.openSea.lastIngestedAtcontract.openSeaMetadata.lastIngestedAt
tokenIdtokenId
tokenTypetokenType
tokenUritokenUri
titlename
descriptiondescription
rawMetadataraw
rawMetadata.metadataraw.metadata
rawMetadata.attributesraw.metadata.attributes
rawMetadata.errorraw.error
-raw.tokenUri
mediaimage
-collection (New in V3)
-mint(New in V3)
timeLastUpdatedtimeLastUpdated
-acquiredAt

Example Responses

V2 Example Response

[
    {
        "contract": {
            "address": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d",
            "name": "BoredApeYachtClub",
            "symbol": "BAYC",
            "totalSupply": "10000",
            "tokenType": "ERC721",
            "openSea": {
                "floorPrice": 33.92,
                "collectionName": "Bored Ape Yacht Club",
                "safelistRequestStatus": "verified",
                "imageUrl": "https://i.seadn.io/gae/Ju9CkWtV-1Okvf45wo8UctR-M9He2PjILP0oOvxE89AyiPPGtrR3gysu1Zgy0hjd2xKIgjJJtWIc0ybj4Vd7wv8t3pxDGHoJBzDB?w=500&auto=format",
                "description": "The Bored Ape Yacht Club is a collection of 10,000 unique Bored Ape NFTs— unique digital collectibles living on the Ethereum blockchain. Your Bored Ape doubles as your Yacht Club membership card, and grants access to members-only benefits, the first of which is access to THE BATHROOM, a collaborative graffiti board. Future areas and perks can be unlocked by the community through roadmap activation. Visit www.BoredApeYachtClub.com for more details.",
                "externalUrl": "http://www.boredapeyachtclub.com/",
                "twitterUsername": "BoredApeYC",
                "discordUrl": "https://discord.gg/3P5K3dzgdB",
                "lastIngestedAt": "2023-07-21T02:53:34.000Z"
            },
            "contractDeployer": "0xaba7161a7fb69c88e16ed9f455ce62b791ee4d03",
            "deployedBlockNumber": 12287507
        },
        "tokenId": "0",
        "tokenType": "ERC721",
        "title": "",
        "description": "",
        "timeLastUpdated": "2023-07-20T00:59:03.382Z",
        "rawMetadata": {
            "image": "ipfs://QmRRPWG96cmgTn2qSzjwr2qvfNEuhunv6FNeMFGa9bx6mQ",
            "attributes": [
                {
                    "value": "Silver Hoop",
                    "trait_type": "Earring"
                },
                {
                    "value": "X Eyes",
                    "trait_type": "Eyes"
                }
            ]
        },
        "tokenUri": {
            "gateway": "https://alchemy.mypinata.cloud/ipfs/QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/0",
            "raw": "ipfs://QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/0"
        },
        "media": [
            {
                "gateway": "https://nft-cdn.alchemy.com/eth-mainnet/415d618f5fef7bfe683e02d4653c4289",
                "thumbnail": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/415d618f5fef7bfe683e02d4653c4289",
                "raw": "ipfs://QmRRPWG96cmgTn2qSzjwr2qvfNEuhunv6FNeMFGa9bx6mQ",
                "format": "png",
                "bytes": 133270
            }
        ]
    },
    {
        "contract": {
            "address": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d",
            "name": "BoredApeYachtClub",
            "symbol": "BAYC",
            "totalSupply": "10000",
            "tokenType": "ERC721",
            "openSea": {
                "floorPrice": 33.92,
                "collectionName": "Bored Ape Yacht Club",
                "safelistRequestStatus": "verified",
                "imageUrl": "https://i.seadn.io/gae/Ju9CkWtV-1Okvf45wo8UctR-M9He2PjILP0oOvxE89AyiPPGtrR3gysu1Zgy0hjd2xKIgjJJtWIc0ybj4Vd7wv8t3pxDGHoJBzDB?w=500&auto=format",
                "description": "The Bored Ape Yacht Club is a collection of 10,000 unique Bored Ape NFTs— unique digital collectibles living on the Ethereum blockchain. Your Bored Ape doubles as your Yacht Club membership card, and grants access to members-only benefits, the first of which is access to THE BATHROOM, a collaborative graffiti board. Future areas and perks can be unlocked by the community through roadmap activation. Visit www.BoredApeYachtClub.com for more details.",
                "externalUrl": "http://www.boredapeyachtclub.com/",
                "twitterUsername": "BoredApeYC",
                "discordUrl": "https://discord.gg/3P5K3dzgdB",
                "lastIngestedAt": "2023-07-21T02:53:34.000Z"
            },
            "contractDeployer": "0xaba7161a7fb69c88e16ed9f455ce62b791ee4d03",
            "deployedBlockNumber": 12287507
        },
        "tokenId": "9999",
        "tokenType": "ERC721",
        "title": "",
        "description": "",
        "timeLastUpdated": "2023-07-18T12:25:10.309Z",
        "rawMetadata": {
            "image": "ipfs://QmejYePrutbfWEV8wA3ogTHi2cf2j6hoaPhZSc6vNE43nH",
            "attributes": [
                {
                    "value": "Army Hat",
                    "trait_type": "Hat"
                },
                {
                    "value": "Scumbag",
                    "trait_type": "Eyes"
                }
            ]
        },
        "tokenUri": {
            "gateway": "https://ipfs.io/ipfs/QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/9999",
            "raw": "ipfs://QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/9999"
        },
        "media": [
            {
                "gateway": "https://nft-cdn.alchemy.com/eth-mainnet/4b5307d8d2a9d044b659f4eecf3e018e",
                "thumbnail": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/4b5307d8d2a9d044b659f4eecf3e018e",
                "raw": "ipfs://QmejYePrutbfWEV8wA3ogTHi2cf2j6hoaPhZSc6vNE43nH",
                "format": "png",
                "bytes": 135967
            }
        ]
    }
]

V3 Example Response

[
    {
    "contract": {
        "address": "0xe785E82358879F061BC3dcAC6f0444462D4b5330",
        "name": "World Of Women",
        "symbol": "WOW",
        "totalSupply": "10000",
        "tokenType": "ERC721",
        "contractDeployer": "0xc9b6321dc216D91E626E9BAA61b06B0E4d55bdb1",
        "deployedBlockNumber": 12907782,
        "openSeaMetadata": {
            "floorPrice": 0.6021,
            "collectionName": "World of Women",
            "collectionSlug": "world-of-women-nft",
            "safelistRequestStatus": "verified",
            "imageUrl": "https://i.seadn.io/gcs/files/8604de2d9aaec98dd389e3af1b1a14b6.gif?w=500&auto=format",
            "description": "World of Women is a collection of 10,000 NFTs that gives you full access to our network of artists, creators, entrepreneurs, and executives who are championing diversity and equal opportunity on the blockchain.\n\nCreated and illustrated by Yam Karkai (@ykarkai), World of Women has made prominent appearances at Christie's, The New Yorker and Billboard.\n\nJoin us to receive exclusive access to NFT drops, experiences, and much more.\n\nThe Time is WoW.",
            "externalUrl": "http://worldofwomen.art",
            "twitterUsername": "worldofwomennft",
            "discordUrl": "https://discord.gg/worldofwomen",
            "bannerImageUrl": "https://i.seadn.io/gae/GHhptRLebBOWOy8kfXpYCVqsqdes-1-6I_jbuRnGTHHW6TD63CtciH75Dotfu2u8v6EmkWt-tjhkFRVLxRUwgMfKqqy5W24AolJayeo?w=500&auto=format",
            "lastIngestedAt": "2023-09-18T12:28:27.000Z"
        },
        "spamClassifications": []
    },
    "tokenId": "44",
    "tokenType": "ERC721",
    "name": "WoW #44",
    "tokenUri": "https://alchemy.mypinata.cloud/ipfs/QmTNBQDbggLZdKF1fRgWnXsnRikd52zL5ciNu769g9JoUP/44",
    "image": {
        "cachedUrl": "https://nft-cdn.alchemy.com/eth-mainnet/9316855d8f60a32cd44aa71f07cd7dc1",
        "thumbnailUrl": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/9316855d8f60a32cd44aa71f07cd7dc1",
        "pngUrl": "https://res.cloudinary.com/alchemyapi/image/upload/convert-png/eth-mainnet/9316855d8f60a32cd44aa71f07cd7dc1",
        "contentType": "image/png",
        "size": 105117,
        "originalUrl": "https://ipfs.io/ipfs/QmUkdJKCsV8ixm2eDLJGosH8Bntwwx942YXxfuF9yXPBzi"
    },
    "raw": {
        "tokenUri": "ipfs://QmTNBQDbggLZdKF1fRgWnXsnRikd52zL5ciNu769g9JoUP/44",
        "metadata": {
            "name": "WoW #44",
            "image": "ipfs://QmUkdJKCsV8ixm2eDLJGosH8Bntwwx942YXxfuF9yXPBzi",
            "attributes": [
                {
                    "value": "Green Orange",
                    "trait_type": "Background"
                },
                {
                    "value": "Purple",
                    "trait_type": "Lips Color"
                }
            ]
        }
    },
    "collection": {
        "name": "World of Women",
        "slug": "world-of-women-nft",
        "externalUrl": "http://worldofwomen.art",
        "bannerImageUrl": "https://i.seadn.io/gae/GHhptRLebBOWOy8kfXpYCVqsqdes-1-6I_jbuRnGTHHW6TD63CtciH75Dotfu2u8v6EmkWt-tjhkFRVLxRUwgMfKqqy5W24AolJayeo?w=500&auto=format"
    },
    "mint": {},
    "timeLastUpdated": "2023-09-18T13:25:41.833Z"
 }
]

Get the NFT collection metadata associated with the provided parameters.

Overview of Changes

  • The openSea object in the response structure has been renamed to openSeaMetadata in the V3 response.
  • The collectionSlug and bannerImageUrl have been added to the openSeaMetadata object in the V3 response.

Example Requests

V2 Example Request

// Imports the Alchemy SDK
const { Alchemy, Network } = require("alchemy-sdk");

// Configures the Alchemy SDK
const config = {
    apiKey: "alchemy-replit", // Replace with your API key
    network: Network.ETH_MAINNET, // Replace with your network
};

// Creates an Alchemy object instance with the config to use for making requests
const alchemy = new Alchemy(config);

const main = async () => {
    // define the address whose contract metadata you want to fetch
    const address = "0x61fce80d72363b731425c3a2a46a1a5fed9814b2";

    //Call the method to fetch metadata
    const response = await alchemy.nft.getContractMetadata(address)

    //Logging the response to the console
    console.log(response)
}

main();

V3 Example Request

Same as V2

V2 <> V3 Mapping

V2 ParameterV3 Parameter
addressaddress
namename
symbolsymbol
totalSupplytotalSupply
tokenTypetokenType
openSea.floorPriceopenSeaMetadata.floorPrice
openSea.collectionNameopenSeaMetadata.collectionName
-openSeaMetadata.collectionSlug(New in V3)
openSea.safelistRequestStatusopenSeaMetadata.safelistRequestStatus
openSea.imageUrlopenSeaMetadata.imageUrl
openSea.descriptionopenSeaMetadata.description
openSea.externalUrlopenSeaMetadata.externalUrl
openSea.twitterUsernameopenSeaMetadata.twitterUsername
openSea.discordUrlopenSeaMetadata.discordUrl
-openSeaMetadata.bannerImageUrl(New in V3)
openSea.lastIngestedAtopenSeaMetadata.lastIngestedAt
contractDeployercontractDeployer
deployedBlockNumberdeployedBlockNumber

Example Responses

V2 Example Response

{
    "address": "0x61fce80d72363b731425c3a2a46a1a5fed9814b2",
    "name": "CyborgMercenariesCm",
    "symbol": "CYBORG",
    "totalSupply": "8039",
    "tokenType": "ERC1155",
    "openSea": {
        "floorPrice": 0.001,
        "collectionName": "Undead Warriors",
        "safelistRequestStatus": "verified",
        "imageUrl": "https://i.seadn.io/gcs/files/6cd7bec4ad4b280adb53c33c815bd3dc.png?w=500&auto=format",
        "description": "Core Team\nhttps://opensea.io/theseansneed | https://opensea.io/W3-Freedom | https://opensea.io/Xc4libur\nUndead Warriors are a collection of NFTs powered by the Undead Coin (UDC) battling the most difficult challenges in the E-Gaming and Web 3 space.\n\n",
        "externalUrl": "http://undeadwarriors.io",
        "twitterUsername": "undead_warriors",
        "discordUrl": "https://discord.gg/qjZbJMPS86",
        "lastIngestedAt": "2023-07-21T11:02:08.000Z"
    },
    "contractDeployer": "0xd32bb311467060cec58cd6e9b37134ca6d81377f",
    "deployedBlockNumber": 13950908
}

V3 Example Response

{
    "address": "0x61fcE80D72363B731425c3A2A46a1A5fed9814B2",
    "name": "CyborgMercenariesCm",
    "symbol": "CYBORG",
    "totalSupply": "8039",
    "tokenType": "ERC1155",
    "contractDeployer": "0xd32bB311467060ceC58Cd6e9b37134CA6d81377F",
    "deployedBlockNumber": 13950908,
    "openSeaMetadata": {
        "floorPrice": 0.001,
        "collectionName": "Undead Warriors",
        "collectionSlug": "undeadwarriors",
        "safelistRequestStatus": "verified",
        "imageUrl": "https://i.seadn.io/gcs/files/6cd7bec4ad4b280adb53c33c815bd3dc.png?w=500&auto=format",
        "description": "Core Team\nhttps://opensea.io/theseansneed | https://opensea.io/W3-Freedom | https://opensea.io/Xc4libur\nUndead Warriors are a collection of NFTs powered by the Undead Coin (UDC) battling the most difficult challenges in the E-Gaming and Web 3 space.\n\n",
        "externalUrl": "http://undeadwarriors.io",
        "twitterUsername": "undead_warriors",
        "discordUrl": "https://discord.gg/qjZbJMPS86",
        "bannerImageUrl": "https://i.seadn.io/gcs/files/bbb358656434031a1b9c27873a72b13e.png?w=500&auto=format",
        "lastIngestedAt": "2023-09-17T10:13:28.000Z"
    }
}

Get all NFTs for a given contract address.

This method returns the full NFTs in the contract. To get all NFTs without their associated metadata, use the options parameter.

Overview of Changes

  • The openSea object in the parent contract object has been changed to openSeaMetadata in the V3 response.
  • The collectionSlug and bannerImageUrl parameters have been added to the contract.openSeaMetadata object in V3.
  • The title parameter in V2 has been changed to a name parameter in V3.
  • The media parameter in V2 has been replaced with an image object in V3.
  • The rawMetadataobject parameter has been changed to a raw object in V3, which contains the tokenUri, metadata, and error parameters.
  • The tokenUri object in V2 has been changed to a tokenUri string parameter in the V3 response.
  • The isSpam and spamClassifications parameters for spamInfo in V2 has been added to the contract object in V3.
  • The mint object parameter has been added to the V3 response containing optional mintAddress?, blockNumber?, timestamp?, and transactionHash? parameters.
  • The collection object has been added to the V3 response containing the name, slug?, externalUrl?, and bannerImageUrl? parameters.
  • The acquiredAt object has been added to the V3 response.

Example Requests

V2 Example Request

// Imports the Alchemy SDK
const { Alchemy, Network } = require("alchemy-sdk");

// Configures the Alchemy SDK
const config = {
    apiKey: "alchemy-replit", // Replace with your API key
    network: Network.ETH_MAINNET, // Replace with your network
};

// Creates an Alchemy object instance with the config to use for making requests
const alchemy = new Alchemy(config);

const main = async () => {
    // define the contract address whose NFTs you want to fetch
    const address = "0x61fce80d72363b731425c3a2a46a1a5fed9814b2";

    //Call the method to fetch metadata
    const response = await alchemy.nft.getNftsForContract(address)

    //Logging the response to the console
    console.log(response)
}

main();

V3 Example Request

Same as V2

V2 <> V3 Mapping

V2 ParameterV3 Parameter
contract.addresscontract.address
contract.namecontract.name
contract.symbolcontract.symbol
contract.tokenTypecontract.tokenType
contract.contractDeployercontract.contractDeployer
contract.deployedBlockNumbercontract.deployedBlockNumber
spamInfo.isSpamcontract.isSpam
spamInfo.classificationscontract.spamClassifications
contract.openSea.collectionNamecontract.openSeaMetadata.collectionName
-contract.openSeaMetadata.collectionSlug (New in V3)
contract.openSea.safelistRequestStatuscontract.openSeaMetadata.safelistRequestStatus
contract.openSea.imageUrlcontract.openSeaMetadata.imageUrl
contract.openSea.descriptioncontract.openSeaMetadata.description
contract.openSea.externalUrlcontract.openSeaMetadata.externalUrl
-contract.openSeaMetadata.bannerImageUrl (New in V3)
contract.openSea.lastIngestedAtcontract.openSeaMetadata.lastIngestedAt
tokenIdtokenId
tokenTypetokenType
tokenUritokenUri
titlename
descriptiondescription
rawMetadataraw
rawMetadata.metadataraw.metadata
rawMetadata.attributesraw.metadata.attributes
rawMetadata.errorraw.error
-raw.tokenUri
mediaimage
-collection (New in V3)
-mint(New in V3)
timeLastUpdatedtimeLastUpdated
-acquiredAt
pageKeypageKey

Example Responses

V2 Example Response

{
    "nfts": [
        {
            "contract": {
                "address": "0x61fce80d72363b731425c3a2a46a1a5fed9814b2",
                "name": "CyborgMercenariesCm",
                "symbol": "CYBORG",
                "totalSupply": "8039",
                "tokenType": "ERC1155",
                "openSea": {
                    "floorPrice": 0.001,
                    "collectionName": "Undead Warriors",
                    "safelistRequestStatus": "verified",
                    "imageUrl": "https://i.seadn.io/gcs/files/6cd7bec4ad4b280adb53c33c815bd3dc.png?w=500&auto=format",
                    "description": "Core Team\nhttps://opensea.io/theseansneed | https://opensea.io/W3-Freedom | https://opensea.io/Xc4libur\nUndead Warriors are a collection of NFTs powered by the Undead Coin (UDC) battling the most difficult challenges in the E-Gaming and Web 3 space.\n\n",
                    "externalUrl": "http://undeadwarriors.io",
                    "twitterUsername": "undead_warriors",
                    "discordUrl": "https://discord.gg/qjZbJMPS86",
                    "lastIngestedAt": "2023-07-21T11:02:08.000Z"
                },
                "contractDeployer": "0xd32bb311467060cec58cd6e9b37134ca6d81377f",
                "deployedBlockNumber": 13950908
            },
            "tokenId": "0",
            "tokenType": "ERC1155",
            "title": "Undead Warrior #0",
            "description": "Undead Warriors are a collection of NFTs powered by the Undead Coin (UDC) battling the most difficult challenges in the E-Gaming and Web 3 space.",
            "timeLastUpdated": "2023-07-12T06:28:38.764Z",
            "rawMetadata": {
                "date": 1659652582322,
                "image": "ipfs://QmeNdyrTRGyVr6YvXPZHy1DPtwq3V8zZGzkzU145r5xcqa/0.png",
                "website": "https://undeadwarriors.io",
                "dna": "d297klq0913j20c9l51nw51m2h68hgvfa539ut10",
                "name": "Undead Warrior #0",
                "description": "Undead Warriors are a collection of NFTs powered by the Undead Coin (UDC) battling the most difficult challenges in the E-Gaming and Web 3 space.",
                "edition": 0,
                "attributes": [
                    {
                        "value": "PastHistory",
                        "trait_type": "Background"
                    },
                    {
                        "value": "Security",
                        "trait_type": "Rank"
                    }
                ],
                "compiler": "Black Badge: V.01A"
            },
            "tokenUri": {
                "gateway": "https://ipfs.io/ipfs/QmSodrnHXf2sd3Cd61tzNdn7MpaHqe116KvGx2NS8Qzg1i/0",
                "raw": "ipfs://QmSodrnHXf2sd3Cd61tzNdn7MpaHqe116KvGx2NS8Qzg1i/0"
            },
            "media": [
                {
                    "gateway": "https://nft-cdn.alchemy.com/eth-mainnet/a31b9e2703540f70e3c15478d449162b",
                    "thumbnail": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/a31b9e2703540f70e3c15478d449162b",
                    "raw": "ipfs://QmeNdyrTRGyVr6YvXPZHy1DPtwq3V8zZGzkzU145r5xcqa/0.png",
                    "format": "png",
                    "bytes": 1458749
                }
            ]
        },
        {
            "contract": {
                "address": "0x61fce80d72363b731425c3a2a46a1a5fed9814b2",
                "name": "CyborgMercenariesCm",
                "symbol": "CYBORG",
                "totalSupply": "8039",
                "tokenType": "ERC1155",
                "openSea": {
                    "floorPrice": 0.001,
                    "collectionName": "Undead Warriors",
                    "safelistRequestStatus": "verified",
                    "imageUrl": "https://i.seadn.io/gcs/files/6cd7bec4ad4b280adb53c33c815bd3dc.png?w=500&auto=format",
                    "description": "Core Team\nhttps://opensea.io/theseansneed | https://opensea.io/W3-Fr,\n\n",
                    "externalUrl": "http://undeadwarriors.io",
                    "twitterUsername": "undead_warriors",
                    "discordUrl": "https://discord.gg/qjZbJMPS86",
                    "lastIngestedAt": "2023-07-21T11:02:08.000Z"
                },
                "contractDeployer": "0xd32bb311467060cec58cd6e9b37134ca6d81377f",
                "deployedBlockNumber": 13950908
            },
            "tokenId": "353",
            "tokenType": "ERC1155",
            "title": "Undead Warrior #353",
            "description": "Undead Warriors in the E-Gaming and Web 3 space.",
            "timeLastUpdated": "2023-07-12T06:32:38.722Z",
            "rawMetadata": {
                "date": 1659653043027,
                "image": "ipfs://QmeNdyrTRGyVr6YvXPZHy1DPtwq3V8zZGzkzU145r5xcqa/353.png",
                "website": "https://undeadwarriors.io",
                "dna": "aa09f30b73d7fa23c636ff2734f9e7b48d2ce1b1",
                "name": "Undead Warrior #353",
                "description": "Undead Warriors are a collection of NFTs powered by the Undead Coin (UDC) battling the most difficult challenges in the E-Gaming and Web 3 space.",
                "edition": 353,
                "attributes": [
                    {
                        "value": "LaunchBay",
                        "trait_type": "Background"
                    },
                    {
                        "value": "Warrior",
                        "trait_type": "Rank"
                    }
                ],
                "compiler": "Black Badge: V.01A"
            },
            "tokenUri": {
                "gateway": "https://ipfs.io/ipfs/QmSodrnHXf2sd3Cd61tzNdn7MpaHqe116KvGx2NS8Qzg1i/353",
                "raw": "ipfs://QmSodrnHXf2sd3Cd61tzNdn7MpaHqe116KvGx2NS8Qzg1i/353"
            },
            "media": [
                {
                    "gateway": "https://nft-cdn.alchemy.com/eth-mainnet/f72c8a8a4aa69dc8ac340a619289451f",
                    "thumbnail": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/f72c8a8a4aa69dc8ac340a619289451f",
                    "raw": "ipfs://QmeNdyrTRGyVr6YvXPZHy1DPtwq3V8zZGzkzU145r5xcqa/353.png",
                    "format": "png",
                    "bytes": 1645083
                }
            ]
        }
    ],
    "pageKey": "0x0162"
}

V3 Example Response

{
    "nfts": [
        {
            "contract": {
                "address": "0x61fcE80D72363B731425c3A2A46a1A5fed9814B2",
                "name": "CyborgMercenariesCm",
                "symbol": "CYBORG",
                "totalSupply": "8039",
                "tokenType": "ERC1155",
                "contractDeployer": "0xd32bB311467060ceC58Cd6e9b37134CA6d81377F",
                "deployedBlockNumber": 13950908,
                "openSeaMetadata": {
                    "floorPrice": 0.001,
                    "collectionName": "Undead Warriors",
                    "collectionSlug": "undeadwarriors",
                    "safelistRequestStatus": "verified",
                    "imageUrl": "https://i.seadn.io/gcs/files/6cd7bec4ad4b280adb53c33c815bd3dc.png?w=500&auto=format",
                    "description": "Core Team\nhttps://opensea.io/theseansneed | https://opensea.io/W3-Freedom | https://opensea.io/Xc4libur\nUndead Warriors are a collection of NFTs powered by the Undead Coin (UDC) battling the most difficult challenges in the E-Gaming and Web 3 space.\n\n",
                    "externalUrl": "http://undeadwarriors.io",
                    "twitterUsername": "undead_warriors",
                    "discordUrl": "https://discord.gg/qjZbJMPS86",
                    "bannerImageUrl": "https://i.seadn.io/gcs/files/bbb358656434031a1b9c27873a72b13e.png?w=500&auto=format",
                    "lastIngestedAt": "2023-09-17T10:13:28.000Z"
                },
                "spamClassifications": []
            },
            "tokenId": "0",
            "tokenType": "ERC1155",
            "name": "Undead Warrior #0",
            "description": "Undead Warriors are a collection of NFTs powered by the Undead Coin (UDC) battling the most difficult challenges in the E-Gaming and Web 3 space.",
            "tokenUri": "https://ipfs.io/ipfs/QmSodrnHXf2sd3Cd61tzNdn7MpaHqe116KvGx2NS8Qzg1i/0",
            "image": {
                "cachedUrl": "https://nft-cdn.alchemy.com/eth-mainnet/a31b9e2703540f70e3c15478d449162b",
                "thumbnailUrl": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/a31b9e2703540f70e3c15478d449162b",
                "pngUrl": "https://res.cloudinary.com/alchemyapi/image/upload/convert-png/eth-mainnet/a31b9e2703540f70e3c15478d449162b",
                "contentType": "image/png",
                "size": 1458749,
                "originalUrl": "https://ipfs.io/ipfs/QmeNdyrTRGyVr6YvXPZHy1DPtwq3V8zZGzkzU145r5xcqa/0.png"
            },
            "raw": {
                "tokenUri": "ipfs://QmSodrnHXf2sd3Cd61tzNdn7MpaHqe116KvGx2NS8Qzg1i/0",
                "metadata": {
                    "date": 1659652582322,
                    "image": "ipfs://QmeNdyrTRGyVr6YvXPZHy1DPtwq3V8zZGzkzU145r5xcqa/0.png",
                    "website": "https://undeadwarriors.io",
                    "dna": "d297klq0913j20c9l51nw51m2h68hgvfa539ut10",
                    "name": "Undead Warrior #0",
                    "description": "Undead Warriors are a collection of NFTs powered by the Undead Coin (UDC) battling the most difficult challenges in the E-Gaming and Web 3 space.",
                    "edition": 0,
                    "attributes": [
                        {
                            "value": "PastHistory",
                            "trait_type": "Background"
                        },
                        {
                            "value": "Security",
                            "trait_type": "Rank"
                        }
                    ],
                    "compiler": "Black Badge: V.01A"
                }
            },
            "collection": {
                "name": "Undead Warriors",
                "slug": "undeadwarriors",
                "externalUrl": "http://undeadwarriors.io",
                "bannerImageUrl": "https://i.seadn.io/gcs/files/bbb358656434031a1b9c27873a72b13e.png?w=500&auto=format"
            },
            "mint": {},
            "timeLastUpdated": "2023-09-17T09:58:57.133Z"
        },
        {
            "contract": {
                "address": "0x61fcE80D72363B731425c3A2A46a1A5fed9814B2",
                "name": "CyborgMercenariesCm",
                "symbol": "CYBORG",
                "totalSupply": "8039",
                "tokenType": "ERC1155",
                "contractDeployer": "0xd32bB311467060ceC58Cd6e9b37134CA6d81377F",
                "deployedBlockNumber": 13950908,
                "openSeaMetadata": {
                    "floorPrice": 0.001,
                    "collectionName": "Undead Warriors",
                    "collectionSlug": "undeadwarriors",
                    "safelistRequestStatus": "verified",
                    "imageUrl": "https://i.seadn.io/gcs/files/6cd7bec4ad4b280adb53c33c815bd3dc.png?w=500&auto=format",
                    "description": "Core Team\nhttps://opensea.io/theseansneed | https://opensea.io/W3-Freedom | https://opensea.io/Xc4libur\nUndead Warriors are a collection of NFTs powered by the Undead Coin (UDC) battling the most difficult challenges in the E-Gaming and Web 3 space.\n\n",
                    "externalUrl": "http://undeadwarriors.io",
                    "twitterUsername": "undead_warriors",
                    "discordUrl": "https://discord.gg/qjZbJMPS86",
                    "bannerImageUrl": "https://i.seadn.io/gcs/files/bbb358656434031a1b9c27873a72b13e.png?w=500&auto=format",
                    "lastIngestedAt": "2023-09-17T10:13:28.000Z"
                },
                "spamClassifications": []
            },
            "tokenId": "353",
            "tokenType": "ERC1155",
            "name": "Undead Warrior #353",
            "description": "Undead Warriors are a collection of NFTs powered by the Undead Coin (UDC) battling the most difficult challenges in the E-Gaming and Web 3 space.",
            "tokenUri": "https://ipfs.io/ipfs/QmSodrnHXf2sd3Cd61tzNdn7MpaHqe116KvGx2NS8Qzg1i/353",
            "image": {
                "cachedUrl": "https://nft-cdn.alchemy.com/eth-mainnet/f72c8a8a4aa69dc8ac340a619289451f",
                "thumbnailUrl": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/f72c8a8a4aa69dc8ac340a619289451f",
                "pngUrl": "https://res.cloudinary.com/alchemyapi/image/upload/convert-png/eth-mainnet/f72c8a8a4aa69dc8ac340a619289451f",
                "contentType": "image/png",
                "size": 1645083,
                "originalUrl": "https://ipfs.io/ipfs/QmeNdyrTRGyVr6YvXPZHy1DPtwq3V8zZGzkzU145r5xcqa/353.png"
            },
            "raw": {
                "tokenUri": "ipfs://QmSodrnHXf2sd3Cd61tzNdn7MpaHqe116KvGx2NS8Qzg1i/353",
                "metadata": {
                    "date": 1659653043027,
                    "image": "ipfs://QmeNdyrTRGyVr6YvXPZHy1DPtwq3V8zZGzkzU145r5xcqa/353.png",
                    "website": "https://undeadwarriors.io",
                    "dna": "aa09f30b73d7fa23c636ff2734f9e7b48d2ce1b1",
                    "name": "Undead Warrior #353",
                    "description": "Undead Warriors are a collection of NFTs powered by the Undead Coin (UDC) battling the most difficult challenges in the E-Gaming and Web 3 space.",
                    "edition": 353,
                    "attributes": [
                        {
                            "value": "LaunchBay",
                            "trait_type": "Background"
                        },
                        {
                            "value": "Warrior",
                            "trait_type": "Rank"
                        }
                    ],
                    "compiler": "Black Badge: V.01A"
                }
            },
            "collection": {
                "name": "Undead Warriors",
                "slug": "undeadwarriors",
                "externalUrl": "http://undeadwarriors.io",
                "bannerImageUrl": "https://i.seadn.io/gcs/files/bbb358656434031a1b9c27873a72b13e.png?w=500&auto=format"
            },
            "mint": {},
            "timeLastUpdated": "2023-09-21T12:33:14.542Z"
        }
    ],
    "pageKey": "0x0162"
}

The getTransfersForOwner method gets all NFT transfers for a given owner address.

Overview of Changes

  • The openSea object in the parent contract object has been changed to openSeaMetadata in the V3 response.
  • The collectionSlug and bannerImageUrl parameters have been added to the contract.openSeaMetadata object in V3.
  • The title parameter in V2 has been changed to a name parameter in V3.
  • The media parameter in V2 has been replaced with an image object in V3.
  • The rawMetadataobject parameter has been changed to a raw object in V3, which contains the tokenUri, error, and metadata parameters
  • The tokenUri object in V2 has been changed to a tokenUri string parameter in the V3 response.
  • The isSpam and spamClassifications parameters for spamInfo in V2 has been added to the contract object in V3.
  • The mint object parameter has been added to the V3 response containing optional mintAddress?, blockNumber?, timestamp?, and transactionHash? parameters.
  • The collection object has been added to the V3 response containing the name, slug?, externalUrl?, and bannerImageUrl? parameters.
  • The acquiredAt object has been added to the V3 response.

Example Requests

V2 Example Request

// Imports the Alchemy SDK
const { Alchemy, Network } = require("alchemy-sdk");

// Configures the Alchemy SDK
const config = {
  apiKey: "demo", // Replace with your API key
  network: Network.ETH_MAINNET, // Replace with your network
};

// Creates an Alchemy object instance with the config to use for making requests
const alchemy = new Alchemy(config);

// Example of using the new getTransfersForOwner method
const main = async () => {
  // The owner address to get transfers for
  let address = "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8";

  // Whether to get transfers TO or FROM the owner address. (Optional)
  let category = "FROM";

  // Additional options for the request. (Optional)
  let options = {
    /**
     * List of NFT contract addresses to filter mints by. If omitted, defaults to
     * all contract addresses.
     */
    contractAddresses: ["0x1F02bF9dDe7C79137a08B2Dd4FC964BfD2499734"],
    /**
     * Filter mints by ERC721 vs ERC1155 contracts. If omitted, defaults to all
     * NFTs.
     */
    tokenType: "ERC721",
  };

  // Calling the getTransfersForOwner method
  let transfers = await alchemy.nft.getTransfersForOwner(
    address,
    category,
    options
  );

  // Logging the response to the console
  console.log(transfers);
};

main();

V3 Example Request

Same as V2.

V2 <> V3 Mapping

V2 ParameterV3 Parameter
contract.addresscontract.address
contract.namecontract.name
contract.symbolcontract.symbol
contract.totalSupplycontract.totalSupply
contract.tokenTypecontract.tokenType
contract.openSea.floorPricecontract.openSeaMetadata.floorPrice
contract.openSea.collectionNamecontract.openSeaMetadata.collectionName
-contract.openSeaMetadata.collectionSlug(New in V3)
contract.openSea.safelistRequestStatuscontract.openSeaMetadata.safelistRequestStatus
contract.openSea.imageUrlcontract.openSeaMetadata.imageUrl
contract.openSea.descriptioncontract.openSeaMetadata.description
contract.openSea.externalUrlcontract.openSeaMetadata.externalUrl
contract.openSea.twitterUsernamecontract.openSeaMetadata.twitterUsername
contract.openSea.discordUrlcontract.openSeaMetadata.discordUrl
-contract.openSeaMetadata.bannerImageUrl(New in V3)
contract.openSea.lastIngestedAtcontract.openSeaMetadata.lastIngestedAt
contract.contractDeployercontract.contractDeployer
contract.deployedBlockNumbercontract.deployedBlockNumber
spamInfo.isSpamcontract.isSpam
spamInfo.classificationscontract.spamClassifications
tokenIdtokenId
tokenTypetokenType
titlename
descriptiondescription
timeLastUpdatedtimeLastUpdated
rawMetadataraw
rawMetadata.attributesraw.metadata.attributes
rawMetadata.tokenUriraw.tokenUri
rawMetadata.errorraw.error
tokenUritokenUri
mediaimage
fromfrom
toto
transactionHashtransactionHash
blockNumberblockNumber
pageKeypageKey

Example Responses

V2 Example Response

{
    "nfts": [
        {
            "contract": {
                "address": "0x1f02bf9dde7c79137a08b2dd4fc964bfd2499734",
                "name": "Elephants",
                "symbol": "ELENFT",
                "totalSupply": "7778",
                "tokenType": "ERC721",
                "openSea": {
                    "floorPrice": 0.0031,
                    "collectionName": "3L3Phants Official",
                    "safelistRequestStatus": "verified",
                    "imageUrl": "https://i.seadn.io/gcs/files/71dfb6cacb894a713d91f493917fa1b5.png?w=500&auto=format",
                    "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. From the mind of Ic3cream and designed by World Renowned Artist Tornado Toad. Join the Herd today!\n\nEarn $NUT token in our discord now!\n\nhttps://discord.gg/3l3phantsnft",
                    "externalUrl": "http://3l3phants.io",
                    "twitterUsername": "3L3NFT",
                    "discordUrl": "https://discord.gg/3L3phantsnft",
                    "lastIngestedAt": "2023-07-12T23:25:34.000Z"
                },
                "contractDeployer": "0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8",
                "deployedBlockNumber": 15140845
            },
            "tokenId": "890",
            "tokenType": "ERC721",
            "title": "3L3PHANTS #890",
            "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. Saving 3L3Phants & Wildlife one NFT at a time",
            "timeLastUpdated": "2023-07-15T10:06:39.607Z",
            "rawMetadata": {
                "name": "3L3PHANTS #890",
                "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. Saving 3L3Phants & Wildlife one NFT at a time",
                "image": "ipfs://QmTvmGSL6cFxRyoam2vBRgVL8vjcLrzdum14K9qMQ7MP2b",
                "attributes": [
                    {
                        "value": "Red",
                        "trait_type": "Background"
                    },
                    {
                        "value": "Tie Dye",
                        "trait_type": "Outfit"
                    },
                    {
                        "value": "Double",
                        "trait_type": "Tusks"
                    }
                ]
            },
            "tokenUri": {
                "gateway": "https://ipfs.io/ipfs/QmcpMnvcmUvn3EsQ6QmV1J7QwouBKimrhbHpEV5Db9gFgy/890",
                "raw": "ipfs://QmcpMnvcmUvn3EsQ6QmV1J7QwouBKimrhbHpEV5Db9gFgy/890"
            },
            "media": [
                {
                    "gateway": "https://nft-cdn.alchemy.com/eth-mainnet/121fdb0563b1917179c9ad7d97ae081f",
                    "thumbnail": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/121fdb0563b1917179c9ad7d97ae081f",
                    "raw": "ipfs://QmTvmGSL6cFxRyoam2vBRgVL8vjcLrzdum14K9qMQ7MP2b",
                    "format": "png",
                    "bytes": 199542
                }
            ],
            "from": "0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8",
            "to": "0x84561625814e1c7e882c1ae20a9d722a8c301f04",
            "transactionHash": "0x43ff4418ca88d94857f3b687e8ac7450e107c2a36517e8d59a5308dba4acec94",
            "blockNumber": "0xec8125"
        },
        {
            "contract": {
                "address": "0x1f02bf9dde7c79137a08b2dd4fc964bfd2499734",
                "name": "Elephants",
                "symbol": "ELENFT",
                "totalSupply": "7778",
                "tokenType": "ERC721",
                "openSea": {
                    "floorPrice": 0.0031,
                    "collectionName": "3L3Phants Official",
                    "safelistRequestStatus": "verified",
                    "imageUrl": "https://i.seadn.io/gcs/files/71dfb6cacb894a713d91f493917fa1b5.png?w=500&auto=format",
                    "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. From the mind of Ic3cream and designed by World Renowned Artist Tornado Toad. Join the Herd today!\n\nEarn $NUT token in our discord now!\n\nhttps://discord.gg/3l3phantsnft",
                    "externalUrl": "http://3l3phants.io",
                    "twitterUsername": "3L3NFT",
                    "discordUrl": "https://discord.gg/3L3phantsnft",
                    "lastIngestedAt": "2023-07-12T23:25:34.000Z"
                },
                "contractDeployer": "0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8",
                "deployedBlockNumber": 15140845
            },
            "tokenId": "3990",
            "tokenType": "ERC721",
            "title": "3L3PHANTS #3990",
            "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. Saving 3L3Phants & Wildlife one NFT at a time",
            "timeLastUpdated": "2023-02-28T17:51:29.181Z",
            "rawMetadata": {
                "name": "3L3PHANTS #3990",
                "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. Saving 3L3Phants & Wildlife one NFT at a time",
                "image": "ipfs://QmaL3UbrR8T1tz7j8SuYmQxkQJoPXYZeU49YC5DCHphKDg",
                "attributes": [
                    {
                        "value": "Pink Checkerboard",
                        "trait_type": "Background"
                    },
                    {
                        "value": "Nubs",
                        "trait_type": "Tusks"
                    }
                ]
            },
            "tokenUri": {
                "gateway": "https://alchemy.mypinata.cloud/ipfs/QmcpMnvcmUvn3EsQ6QmV1J7QwouBKimrhbHpEV5Db9gFgy/3990",
                "raw": "ipfs://QmcpMnvcmUvn3EsQ6QmV1J7QwouBKimrhbHpEV5Db9gFgy/3990"
            },
            "media": [
                {
                    "gateway": "https://nft-cdn.alchemy.com/eth-mainnet/8e8706cbd7f6f2b46576dd386410b805",
                    "thumbnail": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/8e8706cbd7f6f2b46576dd386410b805",
                    "raw": "ipfs://QmaL3UbrR8T1tz7j8SuYmQxkQJoPXYZeU49YC5DCHphKDg",
                    "format": "png",
                    "bytes": 198447
                }
            ],
            "from": "0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8",
            "to": "0x6a3623db71c1b3442a94e3fd4655334b48114693",
            "transactionHash": "0x13f33287ac95893e06cda2cd30c08003808ac46867382d8c92e1c864e4895ec6",
            "blockNumber": "0xec8131"
        }
    ]
}

V3 Example Response

{
    "nfts": [
        {
            "contract": {
                "address": "0x1F02bF9dDe7C79137a08B2Dd4FC964BfD2499734",
                "name": "Elephants",
                "symbol": "ELENFT",
                "totalSupply": "7778",
                "tokenType": "ERC721",
                "contractDeployer": "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
                "deployedBlockNumber": 15140845,
                "openSeaMetadata": {
                    "floorPrice": 0.0032,
                    "collectionName": "3L3Phants Official",
                    "collectionSlug": "3l3phants-official",
                    "safelistRequestStatus": "verified",
                    "imageUrl": "https://i.seadn.io/gcs/files/71dfb6cacb894a713d91f493917fa1b5.png?w=500&auto=format",
                    "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. From the mind of Ic3cream and designed by World Renowned Artist Tornado Toad. Join the Herd today!\n\nEarn $NUT token in our discord now!\n\nhttps://discord.gg/3l3phantsnft",
                    "externalUrl": "http://3l3phants.io",
                    "twitterUsername": "3L3NFT",
                    "discordUrl": "https://discord.gg/3L3phantsnft",
                    "bannerImageUrl": "https://i.seadn.io/gcs/files/1667bbb67e548917820271ee2430bb35.png?w=500&auto=format",
                    "lastIngestedAt": "2023-09-19T22:06:03.000Z"
                },
                "spamClassifications": []
            },
            "tokenId": "890",
            "tokenType": "ERC721",
            "name": "3L3PHANTS #890",
            "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. Saving 3L3Phants & Wildlife one NFT at a time",
            "tokenUri": "https://ipfs.io/ipfs/QmcpMnvcmUvn3EsQ6QmV1J7QwouBKimrhbHpEV5Db9gFgy/890",
            "image": {
                "cachedUrl": "https://nft-cdn.alchemy.com/eth-mainnet/121fdb0563b1917179c9ad7d97ae081f",
                "thumbnailUrl": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/121fdb0563b1917179c9ad7d97ae081f",
                "pngUrl": "https://res.cloudinary.com/alchemyapi/image/upload/convert-png/eth-mainnet/121fdb0563b1917179c9ad7d97ae081f",
                "contentType": "image/png",
                "size": 199542,
                "originalUrl": "https://ipfs.io/ipfs/QmTvmGSL6cFxRyoam2vBRgVL8vjcLrzdum14K9qMQ7MP2b"
            },
            "raw": {
                "tokenUri": "ipfs://QmcpMnvcmUvn3EsQ6QmV1J7QwouBKimrhbHpEV5Db9gFgy/890",
                "metadata": {
                    "name": "3L3PHANTS #890",
                    "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. Saving 3L3Phants & Wildlife one NFT at a time",
                    "image": "ipfs://QmTvmGSL6cFxRyoam2vBRgVL8vjcLrzdum14K9qMQ7MP2b",
                    "attributes": [
                        {
                            "value": "Red",
                            "trait_type": "Background"
                        },
                        {
                            "value": "Double",
                            "trait_type": "Tusks"
                        }
                    ]
                }
            },
            "collection": {
                "name": "3L3Phants Official",
                "slug": "3l3phants-official",
                "externalUrl": "http://3l3phants.io",
                "bannerImageUrl": "https://i.seadn.io/gcs/files/1667bbb67e548917820271ee2430bb35.png?w=500&auto=format"
            },
            "mint": {
                "mintAddress": "0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8",
                "blockNumber": 15143441,
                "timestamp": "2022-07-14T22:17:44Z",
                "transactionHash": "0x317dfdacec0ae4cbe0a1f7ee394f9cc7c6d4ae9985a5202fcfef28b3a19ce899"
            },
            "timeLastUpdated": "2023-08-13T03:40:39.232Z",
            "from": "0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8",
            "to": "0x84561625814e1c7e882c1ae20a9d722a8c301f04",
            "transactionHash": "0x43ff4418ca88d94857f3b687e8ac7450e107c2a36517e8d59a5308dba4acec94",
            "blockNumber": "0xec8125"
        },
        {
            "contract": {
                "address": "0x1F02bF9dDe7C79137a08B2Dd4FC964BfD2499734",
                "name": "Elephants",
                "symbol": "ELENFT",
                "totalSupply": "7778",
                "tokenType": "ERC721",
                "contractDeployer": "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
                "deployedBlockNumber": 15140845,
                "openSeaMetadata": {
                    "floorPrice": 0.0032,
                    "collectionName": "3L3Phants Official",
                    "collectionSlug": "3l3phants-official",
                    "safelistRequestStatus": "verified",
                    "imageUrl": "https://i.seadn.io/gcs/files/71dfb6cacb894a713d91f493917fa1b5.png?w=500&auto=format",
                    "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. From the mind of Ic3cream and designed by World Renowned Artist Tornado Toad. Join the Herd today!\n\nEarn $NUT token in our discord now!\n\nhttps://discord.gg/3l3phantsnft",
                    "externalUrl": "http://3l3phants.io",
                    "twitterUsername": "3L3NFT",
                    "discordUrl": "https://discord.gg/3L3phantsnft",
                    "bannerImageUrl": "https://i.seadn.io/gcs/files/1667bbb67e548917820271ee2430bb35.png?w=500&auto=format",
                    "lastIngestedAt": "2023-09-19T22:06:03.000Z"
                },
                "spamClassifications": []
            },
            "tokenId": "3990",
            "tokenType": "ERC721",
            "name": "3L3PHANTS #3990",
            "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. Saving 3L3Phants & Wildlife one NFT at a time",
            "tokenUri": "https://alchemy.mypinata.cloud/ipfs/QmcpMnvcmUvn3EsQ6QmV1J7QwouBKimrhbHpEV5Db9gFgy/3990",
            "image": {
                "cachedUrl": "https://nft-cdn.alchemy.com/eth-mainnet/8e8706cbd7f6f2b46576dd386410b805",
                "thumbnailUrl": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/8e8706cbd7f6f2b46576dd386410b805",
                "pngUrl": "https://res.cloudinary.com/alchemyapi/image/upload/convert-png/eth-mainnet/8e8706cbd7f6f2b46576dd386410b805",
                "contentType": "image/png",
                "size": 198447,
                "originalUrl": "https://ipfs.io/ipfs/QmaL3UbrR8T1tz7j8SuYmQxkQJoPXYZeU49YC5DCHphKDg"
            },
            "raw": {
                "tokenUri": "ipfs://QmcpMnvcmUvn3EsQ6QmV1J7QwouBKimrhbHpEV5Db9gFgy/3990",
                "metadata": {
                    "name": "3L3PHANTS #3990",
                    "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. Saving 3L3Phants & Wildlife one NFT at a time",
                    "image": "ipfs://QmaL3UbrR8T1tz7j8SuYmQxkQJoPXYZeU49YC5DCHphKDg",
                    "attributes": [
                        {
                            "value": "Pink Checkerboard",
                            "trait_type": "Background"
                        },
                        {
                            "value": "Nubs",
                            "trait_type": "Tusks"
                        }
                    ]
                }
            },
            "collection": {
                "name": "3L3Phants Official",
                "slug": "3l3phants-official",
                "externalUrl": "http://3l3phants.io",
                "bannerImageUrl": "https://i.seadn.io/gcs/files/1667bbb67e548917820271ee2430bb35.png?w=500&auto=format"
            },
            "mint": {
                "mintAddress": "0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8",
                "blockNumber": 15214264,
                "timestamp": "2022-07-25T22:02:43Z",
                "transactionHash": "0x343e4697e0e834acb61c23268a63ddddb29e29ce6bcaf652b08430f7c0fdc934"
            },
            "timeLastUpdated": "2023-02-28T17:51:29.181Z",
            "from": "0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8",
            "to": "0x6a3623db71c1b3442a94e3fd4655334b48114693",
            "transactionHash": "0x13f33287ac95893e06cda2cd30c08003808ac46867382d8c92e1c864e4895ec6",
            "blockNumber": "0xec8131"
        }
    ]
}

The getTransfersForContract method gets all NFT transfers for a given NFT contract address.

Overview of Changes

  • The openSea object in the parent contract object has been changed to openSeaMetadata in the V3 response.
  • The collectionSlug and bannerImageUrl parameters have been added to the contract.openSeaMetadata object in V3.
  • The title parameter in V2 has been changed to a name parameter in V3.
  • The media parameter in V2 has been replaced with an image object in V3.
  • The rawMetadataobject parameter has been changed to a raw object in V3, which contains the tokenUri, metadata, and error parameters.
  • The tokenUri object in V2 has been changed to a tokenUri string parameter in the V3 response.
  • The isSpam and spamClassifications parameters for spamInfo in V2 has been added to the contract object in V3.
  • The mint object parameter has been added to the V3 response containing optional mintAddress?, blockNumber?, timestamp?, and transactionHash? parameters.
  • The collection object has been added to the V3 response containing the name, slug?, externalUrl?, and bannerImageUrl? parameters.
  • The acquiredAt object has been added to the V3 response.

Example Requests

V2 Example Request

// Imports the Alchemy SDK
const { Alchemy, Network } = require("alchemy-sdk");

// Configures the Alchemy SDK
const config = {
  apiKey: "demo", // Replace with your API key
  network: Network.ETH_MAINNET, // Replace with your network
};

// Creates an Alchemy object instance with the config to use for making requests
const alchemy = new Alchemy(config);

// Example of using the new getTransfersForContract method
const main = async () => {
  // The nft contract address to get transfers for
  let contractAddress = "0x1F02bF9dDe7C79137a08B2Dd4FC964BfD2499734";

  // Additional options for the request. (Optional)
  let options = {
    /** Starting block (inclusive) to get transfers from. */
    fromBlock: 16564734,
    /** Ending block (inclusive) to get transfers from. */
    toBlock: 16567427,
    /**
     * Whether to return results in ascending or descending order by block number.
     * Defaults to ascending if omitted.
     */
    order: "desc",
  };

  // Calling the getTransfersForContract method
  let transfers = await alchemy.nft.getTransfersForContract(
    contractAddress,
    options
  );

  // Logging the response to the console
  console.log(transfers);
};

main();

V3 Example Request

Same with V2

V2 <> V3 Mapping

V2 ParameterV3 Parameter
contract.addresscontract.address
contract.namecontract.name
contract.symbolcontract.symbol
contract.totalSupplycontract.totalSupply
contract.tokenTypecontract.tokenType
contract.openSea.floorPricecontract.openSeaMetadata.floorPrice
contract.openSea.collectionNamecontract.openSeaMetadata.collectionName
-contract.openSeaMetadata.collectionSlug(New in V3)
contract.openSea.safelistRequestStatuscontract.openSeaMetadata.safelistRequestStatus
contract.openSea.imageUrlcontract.openSeaMetadata.imageUrl
contract.openSea.descriptioncontract.openSeaMetadata.description
contract.openSea.externalUrlcontract.openSeaMetadata.externalUrl
contract.openSea.twitterUsernamecontract.openSeaMetadata.twitterUsername
contract.openSea.discordUrlcontract.openSeaMetadata.discordUrl
-contract.openSeaMetadata.bannerImageUrl(New in V3)
contract.openSea.lastIngestedAtcontract.openSeaMetadata.lastIngestedAt
contract.contractDeployercontract.contractDeployer
contract.deployedBlockNumbercontract.deployedBlockNumber
spamInfo.isSpamcontract.isSpam
spamInfo.classificationscontract.spamClassifications
tokenIdtokenId
tokenTypetokenType
titlename
descriptiondescription
timeLastUpdatedtimeLastUpdated
rawMetadataraw
rawMetadata.metadataraw.metadata
rawMetadata.tokenUriraw.tokenUri
rawMetadata.errorraw.error
rawMetadata.attributesraw.metadata.attributes
tokenUritokenUri
mediaimage
fromfrom
toto
transactionHashtransactionHash
blockNumberblockNumber
pageKeypageKey

Example Responses

V2 Example Response

{
    "nfts": [
        {
            "contract": {
                "address": "0x1f02bf9dde7c79137a08b2dd4fc964bfd2499734",
                "name": "Elephants",
                "symbol": "ELENFT",
                "totalSupply": "7778",
                "tokenType": "ERC721",
                "openSea": {
                    "floorPrice": 0.0031,
                    "collectionName": "3L3Phants Official",
                    "safelistRequestStatus": "verified",
                    "imageUrl": "https://i.seadn.io/gcs/files/71dfb6cacb894a713d91f493917fa1b5.png?w=500&auto=format",
                    "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. From the mind of Ic3cream and designed by World Renowned Artist Tornado Toad. Join the Herd today!\n\nEarn $NUT token in our discord now!\n\nhttps://discord.gg/3l3phantsnft",
                    "externalUrl": "http://3l3phants.io",
                    "twitterUsername": "3L3NFT",
                    "discordUrl": "https://discord.gg/3L3phantsnft",
                    "lastIngestedAt": "2023-07-12T23:25:34.000Z"
                },
                "contractDeployer": "0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8",
                "deployedBlockNumber": 15140845
            },
            "tokenId": "5447",
            "tokenType": "ERC721",
            "title": "3L3PHANTS #5447",
            "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. Saving 3L3Phants & Wildlife one NFT at a time",
            "timeLastUpdated": "2023-02-18T18:43:33.104Z",
            "rawMetadata": {
                "name": "3L3PHANTS #5447",
                "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. Saving 3L3Phants & Wildlife one NFT at a time",
                "image": "ipfs://QmWS5E2YK9rEWUuvkZkicSTZ9Fbck9z1aZTKYLAcmkmdTx",
                "attributes": [
                    {
                        "value": "Green",
                        "trait_type": "Background"
                    },
                    {
                        "value": "Gold",
                        "trait_type": "Tusks"
                    }
                ]
            },
            "tokenUri": {
                "gateway": "https://alchemy.mypinata.cloud/ipfs/QmcpMnvcmUvn3EsQ6QmV1J7QwouBKimrhbHpEV5Db9gFgy/5447",
                "raw": "ipfs://QmcpMnvcmUvn3EsQ6QmV1J7QwouBKimrhbHpEV5Db9gFgy/5447"
            },
            "media": [
                {
                    "gateway": "https://nft-cdn.alchemy.com/eth-mainnet/34233c43dee24fc5748d48867d5a61e8",
                    "thumbnail": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/34233c43dee24fc5748d48867d5a61e8",
                    "raw": "ipfs://QmWS5E2YK9rEWUuvkZkicSTZ9Fbck9z1aZTKYLAcmkmdTx",
                    "format": "png",
                    "bytes": 211149
                }
            ],
            "from": "0x93ab7195dc4dd4a098efb10b47fe48c7893b8864",
            "to": "0xad2596f9506309ea64e81605aaa4e898134ac1f2",
            "transactionHash": "0xcec76b5c70c1dc71c09a2f383a4ae5a93331a0d4dea690171041263ae416c05c",
            "blockNumber": "0xfccb9e"
        },
        {
            "contract": {
                "address": "0x1f02bf9dde7c79137a08b2dd4fc964bfd2499734",
                "name": "Elephants",
                "symbol": "ELENFT",
                "totalSupply": "7778",
                "tokenType": "ERC721",
                "openSea": {
                    "floorPrice": 0.0031,
                    "collectionName": "3L3Phants Official",
                    "safelistRequestStatus": "verified",
                    "imageUrl": "https://i.seadn.io/gcs/files/71dfb6cacb894a713d91f493917fa1b5.png?w=500&auto=format",
                    "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. From the mind of Ic3cream and designed by World Renowned Artist Tornado Toad. Join the Herd today!\n\nEarn $NUT token in our discord now!\n\nhttps://discord.gg/3l3phantsnft",
                    "externalUrl": "http://3l3phants.io",
                    "twitterUsername": "3L3NFT",
                    "discordUrl": "https://discord.gg/3L3phantsnft",
                    "lastIngestedAt": "2023-07-12T23:25:34.000Z"
                },
                "contractDeployer": "0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8",
                "deployedBlockNumber": 15140845
            },
            "tokenId": "372",
            "tokenType": "ERC721",
            "title": "3L3PHANTS #372",
            "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. Saving 3L3Phants & Wildlife one NFT at a time",
            "timeLastUpdated": "2023-03-15T08:33:25.446Z",
            "rawMetadata": {
                "name": "3L3PHANTS #372",
                "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. Saving 3L3Phants & Wildlife one NFT at a time",
                "image": "ipfs://QmXvc2DMgg9ZJWGuAV1DTRn3HFS2oFtHbyo2am2LsSuguY",
                "attributes": [
                    {
                        "value": "Red",
                        "trait_type": "Background"
                    },
                        "value": "Brown",
                        "trait_type": "Tusks"
                    }
                ]
            },
            "tokenUri": {
                "gateway": "https://ipfs.io/ipfs/QmcpMnvcmUvn3EsQ6QmV1J7QwouBKimrhbHpEV5Db9gFgy/372",
                "raw": "ipfs://QmcpMnvcmUvn3EsQ6QmV1J7QwouBKimrhbHpEV5Db9gFgy/372"
            },
            "media": [
                {
                    "gateway": "https://nft-cdn.alchemy.com/eth-mainnet/5da1c73b64d3fc6dc1c986ac8e4f76f8",
                    "thumbnail": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/5da1c73b64d3fc6dc1c986ac8e4f76f8",
                    "raw": "ipfs://QmXvc2DMgg9ZJWGuAV1DTRn3HFS2oFtHbyo2am2LsSuguY",
                    "format": "png",
                    "bytes": 189584
                }
            ],
            "from": "0xb7dded5be42790543096fd7d765155de658530f8",
            "to": "0x4209859ae2992f581d2678392b4ac80c13d5eed4",
            "transactionHash": "0xb89d383a80ead28c4ec00d985dd5f25989c02d945bb84b55261e07ce34d4406f",
            "blockNumber": "0xfcc202"
        }
    ]
}

V3 Example Response

{
    "nfts": [
        {
            "contract": {
                "address": "0x1F02bF9dDe7C79137a08B2Dd4FC964BfD2499734",
                "name": "Elephants",
                "symbol": "ELENFT",
                "totalSupply": "7778",
                "tokenType": "ERC721",
                "contractDeployer": "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
                "deployedBlockNumber": 15140845,
                "openSeaMetadata": {
                    "floorPrice": 0.0032,
                    "collectionName": "3L3Phants Official",
                    "collectionSlug": "3l3phants-official",
                    "safelistRequestStatus": "verified",
                    "imageUrl": "https://i.seadn.io/gcs/files/71dfb6cacb894a713d91f493917fa1b5.png?w=500&auto=format",
                    "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. From the mind of Ic3cream and designed by World Renowned Artist Tornado Toad. Join the Herd today!\n\nEarn $NUT token in our discord now!\n\nhttps://discord.gg/3l3phantsnft",
                    "externalUrl": "http://3l3phants.io",
                    "twitterUsername": "3L3NFT",
                    "discordUrl": "https://discord.gg/3L3phantsnft",
                    "bannerImageUrl": "https://i.seadn.io/gcs/files/1667bbb67e548917820271ee2430bb35.png?w=500&auto=format",
                    "lastIngestedAt": "2023-09-19T22:06:03.000Z"
                },
                "spamClassifications": []
            },
            "tokenId": "5447",
            "tokenType": "ERC721",
            "name": "3L3PHANTS #5447",
            "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. Saving 3L3Phants & Wildlife one NFT at a time",
            "tokenUri": "https://alchemy.mypinata.cloud/ipfs/QmcpMnvcmUvn3EsQ6QmV1J7QwouBKimrhbHpEV5Db9gFgy/5447",
            "image": {
                "cachedUrl": "https://nft-cdn.alchemy.com/eth-mainnet/34233c43dee24fc5748d48867d5a61e8",
                "thumbnailUrl": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/34233c43dee24fc5748d48867d5a61e8",
                "pngUrl": "https://res.cloudinary.com/alchemyapi/image/upload/convert-png/eth-mainnet/34233c43dee24fc5748d48867d5a61e8",
                "contentType": "image/png",
                "size": 211149,
                "originalUrl": "https://ipfs.io/ipfs/QmWS5E2YK9rEWUuvkZkicSTZ9Fbck9z1aZTKYLAcmkmdTx"
            },
            "raw": {
                "tokenUri": "ipfs://QmcpMnvcmUvn3EsQ6QmV1J7QwouBKimrhbHpEV5Db9gFgy/5447",
                "metadata": {
                    "name": "3L3PHANTS #5447",
                    "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. Saving 3L3Phants & Wildlife one NFT at a time",
                    "image": "ipfs://QmWS5E2YK9rEWUuvkZkicSTZ9Fbck9z1aZTKYLAcmkmdTx",
                    "attributes": [
                        {
                            "value": "Green",
                            "trait_type": "Background"
                        },
                        {
                            "value": "Red Hoodie",
                            "trait_type": "Outfit"
                        },
                        {
                            "value": "Gold",
                            "trait_type": "Tusks"
                        }
                    ]
                }
            },
            "collection": {
                "name": "3L3Phants Official",
                "slug": "3l3phants-official",
                "externalUrl": "http://3l3phants.io",
                "bannerImageUrl": "https://i.seadn.io/gcs/files/1667bbb67e548917820271ee2430bb35.png?w=500&auto=format"
            },
            "mint": {
                "mintAddress": "0xfd279644adb28043ee10111f2971b3e4fb655e86",
                "blockNumber": 15260123,
                "timestamp": "2022-08-02T01:18:08Z",
                "transactionHash": "0x7cfdf3018a244529c6b1c6b85171f5c1cbf355c78b5f4faa80bd2fcfaf0d4429"
            },
            "timeLastUpdated": "2023-02-18T18:43:33.104Z",
            "from": "0x93ab7195dc4dd4a098efb10b47fe48c7893b8864",
            "to": "0xad2596f9506309ea64e81605aaa4e898134ac1f2",
            "transactionHash": "0xcec76b5c70c1dc71c09a2f383a4ae5a93331a0d4dea690171041263ae416c05c",
            "blockNumber": "0xfccb9e"
        },
        {
            "contract": {
                "address": "0x1F02bF9dDe7C79137a08B2Dd4FC964BfD2499734",
                "name": "Elephants",
                "symbol": "ELENFT",
                "totalSupply": "7778",
                "tokenType": "ERC721",
                "contractDeployer": "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
                "deployedBlockNumber": 15140845,
                "openSeaMetadata": {
                    "floorPrice": 0.0032,
                    "collectionName": "3L3Phants Official",
                    "collectionSlug": "3l3phants-official",
                    "safelistRequestStatus": "verified",
                    "imageUrl": "https://i.seadn.io/gcs/files/71dfb6cacb894a713d91f493917fa1b5.png?w=500&auto=format",
                    "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. From the mind of Ic3cream and designed by World Renowned Artist Tornado Toad. Join the Herd today!\n\nEarn $NUT token in our discord now!\n\nhttps://discord.gg/3l3phantsnft",
                    "externalUrl": "http://3l3phants.io",
                    "twitterUsername": "3L3NFT",
                    "discordUrl": "https://discord.gg/3L3phantsnft",
                    "bannerImageUrl": "https://i.seadn.io/gcs/files/1667bbb67e548917820271ee2430bb35.png?w=500&auto=format",
                    "lastIngestedAt": "2023-09-19T22:06:03.000Z"
                },
                "spamClassifications": []
            },
            "tokenId": "372",
            "tokenType": "ERC721",
            "name": "3L3PHANTS #372",
            "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. Saving 3L3Phants & Wildlife one NFT at a time",
            "tokenUri": "https://ipfs.io/ipfs/QmcpMnvcmUvn3EsQ6QmV1J7QwouBKimrhbHpEV5Db9gFgy/372",
            "image": {
                "cachedUrl": "https://nft-cdn.alchemy.com/eth-mainnet/5da1c73b64d3fc6dc1c986ac8e4f76f8",
                "thumbnailUrl": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/5da1c73b64d3fc6dc1c986ac8e4f76f8",
                "pngUrl": "https://res.cloudinary.com/alchemyapi/image/upload/convert-png/eth-mainnet/5da1c73b64d3fc6dc1c986ac8e4f76f8",
                "contentType": "image/png",
                "size": 189584,
                "originalUrl": "https://ipfs.io/ipfs/QmXvc2DMgg9ZJWGuAV1DTRn3HFS2oFtHbyo2am2LsSuguY"
            },
            "raw": {
                "tokenUri": "ipfs://QmcpMnvcmUvn3EsQ6QmV1J7QwouBKimrhbHpEV5Db9gFgy/372",
                "metadata": {
                    "name": "3L3PHANTS #372",
                    "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. Saving 3L3Phants & Wildlife one NFT at a time",
                    "image": "ipfs://QmXvc2DMgg9ZJWGuAV1DTRn3HFS2oFtHbyo2am2LsSuguY",
                    "attributes": [
                        {
                            "value": "Red",
                            "trait_type": "Background"
                        },
                        {
                            "value": "Brown",
                            "trait_type": "Tusks"
                        }
                    ]
                }
            },
            "collection": {
                "name": "3L3Phants Official",
                "slug": "3l3phants-official",
                "externalUrl": "http://3l3phants.io",
                "bannerImageUrl": "https://i.seadn.io/gcs/files/1667bbb67e548917820271ee2430bb35.png?w=500&auto=format"
            },
            "mint": {
                "mintAddress": "0xa590b03f6492f658b9d13f49924b2b1bb4b596b1",
                "blockNumber": 15141967,
                "timestamp": "2022-07-14T16:52:41Z",
                "transactionHash": "0xc126314bde53b9348df97561c796ff9535549ac7fa596f9f7223084443bbdff8"
            },
            "timeLastUpdated": "2023-03-15T08:33:25.446Z",
            "from": "0xb7dded5be42790543096fd7d765155de658530f8",
            "to": "0x4209859ae2992f581d2678392b4ac80c13d5eed4",
            "transactionHash": "0xb89d383a80ead28c4ec00d985dd5f25989c02d945bb84b55261e07ce34d4406f",
            "blockNumber": "0xfcc202"
        }
    ]
}

The getMintedNfts method gets all the NFTs minted by a specified owner address.

Overview of Changes

  • The openSea object in the parent contract object has been changed to openSeaMetadata in the V3 response.
  • The collectionSlug and bannerImageUrl parameters have been added to the contract.openSeaMetadata object in V3.
  • The title parameter in V2 has been changed to a name parameter in V3.
  • The media parameter in V2 has been replaced with an image object in V3.
  • The rawMetadataobject parameter has been changed to a raw object in V3, which contains the tokenUri,metadata, and error parameters
  • The tokenUri object in V2 has been changed to a tokenUri string parameter in the V3 response.
  • The isSpam and spamClassifications parameters have been added to the contract object in V3.
  • The mint object parameter has been added to the V3 response containing optional mintAddress?, blockNumber?, timestamp?, and transactionHash? parameters.
  • The collection object has been added to the V3 response containing the name, slug?, externalUrl?, and bannerImageUrl? parameters.
  • The acquiredAt object has been added to the V3 response.

Example Requests

V2 Example Request

// Imports the Alchemy SDK
const { Alchemy, Network } = require("alchemy-sdk");

// Configures the Alchemy SDK
const config = {
  apiKey: "demo", // Replace with your API key
  network: Network.ETH_MAINNET, // Replace with your network
};

// Creates an Alchemy object instance with the config to use for making requests
const alchemy = new Alchemy(config);

// Example of using the new getMintedNfts method
const main = async () => {
  // Address for the NFT owner (can be in ENS format).
  let address = "vitalik.eth";

  // Additional options for the request. (Optional)
  let options = {
    /**
     * List of NFT contract addresses to filter mints by. If omitted, defaults to
     * all contract addresses.
     */
    contractAddresses: ["0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85"],
    /**
     * Filter mints by ERC721 vs ERC1155 contracts. If omitted, defaults to all
     * NFTs.
     */
    tokenType: "ERC721",
  };

  // Calling the getMintedNfts method
  let mintedNfts = await alchemy.nft.getMintedNfts(address, options);

  // Logging the response to the console
  console.log(mintedNfts);
};

main();

V3 Example Request

Same as V2

V2 <> V3 Mapping

V2 ParameterV3 Parameter
contract.addresscontract.address
contract.namecontract.name
contract.symbolcontract.symbol
contract.totalSupplycontract.totalSupply
contract.tokenTypecontract.tokenType
contract.openSea.floorPricecontract.openSeaMetadata.floorPrice
contract.openSea.collectionNamecontract.openSeaMetadata.collectionName
-contract.openSeaMetadata.collectionSlug(New in V3)
contract.openSea.safelistRequestStatuscontract.openSeaMetadata.safelistRequestStatus
contract.openSea.imageUrlcontract.openSeaMetadata.imageUrl
contract.openSea.descriptioncontract.openSeaMetadata.description
contract.openSea.externalUrlcontract.openSeaMetadata.externalUrl
contract.openSea.twitterUsernamecontract.openSeaMetadata.twitterUsername
contract.openSea.discordUrlcontract.openSeaMetadata.discordUrl
-contract.openSeaMetadata.bannerImageUrl(New in V3)
contract.openSea.lastIngestedAtcontract.openSeaMetadata.lastIngestedAt
contract.contractDeployercontract.contractDeployer
contract.deployedBlockNumbercontract.deployedBlockNumber
spamInfo.isSpamcontract.isSpam
spamInfo.classificationscontract.spamClassifications
tokenIdtokenId
tokenTypetokenType
titlename
descriptiondescription
timeLastUpdatedtimeLastUpdated
rawMetadataraw
rawMetadata.metadataraw.metadata
rawMetadata.errorraw.error
rawMetadata.attributesraw.metadata.attributes
-raw.tokenUri
tokenUritokenUri
mediaimage
fromfrom
toto
transactionHashtransactionHash
blockNumberblockNumber
pageKeypageKey

Example Responses

V2 Example Response

{
    "nfts": [
        {
            "contract": {
                "address": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85",
                "tokenType": "ERC721",
                "openSea": {
                    "floorPrice": 0.0005,
                    "collectionName": "ENS: Ethereum Name Service",
                    "safelistRequestStatus": "verified",
                    "imageUrl": "https://i.seadn.io/gae/0cOqWoYA7xL9CkUjGlxsjreSYBdrUBE0c6EO1COG4XE8UeP-Z30ckqUNiL872zHQHQU5MUNMNhfDpyXIP17hRSC5HQ?w=500&auto=format",
                    "description": "Ethereum Name Service (ENS) domains are secure domain names for the decentralized world. ENS domains provide a way for users to map human readable names to blockchain and non-blockchain resources, like Ethereum addresses, IPFS hashes, or website URLs. ENS domains can be bought and sold on secondary markets.",
                    "externalUrl": "https://ens.domains",
                    "twitterUsername": "ensdomains",
                    "lastIngestedAt": "2023-07-21T07:08:17.000Z"
                },
                "contractDeployer": "0x4fe4e666be5752f1fdd210f4ab5de2cc26e3e0e8",
                "deployedBlockNumber": 9380410
            },
            "tokenId": "111352653673047713804124050598355152059184664886497242203777472800304891334469",
            "tokenType": "ERC721",
            "title": "",
            "description": "",
            "timeLastUpdated": "2023-07-21T12:40:51.364Z",
            "metadataError": "Token uri responded with a non 200 response code",
            "rawMetadata": {
                "metadata": [],
                "attributes": []
            },
            "tokenUri": {
                "gateway": "https://metadata.ens.domains/mainnet/0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85/0xf62f5e56fe8da20b0f4596383d464ebbaf1968de230cfb3dd53fc91800228f45",
                "raw": "https://metadata.ens.domains/mainnet/0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85/0xf62f5e56fe8da20b0f4596383d464ebbaf1968de230cfb3dd53fc91800228f45"
            },
            "media": [],
            "from": "0x0000000000000000000000000000000000000000",
            "to": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
            "transactionHash": "0xc5bc4cf983e98ad9708dee356a17196aa367228f9ec87f81e622c81adaa6211e",
            "blockNumber": "0xe88086"
        },
        {
            "contract": {
                "address": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85",
                "tokenType": "ERC721",
                "openSea": {
                    "floorPrice": 0.0005,
                    "collectionName": "ENS: Ethereum Name Service",
                    "safelistRequestStatus": "verified",
                    "imageUrl": "https://i.seadn.io/gae/0cOqWoYA7xL9CkUjGlxsjreSYBdrUBE0c6EO1COG4XE8UeP-Z30ckqUNiL872zHQHQU5MUNMNhfDpyXIP17hRSC5HQ?w=500&auto=format",
                    "description": "Ethereum Name Service (ENS) domains are secure domain names for the decentralized world. ENS domains provide a way for users to map human readable names to blockchain and non-blockchain resources, like Ethereum addresses, IPFS hashes, or website URLs. ENS domains can be bought and sold on secondary markets.",
                    "externalUrl": "https://ens.domains",
                    "twitterUsername": "ensdomains",
                    "lastIngestedAt": "2023-07-21T07:08:17.000Z"
                },
                "contractDeployer": "0x4fe4e666be5752f1fdd210f4ab5de2cc26e3e0e8",
                "deployedBlockNumber": 9380410
            },
            "tokenId": "103040680624633360426956226800459505851045291463662393946817594920946384752224",
            "tokenType": "ERC721",
            "title": "",
            "description": "",
            "timeLastUpdated": "2023-07-21T12:40:50.845Z",
            "metadataError": "Token uri responded with a non 200 response code",
            "rawMetadata": {
                "metadata": [],
                "attributes": []
            },
            "tokenUri": {
                "gateway": "https://metadata.ens.domains/mainnet/0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85/0xe3cef55f7067b9353a1b591cd3ea3af56e998792eb10d19a1b96f0a09917ce60",
                "raw": "https://metadata.ens.domains/mainnet/0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85/0xe3cef55f7067b9353a1b591cd3ea3af56e998792eb10d19a1b96f0a09917ce60"
            },
            "media": [],
            "from": "0x0000000000000000000000000000000000000000",
            "to": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
            "transactionHash": "0x9f21fad5549aaf94e7731f5c4649353926cf7520b96891b8b511d099020fb887",
            "blockNumber": "0xf47bcd"
        },
        {
            "contract": {
                "address": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85",
                "tokenType": "ERC721",
                "openSea": {
                    "floorPrice": 0.0005,
                    "collectionName": "ENS: Ethereum Name Service",
                    "safelistRequestStatus": "verified",
                    "imageUrl": "https://i.seadn.io/gae/0cOqWoYA7xL9CkUjGlxsjreSYBdrUBE0c6EO1COG4XE8UeP-Z30ckqUNiL872zHQHQU5MUNMNhfDpyXIP17hRSC5HQ?w=500&auto=format",
                    "description": "Ethereum Name Service (ENS) domains are secure domain names for the decentralized world. ENS domains provide a way for users to map human readable names to blockchain and non-blockchain resources, like Ethereum addresses, IPFS hashes, or website URLs. ENS domains can be bought and sold on secondary markets.",
                    "externalUrl": "https://ens.domains",
                    "twitterUsername": "ensdomains",
                    "lastIngestedAt": "2023-07-21T07:08:17.000Z"
                },
                "contractDeployer": "0x4fe4e666be5752f1fdd210f4ab5de2cc26e3e0e8",
                "deployedBlockNumber": 9380410
            },
            "tokenId": "79362104341617195787435013155216554898816343870453146709166302825328240112628",
            "tokenType": "ERC721",
            "title": "",
            "description": "",
            "timeLastUpdated": "2023-07-21T12:40:51.867Z",
            "metadataError": "Token uri responded with a non 200 response code",
            "rawMetadata": {
                "metadata": [],
                "attributes": []
            },
            "tokenUri": {
                "gateway": "https://metadata.ens.domains/mainnet/0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85/0xaf755bf78de2496dbb4f4c665d1437ed11cd5c8835e8e32b16f3bf500cb633f4",
                "raw": "https://metadata.ens.domains/mainnet/0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85/0xaf755bf78de2496dbb4f4c665d1437ed11cd5c8835e8e32b16f3bf500cb633f4"
            },
            "media": [],
            "from": "0x0000000000000000000000000000000000000000",
            "to": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
            "transactionHash": "0xe3c78eca914f215644922e15d080b4198d552885a64958f4bec6516ace149b43",
            "blockNumber": "0xf47bcd"
        }
    ]
}

V3 Example Response

{
    "nfts": [
        {
            "contract": {
                "address": "0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85",
                "tokenType": "ERC721",
                "contractDeployer": "0x4Fe4e666Be5752f1FdD210F4Ab5DE2Cc26e3E0e8",
                "deployedBlockNumber": 9380410,
                "openSeaMetadata": {
                    "floorPrice": 0.001,
                    "collectionName": "ENS: Ethereum Name Service",
                    "collectionSlug": "ens",
                    "safelistRequestStatus": "verified",
                    "imageUrl": "https://i.seadn.io/gae/0cOqWoYA7xL9CkUjGlxsjreSYBdrUBE0c6EO1COG4XE8UeP-Z30ckqUNiL872zHQHQU5MUNMNhfDpyXIP17hRSC5HQ?w=500&auto=format",
                    "description": "Ethereum Name Service (ENS) domains are secure domain names for the decentralized world. ENS domains provide a way for users to map human readable names to blockchain and non-blockchain resources, like Ethereum addresses, IPFS hashes, or website URLs. ENS domains can be bought and sold on secondary markets.",
                    "externalUrl": "https://ens.domains",
                    "twitterUsername": "ensdomains",
                    "lastIngestedAt": "2023-09-18T10:20:40.000Z"
                },
                "spamClassifications": []
            },
            "tokenId": "111352653673047713804124050598355152059184664886497242203777472800304891334469",
            "tokenType": "ERC721",
            "tokenUri": "https://metadata.ens.domains/mainnet/0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85/0xf62f5e56fe8da20b0f4596383d464ebbaf1968de230cfb3dd53fc91800228f45",
            "image": {},
            "raw": {
                "tokenUri": "https://metadata.ens.domains/mainnet/0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85/0xf62f5e56fe8da20b0f4596383d464ebbaf1968de230cfb3dd53fc91800228f45",
                "metadata": {},
                "error": "Centralized gateway timed out, try again with a higher tokenUri timeout"
            },
            "collection": {
                "name": "ENS: Ethereum Name Service",
                "slug": "ens",
                "externalUrl": "https://ens.domains"
            },
            "mint": {},
            "timeLastUpdated": "2023-09-21T14:06:39.073Z",
            "from": "0x0000000000000000000000000000000000000000",
            "to": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
            "transactionHash": "0xc5bc4cf983e98ad9708dee356a17196aa367228f9ec87f81e622c81adaa6211e",
            "blockNumber": "0xe88086"
        },
        {
            "contract": {
                "address": "0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85",
                "tokenType": "ERC721",
                "contractDeployer": "0x4Fe4e666Be5752f1FdD210F4Ab5DE2Cc26e3E0e8",
                "deployedBlockNumber": 9380410,
                "openSeaMetadata": {
                    "floorPrice": 0.001,
                    "collectionName": "ENS: Ethereum Name Service",
                    "collectionSlug": "ens",
                    "safelistRequestStatus": "verified",
                    "imageUrl": "https://i.seadn.io/gae/0cOqWoYA7xL9CkUjGlxsjreSYBdrUBE0c6EO1COG4XE8UeP-Z30ckqUNiL872zHQHQU5MUNMNhfDpyXIP17hRSC5HQ?w=500&auto=format",
                    "description": "Ethereum Name Service (ENS) domains are secure domain names for the decentralized world. ENS domains provide a way for users to map human readable names to blockchain and non-blockchain resources, like Ethereum addresses, IPFS hashes, or website URLs. ENS domains can be bought and sold on secondary markets.",
                    "externalUrl": "https://ens.domains",
                    "twitterUsername": "ensdomains",
                    "lastIngestedAt": "2023-09-18T10:20:40.000Z"
                },
                "spamClassifications": []
            },
            "tokenId": "103040680624633360426956226800459505851045291463662393946817594920946384752224",
            "tokenType": "ERC721",
            "tokenUri": "https://metadata.ens.domains/mainnet/0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85/0xe3cef55f7067b9353a1b591cd3ea3af56e998792eb10d19a1b96f0a09917ce60",
            "image": {},
            "raw": {
                "tokenUri": "https://metadata.ens.domains/mainnet/0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85/0xe3cef55f7067b9353a1b591cd3ea3af56e998792eb10d19a1b96f0a09917ce60",
                "metadata": {},
                "error": "Centralized gateway timed out, try again with a higher tokenUri timeout"
            },
            "collection": {
                "name": "ENS: Ethereum Name Service",
                "slug": "ens",
                "externalUrl": "https://ens.domains"
            },
            "mint": {},
            "timeLastUpdated": "2023-09-21T14:06:39.076Z",
            "from": "0x0000000000000000000000000000000000000000",
            "to": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
            "transactionHash": "0x9f21fad5549aaf94e7731f5c4649353926cf7520b96891b8b511d099020fb887",
            "blockNumber": "0xf47bcd"
        },
        {
            "contract": {
                "address": "0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85",
                "tokenType": "ERC721",
                "contractDeployer": "0x4Fe4e666Be5752f1FdD210F4Ab5DE2Cc26e3E0e8",
                "deployedBlockNumber": 9380410,
                "openSeaMetadata": {
                    "floorPrice": 0.001,
                    "collectionName": "ENS: Ethereum Name Service",
                    "collectionSlug": "ens",
                    "safelistRequestStatus": "verified",
                    "imageUrl": "https://i.seadn.io/gae/0cOqWoYA7xL9CkUjGlxsjreSYBdrUBE0c6EO1COG4XE8UeP-Z30ckqUNiL872zHQHQU5MUNMNhfDpyXIP17hRSC5HQ?w=500&auto=format",
                    "description": "Ethereum Name Service (ENS) domains are secure domain names for the decentralized world. ENS domains provide a way for users to map human readable names to blockchain and non-blockchain resources, like Ethereum addresses, IPFS hashes, or website URLs. ENS domains can be bought and sold on secondary markets.",
                    "externalUrl": "https://ens.domains",
                    "twitterUsername": "ensdomains",
                    "lastIngestedAt": "2023-09-18T10:20:40.000Z"
                },
                "spamClassifications": []
            },
            "tokenId": "79362104341617195787435013155216554898816343870453146709166302825328240112628",
            "tokenType": "ERC721",
            "tokenUri": "https://metadata.ens.domains/mainnet/0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85/0xaf755bf78de2496dbb4f4c665d1437ed11cd5c8835e8e32b16f3bf500cb633f4",
            "image": {},
            "raw": {
                "tokenUri": "https://metadata.ens.domains/mainnet/0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85/0xaf755bf78de2496dbb4f4c665d1437ed11cd5c8835e8e32b16f3bf500cb633f4",
                "metadata": {},
                "error": "Token uri responded with a non 200 response code"
            },
            "collection": {
                "name": "ENS: Ethereum Name Service",
                "slug": "ens",
                "externalUrl": "https://ens.domains"
            },
            "mint": {},
            "timeLastUpdated": "2023-09-21T14:06:38.973Z",
            "from": "0x0000000000000000000000000000000000000000",
            "to": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
            "transactionHash": "0xe3c78eca914f215644922e15d080b4198d552885a64958f4bec6516ace149b43",
            "blockNumber": "0xf47bcd"
        }
    ]
}

Gets all the owners for a given NFT contract address and token ID.

Overview of Changes

  • A new field pageKey has been added to the response structure in V3.

Example Requests

V2 Example Request

// Imports the Alchemy SDK
const { Alchemy, Network } = require("alchemy-sdk");

// Configures the Alchemy SDK
const config = {
    apiKey: "alchemy-replit", // Replace with your API key
    network: Network.ETH_MAINNET, // Replace with your network
};

// Creates an Alchemy object instance with the config to use for making requests
const alchemy = new Alchemy(config);

const main = async () => {
    // define the contract address and token Id
    const address = "0x5180db8F5c931aaE63c74266b211F580155ecac8";
    const tokenId = "1590";

    //Call the method to fetch the owners for the collection
    const response = await alchemy.nft.getOwnersForNft(address, tokenId)

    //Logging the response to the console
    console.log(response)
}

main();

V3 Example Request

Same as V2

V2 <> V3 Mapping

V2 ParameterV3 Parameter
ownersowners
pageKey(New in V3)

Example Responses

V2 Example Response

{
    "owners": [
        "0xf5fff32cf83a1a614e15f25ce55b0c0a6b5f8f2c"
    ]
}

V3 Example Response

{
    "owners": [
        "0xF5FFF32CF83A1A614e15F25Ce55B0c0A6b5F8F2c"
    ],
    "pageKey": null
}

Gets all the owners for a given NFT contract and the token balance.

Overview of Changes

There are no changes in the request or response structure for the method getOwnersForContract between V2 and V3.

Example Requests

V2 Example Request

// Imports the Alchemy SDK
const { Alchemy, Network } = require("alchemy-sdk");

// Configures the Alchemy SDK
const config = {
    apiKey: "alchemy-replit", // Replace with your API key
    network: Network.ETH_MAINNET, // Replace with your network
};

// Creates an Alchemy object instance with the config to use for making requests
const alchemy = new Alchemy(config);

const main = async () => {
    // define the contract address
    const address = "0x61fce80d72363b731425c3a2a46a1a5fed9814b2";

    //Call the method to fetch the owners for the contract
    const response = await alchemy.nft.getOwnersForContract(address)

    //Logging the response to the console
    console.log(response)
}

main();

V3 Example Request

Same as V2

V2 <> V3 Mapping

V2 ParameterV3 Parameter
ownersowners
totalCount?totalCount?
pageKey?pageKey?

Example Responses

V2 Example Response

{
    "owners": [
        "0x001a61213d72f2f3c95ff743c80f472749ab8ad3",
        "0x003a1acce28eb335f3ff1e93a5b09cd4b598ef62",
        "0x00614efd868dabb5f92e15b0440d1f85ac0f9be1",
        "0x006f48d6ed87efd9e0bc56cc7a8703d0455c2858",
        "0x008b7903f1f0b825636739c7a3defb7eebc94f1d",
        "0x008c79f10cbd14070b106b05d5fd494e084ee8a5",
        "0x00ce8f7e0ec4f03a821e8cb3d84479d76151d0a9",
        "0x00f3a0fcc47ba9f7a757c255aaa6a286a524cef9",
        "0x016c6422b74463834514394b7207478982139bb4",
        "0x016df42305bb3d0e21abf75b456a4babb1777a4b",
        "0x01882145348b9908f803740e547efbad0983cdcb",
        "0x018edc98b3190dbb261e6ff3858c4ba59c71ba94",
        "0x019d99678bd3b9f1157e763398a3dd62cb760a23",
        "0x01ae3e9aa99f080b59d3a02ee40478af8b3d63c1",
        "0x01e4cf06c6adb9231a30ca17f4a62afe23c0a9c1",
        "0x01e6357045328fa19c11994af6a4500754e6a75b",
        "0x02070ed234f1a07ca88f6164791e033c97570d96",
        "0x0207a5cfc75733d82f2dd5a8b6adf78277ef7347",
        "0x025dca13f8803ed01b3ea717e2ee9daf7a383cda",
        "0x02b92b2254c27bed8d4268e663200f705bc76e35",
        "0xffc91af289242fb62d8d06116b2c5a6c6aa50205",
        "0xffcebf6be845b95cfd42e77c65968662bc8f9f2f"
    ]
}

V3 Example Response

{
    "owners": [
        "0x001a61213D72F2F3C95Ff743c80f472749AB8ad3",
        "0x003a1aCce28eb335F3FF1E93A5B09cD4b598EF62",
        "0x00614Efd868DAbB5f92E15b0440D1F85ac0f9be1",
        "0x006F48D6eD87eFD9e0BC56cC7a8703D0455C2858",
        "0x008B7903F1f0B825636739c7a3defb7EEbc94F1D",
        "0x008c79F10CBd14070b106b05d5Fd494e084EE8A5",
        "0x00Ce8F7e0EC4F03a821E8CB3D84479D76151D0A9",
        "0x00f3a0fcC47ba9f7A757C255aaa6A286a524ceF9",
        "0x016c6422B74463834514394B7207478982139bB4",
        "0x016DF42305bb3D0E21abF75b456a4Babb1777A4B",
        "0x01882145348B9908f803740e547EfbaD0983cDcB",
        "0x018eDC98B3190DbB261E6Ff3858c4BA59c71Ba94",
        "0x019D99678BD3B9F1157E763398a3Dd62cb760A23",
        "0x01aE3e9Aa99F080b59D3A02EE40478af8b3d63c1",
        "0x01E4cF06C6ADb9231a30Ca17f4A62afE23c0A9c1",
        "0x01E6357045328fA19C11994af6a4500754E6a75b",
        "0x02070ed234F1a07cA88F6164791e033C97570d96",
        "0x0207A5cFc75733D82f2dd5A8b6adf78277EF7347",
        "0x025DCA13f8803Ed01B3Ea717e2Ee9DaF7A383cDa",
        "0x02B92b2254c27beD8d4268e663200f705bC76E35",
        "0x02f52b4aF1deCD963a3f0586D28484F530bdC101",
        "0x02fe09e15f1fEAEf2E4Dd4b7afd5A12630f1fae6",
        "0x034C8f85476f2D30c946e3CE5929BC24e8D3B04F",
        "0x037C8b05C9Ffe5e33B99372d17580C0C915AFa60",
        "0x037FC3F7f58771CbcC4C32327814769FBF5A8F3F",
        "0x038080B8BF89847Ca926F9731695859d9c55A4C6",
        "0xffcEBF6Be845b95CFD42e77c65968662BC8F9f2F"
    ]
}

Gets all NFT contracts held by the specified owner address.

Overview of Changes

  • A new totalSupply field has been added.
  • The field title has been removed and replaced with displayNft.name.
  • The field tokenId has been renamed to displayNft.tokenId.
  • A new image object has been created with the specified mappings.
  • The openSea object has been renamed to openSeaMetadata.
  • The collectionSlug and bannerUrl parameters have been added to the openSeaMetadata object.

Example Requests

V2 Example Request

// Imports the Alchemy SDK
const { Alchemy, Network } = require("alchemy-sdk");

// Configures the Alchemy SDK
const config = {
    apiKey: "alchemy-replit", // Replace with your API key
    network: Network.ETH_MAINNET, // Replace with your network
};

// Creates an Alchemy object instance with the config to use for making requests
const alchemy = new Alchemy(config);

const main = async () => {

    const owner = "vitalik.eth"

    //Call the method
    const response = await alchemy.nft.getContractsForOwner(owner)
 
    //Logging the response to the console
    console.log(response)
};

main();

V3 Example Request

Same as V2

V2 <> V3 Mapping

V2V3
addressaddress
totalBalancetotalBalance
numDistinctTokensOwnednumDistinctTokensOwned
namename
titleNot present, use displayNft.name
symbolsymbol
-totalSupply
tokenTypetokenType
contractDeployercontractDeployer
deployedBlockNumberdeployedBlockNumber
isSpamisSpam
tokenIddisplayNft.tokenId
mediaimage
opensea.floorPriceopenSeaMetadata.floorPrice
opensea.collectionNameopenSeaMetadata.collectionName
-openSeaMetadata.collectionSlug
opensea.safelistRequestStatusopenSeaMetadata.safelistRequestStatus
opensea.imageUrlopenSeaMetadata.imageUrl
opensea.descriptionopenSeaMetadata.description
opensea.externalUrlopenSeaMetadata.externalUrl
opensea.twitterUsernameopenSeaMetadata.twitterUsername
opensea.discordUrlopenSeaMetadata.discordUrl
-openSeaMetadata.bannerUrl
opensea.lastIngestedAtopenSeaMetadata.lastIngestedAt
totalCounttotalCount
pageKeypageKey

Example Responses

V2 Example Response

{
  "contracts": [
    {
      "address": "0x000386e3f7559d9b6a2f5c46b4ad1a9587d59dc3",
      "totalBalance": 912,
      "numDistinctTokensOwned": 80,
      "isSpam": true,
      "tokenId": "0x0000000000000000000000000000000000000000000000000000000000000001",
      "name": "Bored Ape Nike Club",
      "title": "",
      "symbol": "BANC",
      "tokenType": "ERC721",
      "contractDeployer": "0x51d7d428041e23ef51422e110dfeff906e821cfe",
      "deployedBlockNumber": 14276343,
      "opensea": {
        "collectionName": "BoredApeNikeClub",
        "collectionSlug": "bored-ape-nike-club-v2",
        "safelistRequestStatus": "not_requested",
        "imageUrl": "https://i.seadn.io/gae/yJ9DgXqjRwgdCkrQmHj7krCbixM8fPVAyYJWJ5NHXap1L0c3QL5MPvrNT0QDINIStGOK857lOvab8MpNQS9X4pkHPktmhVmN82qoVw?w=500&auto=format",
        "description": "COUNTDOWN OVER. MINTING LIVE.\n\n[Mint on the website.](https://nikemetaverse.xyz)\n",
        "externalUrl": "https://nikemetaverse.xyz",
        "bannerImageUrl": "https://i.seadn.io/gae/i84LsC2dtbF5I3YiuaXzzfvSijlBI-ZJ8UEta04Ukl4V57Uoj0ZGw8tNyuPdwrF7N5pclyzdqSJjxHZ65z4G5jQrVRK_DHUMVrzTYQ?w=500&auto=format",
        "lastIngestedAt": "2023-09-21T15:28:51.000Z"
      },
      "media": [
        {
          "gateway": "",
          "raw": ""
        }
      ]
    },
    {
      "address": "0x0da763dfc24764275e56d9011a01186fbacf2edf",
      "totalBalance": 10,
      "numDistinctTokensOwned": 6,
      "isSpam": true,
      "tokenId": "0x0000000000000000000000000000000000000000000000000000000000000012",
      "name": "VeeCon",
      "title": "",
      "symbol": "VC",
      "totalSupply": "8",
      "tokenType": "ERC721",
      "contractDeployer": "0xdce675fcce9cb500b62f69464fe10f2999d77a50",
      "deployedBlockNumber": 14530344,
      "opensea": {
        "collectionName": "Vee Con Tickets Official",
        "collectionSlug": "veecontickets-2022",
        "safelistRequestStatus": "not_requested",
        "imageUrl": "https://i.seadn.io/gae/wPIhTZGy2aMY3rHL6eUUvSansxQqTZwsbnD2Dt7AoW2YQZH-iwiue3Xt6YbO005Z_vwCzyKyVhmHBZ8C4KYttgjmzEpTRc6sAQLWag?w=500&auto=format",
        "description": "[Mint on the website](https://veecontickets.xyz)\n\nVeeCon 2022 is a multi-day superconference where only VeeCon NFT ticket holders will experience an extraordinary lineup of content including iconic keynote speeches; innovative and educational talks, panels and Q&A sessions; and many collaborative experiences",
        "externalUrl": "https://veecontickets.xyz",
        "bannerImageUrl": "https://i.seadn.io/gae/zjaIJ85YSsyeO88fFOegjzeh3lfG8Z0zNYjvjDGrRGpdTyEUw3upA7ZrdRTHbwWu7XVQPheZMOObLKrMWV0mQdbjhZeXiddyKnwLD9E?w=500&auto=format",
        "lastIngestedAt": "2023-09-28T23:32:45.000Z"
      },
      "media": [
        {
          "gateway": "",
          "raw": ""
        }
      ]
    }
  ],
  "totalCount": 2207,
  "pageKey": "94d6b0fd-5288-4cab-8f60-ac5f09941a65"
}

V3 Example Response

{
    "contracts": [
        {
            "address": "0x000386E3F7559d9B6a2F5c46B4aD1A9587D59Dc3",
            "name": "Bored Ape Nike Club",
            "symbol": "BANC",
            "tokenType": "ERC721",
            "contractDeployer": "0x51D7D428041E23ef51422e110dfEfF906e821CFe",
            "deployedBlockNumber": 14276343,
            "openSeaMetadata": {
                "collectionName": "BoredApeNikeClub",
                "collectionSlug": "bored-ape-nike-club-v2",
                "safelistRequestStatus": "not_requested",
                "imageUrl": "https://i.seadn.io/gae/yJ9DgXqjRwgdCkrQmHj7krCbixM8fPVAyYJWJ5NHXap1L0c3QL5MPvrNT0QDINIStGOK857lOvab8MpNQS9X4pkHPktmhVmN82qoVw?w=500&auto=format",
                "description": "COUNTDOWN OVER. MINTING LIVE.\n\n[Mint on the website.](https://nikemetaverse.xyz)\n",
                "externalUrl": "https://nikemetaverse.xyz",
                "bannerImageUrl": "https://i.seadn.io/gae/i84LsC2dtbF5I3YiuaXzzfvSijlBI-ZJ8UEta04Ukl4V57Uoj0ZGw8tNyuPdwrF7N5pclyzdqSJjxHZ65z4G5jQrVRK_DHUMVrzTYQ?w=500&auto=format",
                "lastIngestedAt": "2023-09-21T15:28:51.000Z"
            },
            "totalBalance": "912",
            "numDistinctTokensOwned": "80",
            "isSpam": true,
            "displayNft": {
                "tokenId": "1"
            },
            "image": {}
        },
        {
            "address": "0x0015F391949f25c3211063104aD4AFC99210f85c",
            "name": "BAYC Otherside Land",
            "symbol": "BAYC",
            "totalSupply": "24",
            "tokenType": "ERC721",
            "contractDeployer": "0x4B7A67800712472F5f4a5f580c3B99345DF1CeD6",
            "deployedBlockNumber": 14669988,
            "openSeaMetadata": {
                "collectionName": "BAYC Otherside Land V3",
                "collectionSlug": "bayc-otherside-land-v3-7",
                "safelistRequestStatus": "not_requested",
                "imageUrl": "https://i.seadn.io/gae/aR91WTPUmY4QBkle9qBum5dfjfCyh9n8zgYWyMAFJ-3vUUdquzasMpYyl2Jr6elxhZlPuI1gzthut99h0Z33F_k-xqev_jGldV7X?w=500&auto=format",
                "description": "[Mint on the website](https://baycofficial.xyz)\n\nBAYC Otherside Land is an open world that enables users to build 3D immersive applications on top of several blockchains. In BAYC Otherside Land, users can take advantage of traditional 3D open-world features such as building 3D architectures, hosting virtual meetings, exhibiting NFTs, and more advanced functionality.Details on Twitter @BoredApeYC or PUBLIC MINT NOW LIVE!\n",
                "externalUrl": "https://baycofficial.xyz",
                "bannerImageUrl": "https://i.seadn.io/gae/buhkgp9EPv2YoCeB9k1XWMX7hkBbkpIFkwOdveTZPsVOuKiANbDBwjvAxSpvxhbh5NxU0Kkjje-3VVWk36z-f4Z5rlmAHZXMeisu?w=500&auto=format",
                "lastIngestedAt": "2023-09-21T21:07:17.000Z"
            },
            "totalBalance": "17",
            "numDistinctTokensOwned": "6",
            "isSpam": true,
            "displayNft": {
                "tokenId": "2"
            },
            "image": {}
        },
        {
            "address": "0x0dA763DFc24764275E56D9011A01186fbacF2edf",
            "name": "VeeCon",
            "symbol": "VC",
            "totalSupply": "8",
            "tokenType": "ERC721",
            "contractDeployer": "0xDce675fCcE9Cb500B62f69464fE10f2999d77A50",
            "deployedBlockNumber": 14530344,
            "openSeaMetadata": {
                "collectionName": "Vee Con Tickets Official",
                "collectionSlug": "veecontickets-2022",
                "safelistRequestStatus": "not_requested",
                "imageUrl": "https://i.seadn.io/gae/wPIhTZGy2aMY3rHL6eUUvSansxQqTZwsbnD2Dt7AoW2YQZH-iwiue3Xt6YbO005Z_vwCzyKyVhmHBZ8C4KYttgjmzEpTRc6sAQLWag?w=500&auto=format",
                "description": "[Mint on the website](https://veecontickets.xyz)\n\nVeeCon 2022 is a multi-day superconference where only VeeCon NFT ticket holders will experience an extraordinary lineup of content including iconic keynote speeches; innovative and educational talks, panels and Q&A sessions; and many collaborative experiences",
                "externalUrl": "https://veecontickets.xyz",
                "bannerImageUrl": "https://i.seadn.io/gae/zjaIJ85YSsyeO88fFOegjzeh3lfG8Z0zNYjvjDGrRGpdTyEUw3upA7ZrdRTHbwWu7XVQPheZMOObLKrMWV0mQdbjhZeXiddyKnwLD9E?w=500&auto=format",
                "lastIngestedAt": "2023-09-19T03:10:31.000Z"
            },
            "totalBalance": "10",
            "numDistinctTokensOwned": "6",
            "isSpam": true,
            "displayNft": {
                "tokenId": "18"
            },
            "image": {}
        }
    ],
    "pageKey": "75db8160-ea3f-4cb0-9bc4-4663f6a804af",
    "totalCount": 2207
}

Returns a list of all spam contracts marked by Alchemy.

Overview of Changes

  • The key name for the array of contract addresses in the response has been changed to contractAddresses in V3.

Example Requests

V2 Example Request

// Imports the Alchemy SDK
const { Alchemy, Network } = require("alchemy-sdk");

// Configures the Alchemy SDK
const config = {
    apiKey: "alchemy-replit", // Replace with your API key
    network: Network.ETH_MAINNET, // Replace with your network
};

// Creates an Alchemy object instance with the config to use for making requests
const alchemy = new Alchemy(config);

const main = async () => {
    //Call the method to return a list of spam contracts
    const response = await alchemy.nft.getSpamContracts()

    //Logging the response to the console
    console.log(response)
}

main();

V3 Example Request

Same as V2

V2 <> V3 Mapping

V2 ParameterV3 Parameter
N/AcontractAddresses (new in V3)

Example Responses

V2 Example Response

[
    "0x000000000a42c2791eec307fff43fa5c640e3ef7",
    "0x000294f162dc337cf060ac6e2cb7db8c8f544004",
    "0x000386e3f7559d9b6a2f5c46b4ad1a9587d59dc3",
    "0x00050657890966fc261113dba4c277d9cb204e52",
    "0x0009498dd5a13679ac11927e4bae78c154fcf754",
    "0x000d398c50ea4d0681e6a224749c94334d606ba2",
    "0x000fb295d38c01051e37e65f3034dd4f02267c96",
    "0x0015f391949f25c3211063104ad4afc99210f85c",
    "0x001757861e8233c5a288411ddbf17378e724dd0c",
    "0x001ac203afb48600f5a7d9b524145ac075f648af",
    "0x001f561c73555005a7f22e2ae9cb785cf37cc3b9",
    "0x002cb7d6d92e0bca294e0d4bc5762ef5d535d1d2",
    "0x0030a97650f44802a4331dadeb2a4fc83e59dec1",
    "0xfff9e4b5cf4b0f0ff83bba48ee5a88772cd258b9"
]

V3 Example Response


    "contractAddresses": [
        "0x000000000A42C2791eEc307FFf43Fa5c640e3Ef7",
        "0x000294F162Dc337Cf060AC6e2Cb7Db8c8F544004",
        "0x000386E3F7559d9B6a2F5c46B4aD1A9587D59Dc3",
        "0x00050657890966fc261113DBa4c277d9cb204E52",
        "0x0009498dD5a13679aC11927e4BAE78C154Fcf754",
        "0x000D398c50EA4D0681E6a224749C94334d606Ba2",
        "0x000Fb295d38c01051e37e65F3034dD4F02267c96",
        "0x0015F391949f25c3211063104aD4AFC99210f85c",
        "0x001757861e8233C5a288411dDbf17378e724DD0C",
        "0x001AC203aFB48600f5a7D9b524145AC075f648aF",
        "0x001f561C73555005a7f22e2ae9CB785cf37Cc3B9",
        "0xfFf9e4b5Cf4b0F0fF83BbA48Ee5A88772Cd258B9"
    ]
}

Returns whether a contract is marked as spam or not by Alchemy.

Overview of Changes

  • The V3 response wraps the boolean value in an object with a key isSpamContract.

Example Requests

V2 Example Request

// Imports the Alchemy SDK
const { Alchemy, Network } = require("alchemy-sdk");

// Configures the Alchemy SDK
const config = {
    apiKey: "alchemy-replit", // Replace with your API key
    network: Network.ETH_MAINNET, // Replace with your network
};

// Creates an Alchemy object instance with the config to use for making requests
const alchemy = new Alchemy(config);

const main = async () => {
    // define the contract address
    const address = "0x000440f08436a7b866d1ae42db5e0be801da722a";

    //Call the method to check if a contract is a spam
    const response = await alchemy.nft.isSpamContract(address)

    //Logging the response to the console
    console.log(response)
}

main();

V3 Example Request

Same as V2

V2 <> V3 Mapping

V2 ParameterV3 Parameter
boolean{ "isSpamContract": boolean }

Example Responses

V2 Example Response

false

V3 Example Response

{
    "isSpamContract": false
}

Triggers a metadata refresh of all NFTs in the provided contract address. This method is useful after an NFT collection is revealed.

Overview of Changes

  • There are no changes in the method's request, response format, or parameter names/structures between V2 and V3.

Example Requests

V2 Example Request

// Imports the Alchemy SDK
const { Alchemy, Network } = require("alchemy-sdk");

// Configures the Alchemy SDK
const config = {
    apiKey: "alchemy-replit", // Replace with your API key
    network: Network.ETH_MAINNET, // Replace with your network
};

// Creates an Alchemy object instance with the config to use for making requests
const alchemy = new Alchemy(config);

const main = async () => {
    // define the contract address
    const address = "0x5180db8F5c931aaE63c74266b211F580155ecac8";

    //Call the method to return the refresh result response object
    const response = await alchemy.nft.refreshContract(address)

    //Logging the response to the console
    console.log(response)
}

main();

V3 Example Request

Same as V2

V2 <> V3 Mapping

V2 ParameterV3 Parameter
contractAddresscontractAddress
refreshStaterefreshState
progressprogress

Example Responses

V2 Example Response

{
    "contractAddress": "0x5180db8f5c931aae63c74266b211f580155ecac8",
    "refreshState": "queued",
    "progress": 0
}

V3 Example Response

{
    "contractAddress": "0x5180db8f5c931aae63c74266b211f580155ecac8",
    "refreshState": "already_queued",
    "progress": 0
}

Returns the floor prices of an NFT contract by marketplace.

Overview of Changes

  • The response structure has been reorganized in V3. Instead of an array of objects, the response now contains an object with a rarities property that holds an array of objects.

Example Requests

V2 Example Request

// Imports the Alchemy SDK
const { Alchemy, Network } = require("alchemy-sdk");

// Configures the Alchemy SDK
const config = {
    apiKey: "alchemy-replit", // Replace with your API key
    network: Network.ETH_MAINNET, // Replace with your network
};

// Creates an Alchemy object instance with the config to use for making requests
const alchemy = new Alchemy(config);

const main = async () => {
    // define the contract address and tokenId
    const address = "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d";
    const tokenId = 145;

    //Call the method to display the rarity of each attribute of the NFT
    const response = await alchemy.nft.computeRarity(address, tokenId)

    //Logging the response to the console
    console.log(response)
}

main();

V3 Example Request

Same as V2

V2 <> V3 Mapping

V2 ParameterV3 Parameter
prevalencerarities.prevalence
traitTyperarities.traitType
valuerarities.value

Example Responses

V2 Example Response

[
    {
        "prevalence": 0.1273,
        "traitType": "Background",
        "value": "Orange"
    },
    {
        "prevalence": 0.013,
        "traitType": "Hat",
        "value": "Prussian Helmet"
    },
    {
        "prevalence": 0.1551,
        "traitType": "Mouth",
        "value": "Bored Unshaven"
    },
    {
        "prevalence": 0.1229,
        "traitType": "Fur",
        "value": "Black"
    },
    {
        "prevalence": 0.0203,
        "traitType": "Clothes",
        "value": "Bone Necklace"
    },
    {
        "prevalence": 0.0487,
        "traitType": "Eyes",
        "value": "3d"
    }
]

V3 Example Response

{
    "rarities": [
        {
            "traitType": "Background",
            "value": "Orange",
            "prevalence": 0.1273
        },
        {
            "traitType": "Hat",
            "value": "Prussian Helmet",
            "prevalence": 0.013
        },
        {
            "traitType": "Mouth",
            "value": "Bored Unshaven",
            "prevalence": 0.1551
        },
        {
            "traitType": "Fur",
            "value": "Black",
            "prevalence": 0.1229
        },
        {
            "traitType": "Clothes",
            "value": "Bone Necklace",
            "prevalence": 0.0203
        },
        {
            "traitType": "Eyes",
            "value": "3d",
            "prevalence": 0.0487
        }
    ]
}

Checks that the provided owner address owns one or more of the provided NFTs. Returns a boolean indicating whether the owner's address owns the provided NFT.

Overview of Changes

  • There are no changes in the method's request, response format, or parameter names/structures between V2 and V3.

Example Requests

V2 Example Request

// Imports the Alchemy SDK
const { Alchemy, Network } = require("alchemy-sdk");

// Configures the Alchemy SDK
const config = {
    apiKey: "alchemy-replit", // Replace with your API key
    network: Network.ETH_MAINNET, // Replace with your network
};

// Creates an Alchemy object instance with the config to use for making requests
const alchemy = new Alchemy(config);

const main = async () => {
    // define the contract address and owner
    const address = "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8";
    const owner = "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D";

    //Call the method to display the rarity of each attribute of the NFT
    const response = await alchemy.nft.verifyNftOwnership(owner, address)

    //Logging the response to the console
    console.log(response)
}

main();

V3 Example Request

Same as V2

V2 <> V3 Mapping

V2 ParameterV3 Parameter
booleanboolean

Example Responses

V2 Example Response

false

V3 Example Response

false

ReadMe