Network
Launch Date
Consensus
Note
Sepolia
Oct 2021
PoW
Like-for-like representation of Ethereum
Görli
Jan 2019
PoA
Proof-of-Authority
Kiln
Mar 2022
PoS
Post-Merge (for ETH2), shadow fork of the mainnet
Kintsugi
Dec 2021
PoS
DEPRECATED, use Kiln; post-Merge (for ETH2)
Ropsten
Nov 2016
PoW
DEPRECATED, use Sepolia; the Merge to happen on Jun 8, 2022
Rinkeby
Apr 2017
PoA
DEPRECATED, use Görli and Görli Faucet
Kovan
Mar 2017
PoA
DEPRECATED, use Sepolia or Görli
List of active and deprecated Ethereum testnets, including Kintsugi.
Features
Optimistic rollup 
ZK-rollup 
Proof
Uses fraud proofs to prove transaction validity. 
Uses validity (zero-knowledge) proofs to prove transaction validity. 
Capital efficiency
Requires waiting through a 1-week delay (dispute period) before withdrawing funds. 
Users can withdraw funds immediately because validity proofs provide incontrovertible evidence of the authenticity of off-chain transactions. 
Data compression
Publishes full transaction data as calldata to Ethereum Mainnet, which increases rollup costs. 
Doesn't need to publish transaction data on Ethereum because ZK-SNARKs and ZK-STARKs already guarantee the accuracy of the rollup state. 
EVM compatibility
Uses a simulation of the Ethereum Virtual Machine (EVM), which allows it to run arbitrary logic and support smart contracts. 
Doesn't widely support EVM computation, although a few EVM-compatible ZK-rollups have appeared. 
Rollup costs
Reduces costs since it publishes minimal data on Ethereum and doesn't have to post proofs for transactions, except in special circumstances. 
Faces higher overhead from costs involved in generating and verifying proofs for every transaction block. ZK proofs require specialized, expensive hardware to create and have high on-chain verification costs. 
Trust assumptions
Doesn't require a trusted setup. 
Requires a trusted setup to work. 
Liveness requirements
Verifiers are needed to keep tabs on the actual rollup state and the one referenced in the state root to detect fraud. 
Users don't need someone to watch the L2 chain to detect fraud. 
Security properties 
Relies on cryptoeconomic incentives to assure users of rollup security. 
Relies on cryptographic guarantees for security. 
Start building
on Alchemy.
Sign up for free
Start building on Optimism.
Sign up for free
Start building on Arbitrum.
Sign up for free
Start building on Ethereum.
Sign up for free
Start building on Polygon.
Sign up for free
Start building on Starknet.
Sign up for free
Start building on Flow.
Sign up for free
kiln faucet
Get free Kiln ETH.
Start building today
Goerli faucet
Get free Goerli ETH.
Start building today
SEPOLIA FAUCET
Get free Sepolia ETH.
Start Building Today
mumbai faucet
Get free Mumbai Matic.
Start building today
rinkeby faucet
Get free Rinkeby
ETH.
Start building today
Start building on Ethereum.
Get started for free
Start building on Ethereum.
Get started for free
Start building on Flow.
Get started for free
Start building on Polygon.
Get started for free
Start building on Starknet.
Get started for free
Start building on Optimism.
Get started for free
Start building on Solana.
Get started for free
Start building on Solana.
Sign up for beta access
Start building on Solana.
Join the waitlist
Arbitrum logo
Start building on Arbitrum.
Get started for free
Build with Alchemy's
Gas Manager & Bundler APIs
Learn
Solidity at
Alchemy
University
Get started today
Build with Alchemy's
Gas Manager & Bundler APIs
curl 
https://release.solana.com/v1.10.32/solana-install-init-x86_64-pc-windows-msvc.exe 
--output 
C:\solana-install-tmp\solana-install-init.exe 
--create-dirs
NFTs
GETNFTS OVERVIEW

3 Important Reasons to Use Alchemy's NFT API for getNFTs

Why Alchemy’s NFT API is the Best Choice for Building an NFT dApp
Last Updated:
August 12, 2022

If you’re building an NFT dApp, Alchemy’s NFT API can help you build better experiences for your users by using get requests, like getNFTs and getOwnersForToken. Let’s look at what these methods do and why we should use them in our NFT builds.    

What is getNFTs?

getNFTs is an NFT API endpoint that allows developers to get the list of all NFTs, including ERC-721 and ERC-1155 tokens that belong to a particular owner address. You can enter either an owner address or an ENS name and the API will return the list of all NFTs owned by that address, along with the NFT metadata.

Example Use Cases for getNFTs

getNFTs is one of the most versatile NFT API endpoints, and can be used across a variety of web3 products including wallets to display NFTs, NFT marketplaces, NFT analytics tools, NFT rarity ranking sites, Discord bots, and many other use cases.

For example, if you were to go to the profile page of your OpenSea account, you would be able to see which NFTs you own. This is powered by an endpoint that uses getNFTs to return the NFTs owned by your wallet address and the related NFT metadata.

More broadly, getNFTs can benefit anything that requires you to either know what a user owns. For example, a getNFTs request could power NFT analytics tools like rarity ranking sites or a Discord bot by pulling in data and letting you know what NFT just sold, in which marketplace it sold, and any other relevant metadata.

What is getOwnersForToken?

getOwnersForToken is an API that allows you to specify an NFT smart contract and return the list of all owners for that token. For ERC-721 tokens, getOwnersForToken will only return a single owner, but for ERC-1155 tokens, which can have multiple owners, getOwnersForToken can return more than one wallet address.

Example Use Cases for getOwnersForToken

getOwnersForToken has multiple use cases including airdrops, cache refreshes for NFT ownership changes, and profile picture verifications. 

If you’re running an NFT minting project and want to do an airdrop to owners of a specific token, getOwnersForToken allows you to identify this allowlist. 

Similarly, if you have a profile picture and want to verify ownership, you could use this API to check if ownership has changed.

Without getOwnersforToken, there is no convenient solution for these use cases because developers would have to parse the entire blockchain to figure out how the ownership for a single NFT has changed over time. Now, with Alchemy’s NFT API, the getOwnersForToken API can accomplish this task with one request.

3 Reasons to Use Alchemy's NFT API for Getting NFTs

Building with Alchemy's NFT API is the best choice for getting NFTs because of its coverage, spam filters, and image caching.

1. NFT Coverage

Alchemy's NFT API has the broadest coverage of NFTs, which is a challenge because NFT metadata lives on chain, off chain, and in inconsistent formats, which leads to a lot of edge cases for accurately logging metadata.

Having NFT metadata living in multiple different formats, and multiple different environments makes determining accurate metadata for an NFT a messy problem. 

Alchemy is able to provide the most complete NFT coverage because of designing multiple code paths to overcome many of the most prominent cases, including, but not limited to, handling metadata:

  • On chain or off-chain in JSON format
  • On chain or off-chain in SVG format
  • On chain or off-chain in UTF-8 format

Alchemy’s NFT API also can handle SVGs, NFTs that use IPFS gateways like Pinata, URIs pointing to an image to a secondary off-chain location, images encoded in base 64, and many other implementations.

How do we get NFT metadata?

Getting NFT metadata is a complicated process with many variations, but Alchemy’s NFT API offers a simple solution so you don’t need to waste valuable time thinking through each use case on its own. 

To get an NFT’s metadata, we start with an ID, which is a contract address and a token ID that together make up the unique identifier of the NFT.

This ID is checked against the Alchemy NFT cache to see if the information already exists. If it’s not in the cache, we need investigate what type of NFT it is and to what standard the contract conforms.

Alchemy currently supports two major NFT standards: ERC-721 and ERC-1155 smart contracts.

An actual ERC-721 standard should provide a scheme that has the NFTs title and properties, including the name, descriptions, and image, and be able to support some additional methods. 

In theory, you should be able to identify if an NFT does support this standard through a support interface call and the contract will respond with the answer. 

Because these contracts are programmable, a developer might intentionally or mistakenly program the contract to respond incorrectly, which means we need to look at other properties of the contract to ensure that it supports the interface. 

Once you’ve determined the smart contract is indeed an NFT, you can ask the contract or the token for the metadata’s location. For an ERC721 contract, the method you call is the token URI method, while for a 1155 contract, it is simply called the URI method.

The URI points to a place on the internet, or a place on-chain, where the NFT metadata exists. Some contracts, when asked for this location, point to a file, while others incorrectly provide the metadata directly in the token URI. 

If the URI points to another location, we’ll need to follow the link, most often to a third-party website or server, which has its own host of problems. These websites can be broken, malicious, or rate limited, but Alchemy cuts through that to cleanly return the information.

With some many different implementations across ERC-721 and ERC-1155 smart contracts, having broad and accurate data coverage of NFTs is a persistent challenge. Using the Alchemy NFT API is the best way to ensure maximum coverage of known NFTs.

2. NFT Spam Filters

Alchemy’s spam filter for getNFTs makes building even easier by filtering out spam NFTs, which are unsolicited airdrops or NFT smart contracts that break the ERC-721 and ERC-1155 standards.

In addition to the native filtering options of getNFTs, Alchemy’s new getSpamContracts will return the list of all ERC-721 and ERC-1155 spam contracts on the selected chain. 

Similarly, isSpamForContract will check if a particular NFT smart contract has been classified as spam. You can filter for contract addresses, which means you can also look for the owners of a particular NFT and check to see if that’s the only one they own.

Alchemy is the only platform with an NFT spam filter, and it is incredibly difficult to be engaging with NFTs if you’re being bogged down by spam.

3. NFT Image Caching

Alchemy’s image caching leads to faster responses and faster load times for NFT images. While NFT media is traditionally served from IPFS, decentralized storage providers, or third-party servers, developers often face slow loading times and timeout errors when using these endpoints. Alchemy solves this problem by caching NFT images using Cloudinary and serving up NFT URLs from our own cache making retrievals quicker.

Which NFT API should I choose?

Because of Alchemy’s robust endpoints including spam filters, getFloorPrice, and reingestContract, the best NFT coverage, including support for Crypto Punks, and the most accurate data, the Alchemy NFT API is the best choice for web3 developers.

Sign up for an Alchemy account and see how Alchemy’s NFT API can help you build your next NFT project, or learn more about how Alchemy can help you in your web3 journey.

ALCHEMY SUPERNODE - ETHEREUM NODE API

Scale to any size, without any errors

Alchemy Supernode finally makes it possible to scale blockchain applications without all the headaches. Plus, our legendary support will guide you every step of the way.

Get started for free
Supernode footer
NFTs
GETNFTS OVERVIEW

3 Important Reasons to Use Alchemy's NFT API for getNFTs

Why Alchemy’s NFT API is the Best Choice for Building an NFT dApp
Last Updated:
August 12, 2022
Last Updated:
March 14, 2023
Don't miss an update
Sign up for our newsletter to get alpha, key insights, and killer resources.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Talk to an Expert

Learn how Alchemy's blockchain developer tools can help your business succeed in web3!
Valid number
Thank you! An Alchemy expert will be in touch with you shortly!
Oops! Something went wrong while submitting the form.

{{building-alchemy-ad}}

Table of Contents

If you’re building an NFT dApp, Alchemy’s NFT API can help you build better experiences for your users by using get requests, like getNFTs and getOwnersForToken. Let’s look at what these methods do and why we should use them in our NFT builds.    

What is getNFTs?

getNFTs is an NFT API endpoint that allows developers to get the list of all NFTs, including ERC-721 and ERC-1155 tokens that belong to a particular owner address. You can enter either an owner address or an ENS name and the API will return the list of all NFTs owned by that address, along with the NFT metadata.

Example Use Cases for getNFTs

getNFTs is one of the most versatile NFT API endpoints, and can be used across a variety of web3 products including wallets to display NFTs, NFT marketplaces, NFT analytics tools, NFT rarity ranking sites, Discord bots, and many other use cases.

For example, if you were to go to the profile page of your OpenSea account, you would be able to see which NFTs you own. This is powered by an endpoint that uses getNFTs to return the NFTs owned by your wallet address and the related NFT metadata.

More broadly, getNFTs can benefit anything that requires you to either know what a user owns. For example, a getNFTs request could power NFT analytics tools like rarity ranking sites or a Discord bot by pulling in data and letting you know what NFT just sold, in which marketplace it sold, and any other relevant metadata.

What is getOwnersForToken?

getOwnersForToken is an API that allows you to specify an NFT smart contract and return the list of all owners for that token. For ERC-721 tokens, getOwnersForToken will only return a single owner, but for ERC-1155 tokens, which can have multiple owners, getOwnersForToken can return more than one wallet address.

Example Use Cases for getOwnersForToken

getOwnersForToken has multiple use cases including airdrops, cache refreshes for NFT ownership changes, and profile picture verifications. 

If you’re running an NFT minting project and want to do an airdrop to owners of a specific token, getOwnersForToken allows you to identify this allowlist. 

Similarly, if you have a profile picture and want to verify ownership, you could use this API to check if ownership has changed.

Without getOwnersforToken, there is no convenient solution for these use cases because developers would have to parse the entire blockchain to figure out how the ownership for a single NFT has changed over time. Now, with Alchemy’s NFT API, the getOwnersForToken API can accomplish this task with one request.

3 Reasons to Use Alchemy's NFT API for Getting NFTs

Building with Alchemy's NFT API is the best choice for getting NFTs because of its coverage, spam filters, and image caching.

1. NFT Coverage

Alchemy's NFT API has the broadest coverage of NFTs, which is a challenge because NFT metadata lives on chain, off chain, and in inconsistent formats, which leads to a lot of edge cases for accurately logging metadata.

Having NFT metadata living in multiple different formats, and multiple different environments makes determining accurate metadata for an NFT a messy problem. 

Alchemy is able to provide the most complete NFT coverage because of designing multiple code paths to overcome many of the most prominent cases, including, but not limited to, handling metadata:

  • On chain or off-chain in JSON format
  • On chain or off-chain in SVG format
  • On chain or off-chain in UTF-8 format

Alchemy’s NFT API also can handle SVGs, NFTs that use IPFS gateways like Pinata, URIs pointing to an image to a secondary off-chain location, images encoded in base 64, and many other implementations.

How do we get NFT metadata?

Getting NFT metadata is a complicated process with many variations, but Alchemy’s NFT API offers a simple solution so you don’t need to waste valuable time thinking through each use case on its own. 

To get an NFT’s metadata, we start with an ID, which is a contract address and a token ID that together make up the unique identifier of the NFT.

This ID is checked against the Alchemy NFT cache to see if the information already exists. If it’s not in the cache, we need investigate what type of NFT it is and to what standard the contract conforms.

Alchemy currently supports two major NFT standards: ERC-721 and ERC-1155 smart contracts.

An actual ERC-721 standard should provide a scheme that has the NFTs title and properties, including the name, descriptions, and image, and be able to support some additional methods. 

In theory, you should be able to identify if an NFT does support this standard through a support interface call and the contract will respond with the answer. 

Because these contracts are programmable, a developer might intentionally or mistakenly program the contract to respond incorrectly, which means we need to look at other properties of the contract to ensure that it supports the interface. 

Once you’ve determined the smart contract is indeed an NFT, you can ask the contract or the token for the metadata’s location. For an ERC721 contract, the method you call is the token URI method, while for a 1155 contract, it is simply called the URI method.

The URI points to a place on the internet, or a place on-chain, where the NFT metadata exists. Some contracts, when asked for this location, point to a file, while others incorrectly provide the metadata directly in the token URI. 

If the URI points to another location, we’ll need to follow the link, most often to a third-party website or server, which has its own host of problems. These websites can be broken, malicious, or rate limited, but Alchemy cuts through that to cleanly return the information.

With some many different implementations across ERC-721 and ERC-1155 smart contracts, having broad and accurate data coverage of NFTs is a persistent challenge. Using the Alchemy NFT API is the best way to ensure maximum coverage of known NFTs.

2. NFT Spam Filters

Alchemy’s spam filter for getNFTs makes building even easier by filtering out spam NFTs, which are unsolicited airdrops or NFT smart contracts that break the ERC-721 and ERC-1155 standards.

In addition to the native filtering options of getNFTs, Alchemy’s new getSpamContracts will return the list of all ERC-721 and ERC-1155 spam contracts on the selected chain. 

Similarly, isSpamForContract will check if a particular NFT smart contract has been classified as spam. You can filter for contract addresses, which means you can also look for the owners of a particular NFT and check to see if that’s the only one they own.

Alchemy is the only platform with an NFT spam filter, and it is incredibly difficult to be engaging with NFTs if you’re being bogged down by spam.

3. NFT Image Caching

Alchemy’s image caching leads to faster responses and faster load times for NFT images. While NFT media is traditionally served from IPFS, decentralized storage providers, or third-party servers, developers often face slow loading times and timeout errors when using these endpoints. Alchemy solves this problem by caching NFT images using Cloudinary and serving up NFT URLs from our own cache making retrievals quicker.

Which NFT API should I choose?

Because of Alchemy’s robust endpoints including spam filters, getFloorPrice, and reingestContract, the best NFT coverage, including support for Crypto Punks, and the most accurate data, the Alchemy NFT API is the best choice for web3 developers.

Sign up for an Alchemy account and see how Alchemy’s NFT API can help you build your next NFT project, or learn more about how Alchemy can help you in your web3 journey.

If you’re building an NFT dApp, Alchemy’s NFT API can help you build better experiences for your users by using get requests, like getNFTs and getOwnersForToken. Let’s look at what these methods do and why we should use them in our NFT builds.    

What is getNFTs?

getNFTs is an NFT API endpoint that allows developers to get the list of all NFTs, including ERC-721 and ERC-1155 tokens that belong to a particular owner address. You can enter either an owner address or an ENS name and the API will return the list of all NFTs owned by that address, along with the NFT metadata.

Example Use Cases for getNFTs

getNFTs is one of the most versatile NFT API endpoints, and can be used across a variety of web3 products including wallets to display NFTs, NFT marketplaces, NFT analytics tools, NFT rarity ranking sites, Discord bots, and many other use cases.

For example, if you were to go to the profile page of your OpenSea account, you would be able to see which NFTs you own. This is powered by an endpoint that uses getNFTs to return the NFTs owned by your wallet address and the related NFT metadata.

More broadly, getNFTs can benefit anything that requires you to either know what a user owns. For example, a getNFTs request could power NFT analytics tools like rarity ranking sites or a Discord bot by pulling in data and letting you know what NFT just sold, in which marketplace it sold, and any other relevant metadata.

What is getOwnersForToken?

getOwnersForToken is an API that allows you to specify an NFT smart contract and return the list of all owners for that token. For ERC-721 tokens, getOwnersForToken will only return a single owner, but for ERC-1155 tokens, which can have multiple owners, getOwnersForToken can return more than one wallet address.

Example Use Cases for getOwnersForToken

getOwnersForToken has multiple use cases including airdrops, cache refreshes for NFT ownership changes, and profile picture verifications. 

If you’re running an NFT minting project and want to do an airdrop to owners of a specific token, getOwnersForToken allows you to identify this allowlist. 

Similarly, if you have a profile picture and want to verify ownership, you could use this API to check if ownership has changed.

Without getOwnersforToken, there is no convenient solution for these use cases because developers would have to parse the entire blockchain to figure out how the ownership for a single NFT has changed over time. Now, with Alchemy’s NFT API, the getOwnersForToken API can accomplish this task with one request.

3 Reasons to Use Alchemy's NFT API for Getting NFTs

Building with Alchemy's NFT API is the best choice for getting NFTs because of its coverage, spam filters, and image caching.

1. NFT Coverage

Alchemy's NFT API has the broadest coverage of NFTs, which is a challenge because NFT metadata lives on chain, off chain, and in inconsistent formats, which leads to a lot of edge cases for accurately logging metadata.

Having NFT metadata living in multiple different formats, and multiple different environments makes determining accurate metadata for an NFT a messy problem. 

Alchemy is able to provide the most complete NFT coverage because of designing multiple code paths to overcome many of the most prominent cases, including, but not limited to, handling metadata:

  • On chain or off-chain in JSON format
  • On chain or off-chain in SVG format
  • On chain or off-chain in UTF-8 format

Alchemy’s NFT API also can handle SVGs, NFTs that use IPFS gateways like Pinata, URIs pointing to an image to a secondary off-chain location, images encoded in base 64, and many other implementations.

How do we get NFT metadata?

Getting NFT metadata is a complicated process with many variations, but Alchemy’s NFT API offers a simple solution so you don’t need to waste valuable time thinking through each use case on its own. 

To get an NFT’s metadata, we start with an ID, which is a contract address and a token ID that together make up the unique identifier of the NFT.

This ID is checked against the Alchemy NFT cache to see if the information already exists. If it’s not in the cache, we need investigate what type of NFT it is and to what standard the contract conforms.

Alchemy currently supports two major NFT standards: ERC-721 and ERC-1155 smart contracts.

An actual ERC-721 standard should provide a scheme that has the NFTs title and properties, including the name, descriptions, and image, and be able to support some additional methods. 

In theory, you should be able to identify if an NFT does support this standard through a support interface call and the contract will respond with the answer. 

Because these contracts are programmable, a developer might intentionally or mistakenly program the contract to respond incorrectly, which means we need to look at other properties of the contract to ensure that it supports the interface. 

Once you’ve determined the smart contract is indeed an NFT, you can ask the contract or the token for the metadata’s location. For an ERC721 contract, the method you call is the token URI method, while for a 1155 contract, it is simply called the URI method.

The URI points to a place on the internet, or a place on-chain, where the NFT metadata exists. Some contracts, when asked for this location, point to a file, while others incorrectly provide the metadata directly in the token URI. 

If the URI points to another location, we’ll need to follow the link, most often to a third-party website or server, which has its own host of problems. These websites can be broken, malicious, or rate limited, but Alchemy cuts through that to cleanly return the information.

With some many different implementations across ERC-721 and ERC-1155 smart contracts, having broad and accurate data coverage of NFTs is a persistent challenge. Using the Alchemy NFT API is the best way to ensure maximum coverage of known NFTs.

2. NFT Spam Filters

Alchemy’s spam filter for getNFTs makes building even easier by filtering out spam NFTs, which are unsolicited airdrops or NFT smart contracts that break the ERC-721 and ERC-1155 standards.

In addition to the native filtering options of getNFTs, Alchemy’s new getSpamContracts will return the list of all ERC-721 and ERC-1155 spam contracts on the selected chain. 

Similarly, isSpamForContract will check if a particular NFT smart contract has been classified as spam. You can filter for contract addresses, which means you can also look for the owners of a particular NFT and check to see if that’s the only one they own.

Alchemy is the only platform with an NFT spam filter, and it is incredibly difficult to be engaging with NFTs if you’re being bogged down by spam.

3. NFT Image Caching

Alchemy’s image caching leads to faster responses and faster load times for NFT images. While NFT media is traditionally served from IPFS, decentralized storage providers, or third-party servers, developers often face slow loading times and timeout errors when using these endpoints. Alchemy solves this problem by caching NFT images using Cloudinary and serving up NFT URLs from our own cache making retrievals quicker.

Which NFT API should I choose?

Because of Alchemy’s robust endpoints including spam filters, getFloorPrice, and reingestContract, the best NFT coverage, including support for Crypto Punks, and the most accurate data, the Alchemy NFT API is the best choice for web3 developers.

Sign up for an Alchemy account and see how Alchemy’s NFT API can help you build your next NFT project, or learn more about how Alchemy can help you in your web3 journey.

{{building-alchemy-ad}}

Contact Us

Talk to an expert at Alchemy to answer all of your product questions.
Valid number
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Build blockchain magic with Alchemy

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

Get started for free