February 9, 2023

Alchemy NFT API Alternative – Which is the Fastest NFT API?

Table of Contents

In the table below, we have summarized some of the key differences between the Moralis NFT API and the Alchemy NFT API: 

A table comparing Alchemy NFT API vs Moralis NFT API

As the table illustrates, Moralis provides almost twice as many endpoints, supports more networks, and is the fastest among the best NFT API providers (see the test in the video above). As such, if you are looking to build NFT platforms and other Web3 projects, Moralis is the go-to choice!

Thanks to the accessibility of Moralis, you can seamlessly use the NFT API to call any of the featured endpoints. All you need to do is import and initialize Moralis, add the required parameters, and call the endpoint of your choice. Here is an example of what it can look like for the ”getWalletNFTTransfers” endpoint:

import Moralis  from 'moralis';
import { EvmChain } from '@moralisweb3/common-evm-utils';

try {
    const address = '0x1234567890123456789012345678901234567890';

    const chain = EvmChain.ETHEREUM;

    await Moralis.start({
        apiKey: 'YOUR_API_KEY',
        // ...and any other configuration
    });

    const response = await Moralis.EvmApi.nft.getWalletNFTTransfers({
        address,
        chain,
    });

    console.log(response);
} catch (e) {
    console.error(e);
}

You can learn more about the various endpoints by checking out the Web3 NFT API documentation page. What’s more, did you know that you can use the Moralis NFT API entirely for free? All you need to do is sign up with Moralis, which only takes a couple of seconds!

Scale your NFT projects - Sign up with Moralis

Overview 

If you want to create your own NFT-related Web3 projects, you should consider using an NFT API, facilitating a more seamless NFT developer experience. However, which is the best and fastest NFT API? If you want the answer, join us in this article as we compare the NFT APIs from Moralis and Alchemy! 

To kickstart this article, we will begin by covering the best Alchemy NFT API alternative: Moralis. In doing so, we are going to explore why you need an NFT API and cover the Moralis NFT API’s most prominent endpoints. From there, we will dive deeper into Alchemy’s NFT API and compare it with Moralis. Lastly, to top things off, we will briefly show you how to use the Moralis NFT API! 

What’s more, if you are serious about getting into Web3 development, you should know that the NFT API is one of many blockchain development resources offered by Moralis. Along with amazing Web3 APIs, Moralis also, for instance, provide a comprehensive testnet faucet page. This page features a list of the best crypto faucets you can use to get testnet tokens for various networks. For example, check out the Goerli faucet or the BNB faucet

Also, did you know that you can access all the tools and resources from Moralis for free? All you need to do is sign up with Moralis right now! 

Build NFT sites with the leading NFT API

The Best Alchemy NFT API Alternative 

The Alchemy NFT API is one of several noteworthy token-related programming interfaces. Each NFT API alternative has its own set of unique features. However, the one that stands out as the most exciting alternative is the Moralis NFT API! However, what exactly is the Moralis NFT API?

Alchemy NFT API vs Moralis NFT API code in editor

The NFT API  from Moralis accumulates everything you need to build sophisticated and excellent NFT applications. With this application programming interface, you can fetch real-time token metadata, NFT ownership data, transfer data, prices, and much more! 

Thanks to this API, you no longer need to parse individual smart contracts, query nodes for metadata, sort through irregular data sets, etc. Instead, you only need one single API call to get NFT information across all the supported blockchain networks! 

Like all Web3 APIs from Moralis, the NFT API includes full cross-chain support. As a result, you do not need to worry about cross-chain compatibility. Thanks to the synergies offered by Moralis, you can use the same API to build NFT apps across the following chains: Ethereum, Binance, Polygon, Avalanche, Solana, and more. Learn more about all supported chains here

Moralis NFT API supported networks highlighted

If you are interested in Solana blockchain app development, consider checking out our article showing you how to use the Solana Python API.

Now, with an overview of the Moralis NFT API, let us examine this programming interface further. In doing so, we will explore the API’s most prominent features and endpoints in the following section! 

How to Use the Moralis NFT API

As you now know, the feature-rich NFT API from Moralis provides everything you need to build sophisticated NFT applications. However, let us get into more detail by exploring some of the most prominent features and how to use them! 

Get NFTs 

With the Moralis NFT API, you can seamlessly query all tokens through single API calls. You can, for instance, get multiple NFTs, get NFTs by wallet, get NFTS by contract, or search NFTs that match provided metadata search queries: 

  • Get multiple NFTs: 
import fetch from 'node-fetch';

const options = {
  method: 'POST',
  headers: {
    accept: 'application/json',
    'X-API-Key': 'YOUR_API_KEY'
  },
};

fetch('https://deep-index.moralis.io/api/v2/nft/getMultipleNFTs?chain=eth', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
  • Get NFTs by wallet: 
const response = await Moralis.EvmApi.nft.getWalletNFTs({
    address,
    chain,
});
  • Get NFTs by contract: 
const response = await Moralis.EvmApi.nft.getContractNFTs({
    address,
    chain,
    totalRanges,
    range,
});
  • Search NFTs: 
const response = await Moralis.EvmApi.nft.searchNFTs({
    q,
    filter,
    chain,
});

Get NFT Transfers 

Through the NFT API, you can stay up to date with the latest NFT transfers. It does not matter if you want to query the transfer history of a particular token, get transfers of a wallet, or track real-time transfers; the Moralis NFT API has you covered by supplying various endpoints:

  • Get NFT transfers by wallet: 
const response = await Moralis.EvmApi.nft.getWalletNFTTransfers({
    address,
    chain,
});
  • Get NFT transfers by block: 
const response = await Moralis.EvmApi.nft.getNFTTransfersByBlock({
    blockNumberOrHash,
    chain,
});
  • Get NFT transfers from a block to a block: 
const response = await Moralis.EvmApi.nft.getNFTTransfersFromToBlock({
    from_block: "14876000",
    to_block: "14877000",
    format: "decimal",
    limit: "10",
    chain,
});
  • Get NFT transfers by token ID: 
const response = await Moralis.EvmApi.nft.getNFTTransfers({
    address,
    chain,
    tokenId,
});
  • Get NFT transfers by contract:
const response = await Moralis.EvmApi.nft.getNFTContractTransfers({
    address,
    chain,
});

If you want a more detailed guide on how these endpoints work, check out our guide on how to get all NFT transfers

Get NFT Collections 

Along with searching for particular NFTs, you can also use the Moralis API to query various blockchains for NFT collections. You can find three featured endpoints below: 

  • Get NFT collections by wallet:
const response = await Moralis.EvmApi.nft.getWalletNFTCollections({
    address,
    chain,
});
  • Get NFT collection metadata:
const response = await Moralis.EvmApi.nft.getNFTContractMetadata({
    address,
    chain,
});
  • Sync NFT contract: 
const response = await Moralis.EvmApi.nft.syncNFTContract({
    address,
    chain,
});

Check out our article if you want a demo of how to get NFT collection data

Get NFT Owners 

With the NFT API, you can get owners of a particular NFT or an entire collection in single API calls! You can find the two ownership data endpoints here: 

  • Get NFT owners by contract:
const response = await Moralis.EvmApi.nft.getNFTOwners({
    address,
    chain,
});
  • Get NFT owners by token ID: 
const response = await Moralis.EvmApi.nft.getNFTTokenIdOwners({
    address,
    chain,
    tokenId,
});

To see these endpoints in action, check out our tutorial on how to get all NFTs owned by an address! 

Get NFT Market Data 

Query NFT market data such as trades by marketplace or get the lowest token price with the Moralis NFT API. All that is required are single API calls to the following endpoints:

  • Get NFT trades by marketplace: 
const response = await Moralis.EvmApi.nft.getNFTTrades({
    address,
    chain,
});
  • Get NFT owners by token ID:
const response = await Moralis.EvmApi.nft.getNFTLowestPrice({
    address,
    chain,
}); 

Get NFT Metadata 

Use the Moralis NFT API to receive fully resolved token metadata. The interface features a search endpoint, meaning that you can search within the metadata of NFTs. Here are the endpoints:

  • Get NFT metadata:
const response = await Moralis.EvmApi.nft.getNFTMetadata({
    address,
    chain,
    tokenId,
});
  • Resync NFT metadata: 
const response = await Moralis.EvmApi.nft.reSyncMetadata({
    address,
    chain,
    tokenId,
});

If you want a detailed breakdown of how to effectively utilize these endpoints, check out our guide on how to get NFT metadata!

You can also find all the endpoints and try them out directly in your browser by visiting the Moralis Web3 NFT API documentation!

Exploring the Alchemy NFT API 

Like the API from Moralis, the Alchemy NFT API supplies tools and features facilitating the development of NFT-related projects. With Alchemy’s multi-chain NFT API, you can also launch, analyze, verify, and display NFTs. You can incorporate all features into your projects to build sophisticated NFT platforms!

Title - Alchemy NFT API

Here are some of the Alchemy NFT API’s key tools and features: 

  • SDK Support – You can utilize Alchemy’s software development kit (SDK) to access the NFT API’s functionality. 
  • Easy Token Gating – Smart systems detect owners so you can easily token gate and create unique communities. 
  • Image Caching – With Alchemy’s NFT asset ingestion service, you can get NFTs and associated data quickly and easily.  
  • Multi-Chain Support – The Alchemy NFT API supports Ethereum, Polygon, Arbitrum, and Optimism.
  • Webhooks to Track Transfers – You can use the API to track NFT on-chain activity to receive notifications when tokens are traded. 

Much like the Moralis NFT API, the Alchemy NFT API also features several endpoints for querying on-chain data. Here are five prominent examples: 

  • getNFTs
  • getContractsForOwners
  • getNFTsForCollection
  • isHolderOfCollection
  • getNFTMetadata

Now, with a better understanding of the NFT API from Moralis and the Alchemy NFT API, which of the two should you go for? To answer this question, let us compare the two in the following ”Alchemy NFT API vs Moralis NFT API” section! 

Alchemy NFT API vs Moralis NFT API 

Let’s start by summarizing the key differences between the NFT APIs from Moralis and Alchemy in the table below: 

Graph table showing pros and cons of the Alchemy NFT API and Moralis NFT API
  • Endpoints – As the table above illustrates, the Moralis NFT API currently features 18+ endpoints for various use cases; meanwhile, Alchemy supports ten. However, Alchemy has a few endpoints in beta, most of which only support the Ethereum mainnet. 
  • Supported Networks – The NFT API from Moralis supports seven networks; meanwhile, Alchemy supports four. Additionally, among Moralis’ featured networks, you’ll find BNB Chain. BNB Chain features one of the most prominent Web3 ecosystems, which is why it is unfortunate that the Alchemy NFT API lacks support for this network. 
  • Speed – Before writing this article, we conducted a test on Alchemy’s webpage to see which of the APIs were the fastest. In this test, we included Moralis, Alchemy, OpenSea, and QuickNode. The various providers rank in the following order from fastest to slowest (you can view the test results in the video from the article’s introduction): 
  1. Moralis
  2. OpenSea
  3. Alchemy
  4. QuickNode

All in all, the Alchemy NFT API is a promising choice if you are looking to build NFT-related projects. However, the Moralis NFT API provides most of what Alchemy offers and more! 

Moralis supplies almost twice as many endpoints, supports more networks (including BNB Chain and Solana), and is the fastest option among the most prominent NFT API providers. Consequently, as the interface outperforms the competition in all aspects, opting for the Moralis NFT API should be a no-brainer when building NFT applications! 

Use Alchemy API for NFTs? Try the Moralis NFT API

In the previous section, we established that the API for non-fungible tokens from Moralis is the preferred option compared to the Alchemy NFT API. As such, if you are looking to build NFT-related platforms, you should consider trying the Moralis NFT API. But how do you get started with the Moralis NFT API? 

To use the Moralis NFT API, you first need a Moralis account. You can join Moralis entirely for free; signing up doesn’t take more than a couple of seconds. Moreover, with an account at hand, you are ready to use the interface! 

To illustrate how the API works, let us use the ”getWalletNFTTransfers” endpoint and NodeJS as an example. The first thing you need to do is set up a NodeJS project and import Moralis and EVM: 

import Moralis from "moralis";
import { EvmChain } from "@moralisweb3/common-evm-utils";

Next, provide your preferred parameters and initialize Moralis: 

async function main() {
const address = "0x1234567890123456789012345678901234567890";

const chain = EvmChain.ETHEREUM;

await Moralis.start({
  apiKey: "YOUR_API_KEY",
});

In the snippet above, when initializing Moralis, you need an API key, which is why you were required to create an account earlier. To find your key, log in to the Moralis admin panel and navigate to the ”Web3 APIs” tab: 

From there, copy the key and replace ”YOUR_API_KEY in the code. 

All that remains is calling the ”getWalletNFTTransfers” endpoint while passing the parameters you specified earlier: 

const response = await Moralis.EvmApi.nft.getWalletNFTTransfers({
  address,
  chain,
});

console.log(response)

}

main();

All in all, this is what the code now looks like:

import Moralis from "moralis";
import { EvmChain } from "@moralisweb3/common-evm-utils";

async function main() {
const address = "0x1234567890123456789012345678901234567890";

const chain = EvmChain.ETHEREUM;

await Moralis.start({
  apiKey: "YOUR_API_KEY",
});

const response = await Moralis.EvmApi.nft.getWalletNFTTransfers({
  address,
  chain,
});

console.log(response)

}

main();

In return, when running this code, you should find yourself with a response looking something like this: 

{
  "total": "2000",
  "page": "2",
  "page_size": "100",
  "result": {
    "token_address": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e",
    "token_id": "15",
    "from_address": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e",
    "to_address": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e",
    "value": "1000000000000000",
    "amount": "1",
    "contract_type": "ERC721",
    "block_number": "88256",
    "block_timestamp": "2021-06-04T16:00:15",
    "transaction_hash": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e",
    "operator": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e"
  },
  "block_exists": true,
  "index_complete": true
}

That’s how easy it is to use the Moralis NFT API! You can now use the same principles for the various endpoints provided by Moralis to build sophisticated NFT-related projects in no time! 

You can also try the endpoint with new parameters and different languages directly in your browser by checking the official get NFT transfers by wallet documentation page!

Summary – The Best Alchemy NFT API Alternative 

In this article, we explored the best Alchemy NFT API alternative: Moralis. In doing so, we covered the Moralis NFT API’s most prominent endpoints and dove deeper into why this is the best option for building NFT projects. 

Through our comparison of Moralis and Alchemy, we learned that the Moralis NFT API offers more endpoints, supports more networks, and is the fastest alternative on the market. Consequently, if you are looking to build NFT-related projects, opting for Moralis is a no-brainer! 

If you found this article helpful, consider checking out more content here at the Web3 blog. For example, check out our Chainlink NFT tutorial, read about Web3 libraries, learn how to convert gwei to ether, or explore the best Notify API alternative! 

You can also find more NFT-related content here on the blog. For instance, read our article on ERC721 vs ERC115, learn how to mint an NFT from a contract, or explore how to use IPFS for NFT metadata.

What’s more, if you are new to blockchain development, consider enrolling in Moralis Academy. The academy offers a selection of courses for experienced and new developers. For example, learn the basics of Web3 development by checking out the following course: ”Ethereum 101”.

Also, if you are serious about becoming a Web3 developer, remember to sign up with Moralis. Registering with Moralis is free and only takes a couple of seconds. With an account, you can immediately use all of the tools and features from Moralis to leverage the power of blockchain technology!

NFT API
Unlock the full potential of your NFT projects with this industry-leading NFT API! Fast, easy, and free.
NFT API
Related Articles
December 30, 2022

Essential Web3 Programming Languages for 2023

December 3, 2022

Exploring the Palm Network – What is Palm NFT Studio?

March 20, 2023

How to Get an Address’ Token Balance on Solana

February 28, 2023

Arbitrum Testnet – How to Build and Launch Arbitrum Projects

October 10, 2022

The Easiest Way to Build Dapps – 3-Step Tutorial for Developers

October 19, 2022

Solana Smart Contract Building – An Introduction

January 12, 2023

BNB Faucet – The Full Guide to BNB Testnet Faucets

September 15, 2023

NFT Image API – How to Get Images from NFT Collections

November 28, 2022

Goerli ETH – What is the Goerli Testnet?