NFT API

Build any NFT app you can imagine

The multi-chain API to launch, verify, analyze, trade and display NFTs. Faster, easier, free.

Build any NFT App you can imagine

The multi-chain API to launch, verify, analyze, trade and display NFTs. Faster, easier, free.
Copy
Copy
1
2
3
4
5
6
7
8
9
10
// This script demonstrates access to the NFT API via the Alchemy SDK.
import { Network, Alchemy } from "alchemy-sdk";
 
// Optional Config object, but defaults to demo api-key and eth-mainnet.
const settings = {
  apiKey: "demo", // Replace with your Alchemy API Key.
  network: Network.ETH_MAINNET, // Replace with your network.
};
 
const alchemy = new Alchemy(settings);

{
 "contract": {
   "address": "0xe785e82358879f061bc3dcac6f0444462d4b5330"
 },
 "id": {
   "tokenId": "44",
   "tokenMetadata": {
     "tokenType": "ERC721"
   }
 },
 "title": "WoW #44",
 "description": "",
 "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
   }
 ],
 "metadata": {
   "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"
     }
   ]
 },
 "timeLastUpdated": "2023-10-17T01:28:55.067Z",
 "contractMetadata": {
   "name": "World Of Women",
   "symbol": "WOW",
   "totalSupply": "10000",
   "tokenType": "ERC721",
   "contractDeployer": "0xc9b6321dc216d91e626e9baa61b06b0e4d55bdb1",
   "deployedBlockNumber": 12907782,
   "openSea": {
     "floorPrice": 0.767,
     "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-10-17T00:28:30.000Z"
   }
 }
}

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
{
 "contract": {
  "address": "0xe785e82358879f061bc3dcac6f0444462d4b5330"
 },
 "id": {
  "tokenId": "44",
  "tokenMetadata": {
   "tokenType": "ERC721"
 }
},
 "title": "WoW #44",
 "description": "",
 "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
  }
],
 "metadata": {
  "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"
   }
  ]
},
 "timeLastUpdated": "2023-10-17T01:28:55.067Z",
 "contractMetadata": {
  "name": "World Of Women",
  "symbol": "WOW",
  "totalSupply": "10000",
  "tokenType": "ERC721",
  "contractDeployer": "0xc9b6321dc216d91e626e9baa61b06b0e4d55bdb1",
  "deployedBlockNumber": 12907782,
  "openSea": {
   "floorPrice": 0.767,
   "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-10-17T00:28:30.000Z"
   }
 }
}
Reset
Builders using NFT API
"Alchemy’s NFT API will allow us to be the token verification system for every web3 community in the world - so we can quickly, accurately and reliably query NFT metadata, and our customers can create meaningful shared experiences for their users.”
Raymond Feng, Co-Founder  CTO, Collab.Land

A few lines of code to create a seamless NFT experience

// Github: https://github.com/alchemyplatform/alchemy-sdk-js
// Setup: npm install alchemy-sdk
import { Network, Alchemy } from "alchemy-sdk";// Optional Config object, but defaults to demo api-key and eth-mainnet.
const settings = {
 apiKey: "demo", // Replace with your Alchemy API Key.
 network: Network.ETH_MAINNET, // Replace with your network.
};const alchemy = new Alchemy(settings);// Print NFT metadata returned in the response:
alchemy.nft.getNftMetadata(
 "0x5180db8F5c931aaE63c74266b211F580155ecac8",
 "1590"
).then(console.log);

{
 "contract": {
   "address": "0xe785e82358879f061bc3dcac6f0444462d4b5330"
 },
 "id": {
   "tokenId": "44",
   "tokenMetadata": {
     "tokenType": "ERC721"
   }
 },
 "title": "WoW #44",
 "description": "",
 "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
   }
 ],
 "metadata": {
   "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"
     }
   ]
 },
 "timeLastUpdated": "2023-10-17T01:28:55.067Z",
 "contractMetadata": {
   "name": "World Of Women",
   "symbol": "WOW",
   "totalSupply": "10000",
   "tokenType": "ERC721",
   "contractDeployer": "0xc9b6321dc216d91e626e9baa61b06b0e4d55bdb1",
   "deployedBlockNumber": 12907782,
   "openSea": {
     "floorPrice": 0.767,
     "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-10-17T00:28:30.000Z"
   }
 }
}

1
2
3
4
5
import { Alchemy } from "alchemy-sdk";
import { Alchemy } from "alchemy-sdk";
Alchemy().nft.getFloorPrice("0xbc4ca0eda7647a8...e118a18a936f13d")
.then(console.log);
import { Alchemy } from "alchemy-sdk";
import { Alchemy } from "alchemy-sdk";
Alchemy().nft.getFloorPrice
("0xbc4ca0eda7647a8...e118a18a936f13d")
.then(console.log);
Copy
Copy
1
2
3
4
5
6
const options = {method: 'GET', headers: {accept: 'application/json'}};
 
fetch('https://eth-mainnet.g.alchemy.com/nft/v2/docs-demo/getContractsForOwner?owner=0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045&pageSize=100&withMetadata=true', options)
 .then(response => response.json())
 .then(response => console.log(response))
 .catch(err => console.error(err));
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{
  "contracts": [
   {
    "address": "0x00. 386e3f7559d9b6a2f5c46b4ad1a9587d59dc3",
    "totalBalance": 912,
    "numDistinctTokensOwned": 80,
    "isSpam": true,
    "tokenId": "0x0000000000000000000000000000000000000000000000000000000000000001",
    "name": "Bored Ape Nike Club",
    "title": "",
    "symbol": "BANC",
    "tokenType": "ERC721",
    "contractDeployer": "0x51d7d428041e23ef51422e110dfeff906e821cfe",
    "deployedBlockNumber": 14276343,
    "opensea": {
     "collectionName": "BoredApeNikeClub",
     "collectionSlug": "bored-ape-nike-club-v2",
     "safelistRequestStatus": "not_requested",
     "imageUrl": "https://i.seadn.io/gae/yJ9DgXqjRwgdCkrQmHj7krCbixM8fPVAyYJWJ5NHXap1L0c3QL5MPvrNT0QDINIStGOK857lOvab8MpNQS9X4pkHPktmhVmN82qoVw?w=500&auto=format",
...3004 more rows
Try it!
Reset
Gets all NFTs currently owned by users to verify ownership and token gate experiences.
Explore the docs
  • Gets all NFTs currently owned by a given address.
Copy
Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Github: https://github.com/alchemyplatform/alchemy-sdk-js
// Setup: npm install alchemy-sdk
import { Network, Alchemy } from "alchemy-sdk";
 
// Optional Config object, but defaults to demo api-key and eth-mainnet.
const settings = {
  apiKey: "demo", // Replace with your Alchemy API Key.
  network: Network.ETH_MAINNET, // Replace with your network.
};
 
const alchemy = new Alchemy(settings);
 
// Print NFT metadata returned in the response:
alchemy.nft.getNftMetadata(
 "0x5180db8F5c931aaE63c74266b211F580155ecac8",
 "1590"
).then(console.log);

{
 "contract": {
   "address": "0xe785e82358879f061bc3dcac6f0444462d4b5330"
 },
 "id": {
   "tokenId": "44",
   "tokenMetadata": {
     "tokenType": "ERC721"
   }
 },
 "title": "WoW #44",
 "description": "",
 "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
   }
 ],
 "metadata": {
   "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"
     }
   ]
 },
 "timeLastUpdated": "2023-10-17T01:28:55.067Z",
 "contractMetadata": {
   "name": "World Of Women",
   "symbol": "WOW",
   "totalSupply": "10000",
   "tokenType": "ERC721",
   "contractDeployer": "0xc9b6321dc216d91e626e9baa61b06b0e4d55bdb1",
   "deployedBlockNumber": 12907782,
   "openSea": {
     "floorPrice": 0.767,
     "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-10-17T00:28:30.000Z"
   }
 }
}

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
{
 "contract": {
  "address": "0xe785e82358879f061bc3dcac6f0444462d4b5330"
 },
 "id": {
  "tokenId": "44",
  "tokenMetadata": {
   "tokenType": "ERC721"
 }
},
 "title": "WoW #44",
 "description": "",
 "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
  }
],
 "metadata": {
  "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"
   }
  ]
},
 "timeLastUpdated": "2023-10-17T01:28:55.067Z",
 "contractMetadata": {
  "name": "World Of Women",
  "symbol": "WOW",
  "totalSupply": "10000",
  "tokenType": "ERC721",
  "contractDeployer": "0xc9b6321dc216d91e626e9baa61b06b0e4d55bdb1",
  "deployedBlockNumber": 12907782,
  "openSea": {
   "floorPrice": 0.767,
   "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-10-17T00:28:30.000Z"
   }
 }
}
Try it!
Reset
Get the most accurate and up-to-date NFT data.
Explore the docs
  • Retrieve NFT metadata 17x faster
  • Get the latest NFT collection data from multiple marketplaces
  • Realtime at-head transfer data
1
2
3
4
5
import { Alchemy } from "alchemy-sdk";
import { Alchemy } from "alchemy-sdk";
Alchemy().nft.getNftsForOwner("0xshah.eth").then(console.log);
import { Alchemy } from "alchemy-sdk";
import { Alchemy } from "alchemy-sdk";
Alchemy().nft.getNftsForOwner
("0xshah.eth")
.then(console.log);
1
2
3
4
5
import { Alchemy } from "alchemy-sdk";
import { Alchemy } from "alchemy-sdk";
Alchemy().nft.getNftsForContract("0x61fce80d72363...1a5fed9814b2")
.then(console.log);
import { Alchemy } from "alchemy-sdk";
import { Alchemy } from "alchemy-sdk";
Alchemy().nft.getNftsForContract
("0x61fce80d72363...1a5fed9814b2")
.then(console.log);
Copy
Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Github: https://github.com/alchemyplatform/alchemy-sdk-js
// Setup: npm install alchemy-sdk
import { Network, Alchemy } from "alchemy-sdk";
 
// Optional Config object, but defaults to demo api-key and eth-mainnet.
const settings = {
  apiKey: "demo", // Replace with your Alchemy API Key.
  network: Network.ETH_MAINNET, // Replace with your network.
};
 
const alchemy = new Alchemy(settings);
 
// Print NFT metadata returned in the response:
alchemy.nft.getSpamContracts().then(console.log);

{
 "contract": {
   "address": "0xe785e82358879f061bc3dcac6f0444462d4b5330"
 },
 "id": {
   "tokenId": "44",
   "tokenMetadata": {
     "tokenType": "ERC721"
   }
 },
 "title": "WoW #44",
 "description": "",
 "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
   }
 ],
 "metadata": {
   "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"
     }
   ]
 },
 "timeLastUpdated": "2023-10-17T01:28:55.067Z",
 "contractMetadata": {
   "name": "World Of Women",
   "symbol": "WOW",
   "totalSupply": "10000",
   "tokenType": "ERC721",
   "contractDeployer": "0xc9b6321dc216d91e626e9baa61b06b0e4d55bdb1",
   "deployedBlockNumber": 12907782,
   "openSea": {
     "floorPrice": 0.767,
     "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-10-17T00:28:30.000Z"
   }
 }
}

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
[
 "0x000000000a42c2791eec307fff43fa5c640e3ef7",
 "0x000294f162dc337cf060ac6e2cb7db8c8f544004",
 "0x000386e3f7559d9b6a2f5c46b4ad1a9587d59dc3",
 "0x00050657890966fc261113dba4c277d9cb204e52",
 "0x0009498dd5a13679ac11927e4bae78c154fcf754",
 "0x000d398c50ea4d0681e6a224749c94334d606ba2",
 "0x000fb295d38c01051e37e65f3034dd4f02267c96",
 "0x000fb295d38c01051e37e65f3034dd4f02267c96",
 "0x001757861e8233c5a288411ddbf17378e724dd0c",
 "0x001ac203afb48600f5a7d9b524145ac075f648af",
 "0x001f561c73555005a7f22e2ae9cb785cf37cc3b9",
 "0x002cb7d6d92e0bca294e0d4bc5762ef5d535d1d2",
 "0x0030a97650f44802a4331dadeb2a4fc83e59dec1",
 "0x00339cdae963a4ce1897507c23a5a926f69432f8",
 "0x0033f5a529bb074cdf3806d1f4132ef317d4a5a3",
 "0x0034cf478be447d956ed73fd29d1ec9ba1669fb1",
 "0x0038a8e6209d53dd93a3e3634ebfe6a8a0f68e33",
...14,384 more rows
]
Try it!
Reset
Improve your user’s experience and automatically filter our Spam NFTs for them.
Explore the docs
  • Filter out spam and airdropped NFTs
  • Create spam reports from multiple chains
  • Query on multiple chains with a single query
1
2
3
4
5
import { Alchemy } from "alchemy-sdk";
import { Alchemy } from "alchemy-sdk";
Alchemy().nft.getFloorPrice("0xbc4ca0eda7647a8...e118a18a936f13d")
.then(console.log);
import { Alchemy } from "alchemy-sdk";
import { Alchemy } from "alchemy-sdk";
Alchemy().nft.getFloorPrice
("0xbc4ca0eda7647a8...e118a18a936f13d")
.then(console.log);
Copy
Copy
1
2
3
4
5
6
const options = {method: 'GET', headers: {accept: 'application/json'}};
 
fetch('https://eth-mainnet.g.alchemy.com/nft/v2/docs-demo/getNFTSales?fromBlock=0&toBlock=latest&order=asc&contractAddress=0xe785E82358879F061BC3dcAC6f0444462D4b5330&tokenId=44', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));

{
 "contract": {
   "address": "0xe785e82358879f061bc3dcac6f0444462d4b5330"
 },
 "id": {
   "tokenId": "44",
   "tokenMetadata": {
     "tokenType": "ERC721"
   }
 },
 "title": "WoW #44",
 "description": "",
 "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
   }
 ],
 "metadata": {
   "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"
     }
   ]
 },
 "timeLastUpdated": "2023-10-17T01:28:55.067Z",
 "contractMetadata": {
   "name": "World Of Women",
   "symbol": "WOW",
   "totalSupply": "10000",
   "tokenType": "ERC721",
   "contractDeployer": "0xc9b6321dc216d91e626e9baa61b06b0e4d55bdb1",
   "deployedBlockNumber": 12907782,
   "openSea": {
     "floorPrice": 0.767,
     "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-10-17T00:28:30.000Z"
   }
 }
}

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
{
 "nftSales": [
  {
   "marketplace": "wyvern",
   "marketplaceAddress": "0x7be8076f4ea4a4ad08075c2508e481d6c946d12b",
   "contractAddress": "0xe785e82358879f061bc3dcac6f0444462d4b5330",
   "tokenId": "44",
   "quantity": "1",
   "buyerAddress": "0xcdc78dbe7ccbb7ab2e07aea18c1a6424c57ad63d",
   "sellerAddress": "0x758070e86f10b4b7be14f5fefeb11aeb0d3f56de",
   "taker": "SELLER",
   "sellerFee": {
    "amount": "1718062500000000000",
    "tokenAddress": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
    "symbol": "WETH",
    "decimals": 18
   },
   "protocolFee": {
    "amount": "45937500000000000",
    "tokenAddress": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
    "symbol": "WETH",
    "decimals": 18
   },
   "royaltyFee": {
    "amount": "73500000000000000",
    "tokenAddress": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
    "symbol": "WETH",
    "decimals": 18
   },
   "blockNumber": 13869130,
   "logIndex": 71,
   "bundleIndex": 0,
   "transactionHash": "0xfe2f6d1b244c0052a1bca636fed7a39a1ef04639645c8a374a22702cc08a1e01"
  },
  {
   "marketplace": "wyvern",
   "marketplaceAddress": "0x7. e8076f4ea4a4ad08075c2508e481d6c946d12b",
   "contractAddress": "0xe785e82358879f061bc3dcac6f0444462d4b5330",
   "tokenId": "44",
   "quantity": "1",
   "buyerAddress": "0x30e924cff3c2a73b153d1c935819d752c555eaaf",
   "sellerAddress": "0xcdc78dbe7ccbb7ab2e07aea18c1a6424c57ad63d",
   "taker": "BUYER",
   "sellerFee": {
    "amount": "3085500000000000000",
    "tokenAddress": "0x0000000000000000000000000000000000000000",
    "symbol": "ETH",
    "decimals": 18
   },
   "protocolFee": {
    "amount": "82500000000000000",
    "tokenAddress": "0x0000000000000000000000000000000000000000",
    "symbol": "ETH",
    "decimals": 18
   },
   "royaltyFee": {
    "amount": "132000000000000000",
    "tokenAddress": "0x0000000000000000000000000000000000000000",
    "symbol": "ETH",
    "decimals": 18
   },
   "blockNumber": 13954608,
   "logIndex": 376,
   "bundleIndex": 0,
   "transactionHash": "0xbee870d558b72f255001310ee10d608b9102df57fe0c85d1364f6613b5b079d4"
   },
   {
    "marketplace": "seaport",
    "marketplaceAddress": "0x00000000006c3852cbef3e08e8df289169ede581",
    "contractAddress": "0xe785e82358879f061bc3dcac6f0444462d4b5330",
    "tokenId": "44",
    "quantity": "1",
    "buyerAddress": "0x9f4f78a6c4a5e6f8afa81631b9120ae3c831b494",
    "sellerAddress": "0x5e6ae73dfbe52411b400f2131d1b1350d47cc1f4",
    "taker": "BUYER",
    "sellerFee": {
     "amount": "3740000000000000000",
     "tokenAddress": "0x0000000000000000000000000000000000000000",
     "symbol": "ETH",
     "decimals": 18
    },
    "protocolFee": {
     "amount": "100000000000000000",
     "tokenAddress": "0x0000000000000000000000000000000000000000",
     "symbol": "ETH",
     "decimals": 18
    },
    "royaltyFee": {
     "amount": "160000000000000000",
     "tokenAddress": "0x0000000000000000000000000000000000000000",
     "symbol": "ETH",
     "decimals": 18
    },
    "blockNumber": 15898306,
    "logIndex": 150,
    "bundleIndex": 0,
    "transactionHash": "0xe71c65065321dd9e70986174ec064c7f8f2e2ab7c9a3d83649ee80a98dbb131b"
   }
  ],
  "validAt": {
   "blockNumber": 18373611,
   "blockHash": "0xd101b8cbb562560870dcfeebb96b18a54043a4ab4cbaee03e0877d41074d1259",
   "blockTimestamp": "2023-10-18T00:16:35Z"
 }
}
Try it!
Reset
See floor price and sales history from top NFT marketplaces.
Explore the docs
  • Get the latest NFTs and price data from the most popular marketplaces like OpenSea, Magic Eden, Rarible and more
1
2
3
4
5
import { Alchemy } from "alchemy-sdk";
import { Alchemy } from "alchemy-sdk";
Alchemy().nft.getFloorPrice("0xbc4ca0eda7647a8...e118a18a936f13d")
.then(console.log);
import { Alchemy } from "alchemy-sdk";
import { Alchemy } from "alchemy-sdk";
Alchemy().nft.getFloorPrice
("0xbc4ca0eda7647a8...e118a18a936f13d")
.then(console.log);
Copy
Copy
1
2
3
4
5
6
const options = {method: 'GET', headers: {accept: 'application/json'}};
 
fetch('https://eth-mainnet.g.alchemy.com/nft/v2/docs-demo/computeRarity?contractAddress=0xe785E82358879F061BC3dcAC6f0444462D4b5330&tokenId=44', options)
 .then(response => response.json())
 .then(response => console.log(response))
 .catch(err => console.error(err));

{
 "contract": {
   "address": "0xe785e82358879f061bc3dcac6f0444462d4b5330"
 },
 "id": {
   "tokenId": "44",
   "tokenMetadata": {
     "tokenType": "ERC721"
   }
 },
 "title": "WoW #44",
 "description": "",
 "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
   }
 ],
 "metadata": {
   "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"
     }
   ]
 },
 "timeLastUpdated": "2023-10-17T01:28:55.067Z",
 "contractMetadata": {
   "name": "World Of Women",
   "symbol": "WOW",
   "totalSupply": "10000",
   "tokenType": "ERC721",
   "contractDeployer": "0xc9b6321dc216d91e626e9baa61b06b0e4d55bdb1",
   "deployedBlockNumber": 12907782,
   "openSea": {
     "floorPrice": 0.767,
     "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-10-17T00:28:30.000Z"
   }
 }
}

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
[
  {
   "value": "Green Orange",
   "trait_type": "Background",
   "prevalence": 0.0303
  },
  {
   "value": "Medium Gold",
   "trait_type": "Skin Tone",
   "prevalence": 0.0294
  },
  {
   "value": "Green To The Left",
   "trait_type": "Eyes",
   "prevalence": 0.0128
  },
  {
   "value": "Freckles",
   "trait_type": "Facial Features",
   "prevalence": 0.0189
  },
  {
   "value": "Boy Cut",
   "trait_type": "Hairstyle",
   "prevalence": 0.017
  },
  {
   "value": "Tunic",
   "trait_type": "Clothes",
   "prevalence": 0.0062
  },
  {
   "value": "Spikes",
   "trait_type": "Earrings",
   "prevalence": 0.0249
  },
  {
   "value": "Slight Smile",
   "trait_type": "Mouth",
   "prevalence": 0.0547
  },
  {
   "value": "Purple",
   "trait_type": "Lips Color",
   "prevalence": 0.0619
  }
]
Try it!
Reset
See rarity scores of NFT attributes and the frequency of those attributes.
Explore the docs
  • Calculate and display the rarity of different NFT items for marketplaces, in-game items, and more.

// Github: https://github.com/alchemyplatform/alchemy-sdk-js
// Setup: npm install alchemy-sdk
import { Network, Alchemy } from "alchemy-sdk";// Optional Config object, but defaults to demo api-key and eth-mainnet.
const settings = {
 apiKey: "demo", // Replace with your Alchemy API Key.
 network: Network.ETH_MAINNET, // Replace with your network.
};const alchemy = new Alchemy(settings);// Print all spam NFT contracts returned in the response:
alchemy.nft.getSpamContracts().then(console.log);

[
 "0x000000000a42c2791eec307fff43fa5c640e3ef7",
 "0x000294f162dc337cf060ac6e2cb7db8c8f544004",
 "0x000386e3f7559d9b6a2f5c46b4ad1a9587d59dc3",
 "0x00050657890966fc261113dba4c277d9cb204e52",
 "0x0009498dd5a13679ac11927e4bae78c154fcf754",
 "0x000d398c50ea4d0681e6a224749c94334d606ba2",
 "0x000fb295d38c01051e37e65f3034dd4f02267c96",
 "0x0015f391949f25c3211063104ad4afc99210f85c",
 "0x001757861e8233c5a288411ddbf17378e724dd0c",
 "0x001ac203afb48600f5a7d9b524145ac075f648af",
 "0x001f561c73555005a7f22e2ae9cb785cf37cc3b9",
 "0x002cb7d6d92e0bca294e0d4bc5762ef5d535d1d2",
 "0x0030a97650f44802a4331dadeb2a4fc83e59dec1",
 "0x00339cdae963a4ce1897507c23a5a926f69432f8",
 "0x0033f5a529bb074cdf3806d1f4132ef317d4a5a3",
 "0x0034cf478be447d956ed73fd29d1ec9ba1669fb1",
 "0x0038a8e6209d53dd93a3e3634ebfe6a8a0f68e33",
 "0x003b77b7a433aef95d5fe557fee397bc1fb8da1b",
 "0x00415a31ca6d1904820b942bab1e3d8936398b8a",

const options = {method: 'GET', headers: {accept: 'application/json'}};fetch('https://eth-mainnet.g.alchemy.com/nft/v2/docs-demo/getNFTSales?fromBlock=0&toBlock=latest&order=asc&contractAddress=0xe785E82358879F061BC3dcAC6f0444462D4b5330&tokenId=44', options)
 .then(response => response.json())
 .then(response => console.log(response))
 .catch(err => console.error(err));

{
 "nftSales": [
   {
     "marketplace": "wyvern",
     "marketplaceAddress": "0x7be8076f4ea4a4ad08075c2508e481d6c946d12b",
     "contractAddress": "0xe785e82358879f061bc3dcac6f0444462d4b5330",
     "tokenId": "44",
     "quantity": "1",
     "buyerAddress": "0xcdc78dbe7ccbb7ab2e07aea18c1a6424c57ad63d",
     "sellerAddress": "0x758070e86f10b4b7be14f5fefeb11aeb0d3f56de",
     "taker": "SELLER",
     "sellerFee": {
       "amount": "1718062500000000000",
       "tokenAddress": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
       "symbol": "WETH",
       "decimals": 18
     },
     "protocolFee": {
       "amount": "45937500000000000",
       "tokenAddress": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
       "symbol": "WETH",
       "decimals": 18
     },
     "royaltyFee": {
       "amount": "73500000000000000",
       "tokenAddress": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
       "symbol": "WETH",
       "decimals": 18
     },
     "blockNumber": 13869130,
     "logIndex": 71,
     "bundleIndex": 0,
     "transactionHash": "0xfe2f6d1b244c0052a1bca636fed7a39a1ef04639645c8a374a22702cc08a1e01"
   },
   {
     "marketplace": "wyvern",
     "marketplaceAddress": "0x7be8076f4ea4a4ad08075c2508e481d6c946d12b",
     "contractAddress": "0xe785e82358879f061bc3dcac6f0444462d4b5330",
     "tokenId": "44",
     "quantity": "1",
     "buyerAddress": "0x30e924cff3c2a73b153d1c935819d752c555eaaf",
     "sellerAddress": "0xcdc78dbe7ccbb7ab2e07aea18c1a6424c57ad63d",
     "taker": "BUYER",
     "sellerFee": {
       "amount": "3085500000000000000",
       "tokenAddress": "0x0000000000000000000000000000000000000000",
       "symbol": "ETH",
       "decimals": 18
     },
     "protocolFee": {
       "amount": "82500000000000000",
       "tokenAddress": "0x0000000000000000000000000000000000000000",
       "symbol": "ETH",
       "decimals": 18
     },
     "royaltyFee": {
       "amount": "132000000000000000",
       "tokenAddress": "0x0000000000000000000000000000000000000000",
       "symbol": "ETH",
       "decimals": 18
     },
     "blockNumber": 13954608,
     "logIndex": 376,
     "bundleIndex": 0,
     "transactionHash": "0xbee870d558b72f255001310ee10d608b9102df57fe0c85d1364f6613b5b079d4"
   },
   {
     "marketplace": "seaport",
     "marketplaceAddress": "0x00000000006c3852cbef3e08e8df289169ede581",
     "contractAddress": "0xe785e82358879f061bc3dcac6f0444462d4b5330",
     "tokenId": "44",
     "quantity": "1",
     "buyerAddress": "0x9f4f78a6c4a5e6f8afa81631b9120ae3c831b494",
     "sellerAddress": "0x5e6ae73dfbe52411b400f2131d1b1350d47cc1f4",
     "taker": "BUYER",
     "sellerFee": {
       "amount": "3740000000000000000",
       "tokenAddress": "0x0000000000000000000000000000000000000000",
       "symbol": "ETH",
       "decimals": 18
     },
     "protocolFee": {
       "amount": "100000000000000000",
       "tokenAddress": "0x0000000000000000000000000000000000000000",
       "symbol": "ETH",
       "decimals": 18
     },
     "royaltyFee": {
       "amount": "160000000000000000",
       "tokenAddress": "0x0000000000000000000000000000000000000000",
       "symbol": "ETH",
       "decimals": 18
     },
     "blockNumber": 15898306,
     "logIndex": 150,
     "bundleIndex": 0,
     "transactionHash": "0xe71c65065321dd9e70986174ec064c7f8f2e2ab7c9a3d83649ee80a98dbb131b"
   }
 ],
 "validAt": {
   "blockNumber": 18374250,
   "blockHash": "0xacd00b8f73404ef849211771f29e9d3988da60e4b03eac5823a5fc5207e2ca24",
   "blockTimestamp": "2023-10-18T02:25:23Z"
 }
}

const options = {method: 'GET', headers: {accept: 'application/json'}};fetch('https://eth-mainnet.g.alchemy.com/nft/v2/docs-demo/computeRarity?contractAddress=0xe785E82358879F061BC3dcAC6f0444462D4b5330&tokenId=44', options)
 .then(response => response.json())
 .then(response => console.log(response))
 .catch(err => console.error(err));

[
 {
   "value": "Green Orange",
   "trait_type": "Background",
   "prevalence": 0.0303
 },
 {
   "value": "Medium Gold",
   "trait_type": "Skin Tone",
   "prevalence": 0.0294
 },
 {
   "value": "Green To The Left",
   "trait_type": "Eyes",
   "prevalence": 0.0128
 },
 {
   "value": "Freckles",
   "trait_type": "Facial Features",
   "prevalence": 0.0189
 },
 {
   "value": "Boy Cut",
   "trait_type": "Hairstyle",
   "prevalence": 0.017
 },
 {
   "value": "Tunic",
   "trait_type": "Clothes",
   "prevalence": 0.0062
 },
 {
   "value": "Spikes",
   "trait_type": "Earrings",
   "prevalence": 0.0249
 },
 {
   "value": "Slight Smile",
   "trait_type": "Mouth",
   "prevalence": 0.0547
 },
 {
   "value": "Purple",
   "trait_type": "Lips Color",
   "prevalence": 0.0619
 }
]

const options = {method: 'GET', headers: {accept: 'application/json'}};fetch('https://eth-mainnet.g.alchemy.com/nft/v2/docs-demo/getContractsForOwner?owner=0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045&pageSize=100&withMetadata=true', options)
 .then(response => response.json())
 .then(response => console.log(response))
 .catch(err => console.error(err));

{
 "contracts": [
   {
     "address": "0x000386e3f7559d9b6a2f5c46b4ad1a9587d59dc3",
     "totalBalance": 912,
     "numDistinctTokensOwned": 80,
     "isSpam": true,
     "tokenId": "0x0000000000000000000000000000000000000000000000000000000000000001",
     "name": "Bored Ape Nike Club",
     "title": "",
     "symbol": "BANC",
     "tokenType": "ERC721",
     "contractDeployer": "0x51d7d428041e23ef51422e110dfeff906e821cfe",
     "deployedBlockNumber": 14276343,
     "opensea": {
       "collectionName": "BoredApeNikeClub",
       "collectionSlug": "bored-ape-nike-club-v2",
       "safelistRequestStatus": "not_requested",
       "imageUrl": "https://i.seadn.io/gae/yJ9DgXqjRwgdCkrQmHj7krCbixM8fPVAyYJWJ5NHXap1L0c3QL5MPvrNT0QDINIStGOK857lOvab8MpNQS9X4pkHPktmhVmN82qoVw?w=500&auto=format",

// This script demonstrates access to the NFT API via the Alchemy SDK.import { Network, Alchemy } from "alchemy-sdk";// Optional Config object, but defaults to demo api-key and eth-mainnet.const settings = {  apiKey: "demo", // Replace with your Alchemy API Key.  network: Network.ETH_MAINNET, // Replace with your network.};const alchemy = new Alchemy(settings);

Leading the industry

Better than the rest

2.7x more

NFTs than alternatives

17x faster

than alternatives

4x better

spam detection than alternatives

Compare NFT API providers

The NFT API Comparison Tool let's you compare the performance of commonly used NFT APIs currently available in market.

Use cases

Imagine all you can build

Read the docs

NFT Drops

Launch your NFT collection with confidence.

Token Gating

Build community and create unique experiences based on verified ownership.

Analytics

Empower people to trade and earn smarter.

Wallets

Innovate how NFTs are organized and showcased.

Marketplaces

Enable safe, simple and intuitive NFT purchases.

Developer Abstractions

Create no-code resources so anyone can start building.

Save money. Ship faster.

2.7x more
NFTs than alternatives
17x faster
than alternatives
4x better
spam detection than alternatives
Blockchain
“Alchemy is perfect. The team is perfect. I wish our other partners were more like them. My life would be much easier."
Head of Protocol, LayerZero
|
Kartik P.

Use cases

Imagine all you can build

NFT drops

Power your NFT airdrops and create a seamless experience for your users.

Token gating

Create token gated experiences to enable exclusivity and NFT membership.

Analytics

View and access all relevant NFT data onchain.

Wallets

Get the right data to display the correct NFTs for the appropriate owners for your wallet app.

Marketplaces

Create the next great NFT marketplace andlet Alchemy handle the infrastructure.

Developer Abstractions

Interact with NFTs without delving deep into the complexities of smart contracts, blockchain operations, or various blockchain protocols.

Build blockchain magic

Alchemy combines the most powerful web3 developer products and tools with resources, community and legendary support.
Get started for free