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