October 18, 2023

NFT API Providers – Comparison of Developer Tools & Resources

Table of Contents
NFT API Providers - Comparison of Developer Tools & Resources

In today’s article, we’ll compare three prominent NFT API providers: Moralis, OpenSea, and Alchemy. For a quick overview, we have summarized some key similarities and differences between them in the table below:

Comparison of NFT API Providers
MoralisOpenSeaAlchemy
SpeedFastest NFT APISecond Fastest NFT APIThird Fastest NFT API
Supported ChainsEthereum, Polygon, BNB Smart Chain, Arbitrum, Avalanche, Fantom, Cronos, etc. Ethereum, Polygon, BNB Smart Chain, Arbitrum, Avalanche, etc. Ethereum, Polygon, Arbitrum, Optimism, Base. 
FeaturesReal-Time NFT Data, Enriched Metadata, Price Data, Optimized Image Previews, Spam Detection, Webhook Support, etc. Real-Time NFT Data, Metadata, Price Data, Profile Information, Listings Data, etc. Real-Time NFT Data, Metadata, Price Data, Spam Detection, Webhook Support, Rarity Score, etc. 

Based on the table above, Moralis stands out as the premier NFT API provider. The Moralis NFT API is the fastest, most comprehensive NFT development tool, providing what the competitors offer and more!

As such, if you’re looking for the best NFT API for building Web3 projects, Moralis is your go-to choice. You can sign up with Moralis straight away, and you’ll gain immediate access to our free NFT API so you can start building smarter and faster today! 

Overview

In today’s article, we’ll kick things off by diving into the top three NFT API providers: 

  1. Moralis
  2. OpenSea
  3. Alchemy

From there, we’ll jump straight into a comparison between them to highlight prominent similarities and differences. Next, we’re going to dive a bit deeper into the Moralis NFT API, as this tool stands out as the premier option for NFT development. Lastly, to top things off, we’ll give you an in-depth tutorial on how to use the Moralis NFT API to get all NFTs owned by a wallet! 

In today’s tutorial, you’ll mainly familiarize yourself with the Moralis NFT API. However, if you’re serious about building Web3 projects, we highly recommend checking out some other Moralis APIs as well. 

Moralis Marketing Material for NFT API Providers article

Another great example is the Price API. With this tool, you can supercharge your Web3 projects with real-time price data. If this sounds exciting, check out our article on the #1 API for crypto prices to learn more!

Nevertheless, without further ado, let’s jump into the top three NFT API providers! 

Top 3 NFT API Providers 

There are multiple NFT API providers for you to choose from, and in the following sections, we’ll introduce you to three of the industry’s leading alternatives: 

  1. Moralis
  2. OpenSea 
  3. Alchemy

After presenting the three NFT API providers above, we’ll make a brief comparison to underscore their respective strengths and weaknesses. So, let’s dive into a closer examination of our top pick: the Moralis NFT API! 

Moralis 

At the top of our list, you’ll find Moralis’ cross-chain NFT API. The Moralis NFT API offers unmatched performance and speed through blazing-fast CDNs, comprehensive token coverage, cutting-edge features, and much more, making it stand out as the industry’s leading tool for NFT development! 

Moralis - Number one NFT API provider

The NFT API covers over three million collections, ranging from established projects like CryptoPunks and Pudgy Penguins to fresh NFTs that dropped just seconds ago. Moreover, the NFT API supports all major EVM blockchains, including Ethereum, BNB Smart Chain (BSC), Polygon, and many more! 

So, what does Moralis’ NFT API do? 

  • Real-Time NFT Transfer Data: Get real-time and historical NFT transfer data for any token, collection, or Web3 wallet.
  • Enriched Metadata: Access normalized and fully enriched metadata for individual tokens and NFT collections. 
  • Advanced Spam Detection: Protect users from undesirable NFTs with advanced spam indicators. 
  • On-Chain Pricing Data: Incorporate real-time pricing data into your Web3 projects easily. 
  • Optimized Image Previews: Access dynamically sized image previews and conversions to user-friendly formats. 
  • Alerts and Notifications: Plug and play with the Moralis Streams API to get real-time notifications on trades, mints, and marketplace orders. 
  • And much more!

The Moralis NFT API is built to scale. So, when your Web3 projects grow and experience increased adoption, you don’t have to worry about performance, as the NFT API will have no problem handling the increased traffic!

OpenSea 

The second option among the top NFT API providers is OpenSea. OpenSea is a significant player within the Web3 space, and the platform is one of the most popular marketplaces for NFTs. The OpenSea NFT API is a comprehensive tool that allows users to build new NFT-related dapps and Web3 platforms. It provides an extensive set of endpoints enabling developers to fetch ERC-721 and ERC-1155 token data seamlessly! 

OpenSea API - Number two NFT API provider

So, what can developers do with the OpenSea NFT API? 

  • Fetch NFT Data: Fetch NFTs by collection, wallet address, or type. 
  • Get NFT Activity Data: Get all NFT-related events, including sales, bids, listings, transfers, etc. 
  • Query Account Data: Query account and profile information for any wallet address.
  • And more! 

Also, the OpenSea NFT API is free. All that OpenSea asks is that developers provide attribution to the marketplace on their site or application. To do so, devs that are into NFT marketplace development can, for instance, link to the OpenSea marketplace from the NFTs they display. 

Alchemy 

The third option among the top NFT API providers is Alchemy. Alchemy is a prominent blockchain developer platform providing a range of developer tools. And just like Moralis and OpenSea, Alchemy also offers an NFT API that supplies tools and features aiding in the development of NFT-related projects. With Alchemy’s multi-chain NFT API, developers can launch, verify, analyze, and display NFTs! 

Alchemy API - Number Three NFT API provider

So, what does the Alchemy NFT API do?

  • Provide NFT Data: Get all NFTs of a given wallet, collection, or address.
  • Image Caching: Fetch NFTs and associated metadata, such as images.
  • NFT Minting: Mint and deploy NFTs with little to no Web3 experience.
  • Spam Detection: Filter spam and airdropped NFTs.
  • And more! 

Now, with a brief overview of the top NFT API providers, let’s compare these options further! 

Comparison of NFT API Providers: Moralis vs. Alchemy vs. OpenSea 

Let’s start with a brief summary of the key similarities and differences between the Moralis, OpenSea, and Alchemy NFT APIs! 

NFT API Provider Table Chart
  • Speed: Based on speed, Moralis clearly stands out as the premier alternative among the top NFT API providers. This is based on a test conducted on Alchemy’s website. Moralis placed first, OpenSea second, Alchemy third, and QuickNode fourth. Check out the test yourself in the introduction.
  • Supported Chains: What’s more, the Moralis NFT API supports more networks than both Alchemy and OpenSea. As such, when it comes to NFT coverage, Moralis outshines the other API providers. 
  • Features: All NFT API providers above supply the basic functionality to build NFT-based platforms, and each API provides a unique set of features. However, the Moralis NFT API has an edge, offering cutting-edge features like optimized image previews, enriched metadata, etc.

Overall, the NFT API providers featured in this article are all promising choices for anyone looking to build NFT projects. However, through our comparison, we can determine that the Moralis NFT API provides most of what the competition offers and more, making it stand out as the industry’s premier NFT API!

Since Moralis stands out as the premier option amongst the industry’s most prominent NFT API providers, we’ll dive deeper into the capabilities of this tool in the following sections!

The Moralis NFT API Deep Dive 

The Moralis NFT API provides everything you need to build sophisticated NFT-related platforms. With only single lines of code, you can effortlessly get NFTs by wallet or collection, receive up-to-date NFT metadata, check NFT ownership, track trades by marketplace, and much more! 

To further highlight the capabilities of this tool, we’ll explore five prominent Moralis NFT API endpoints:

  • getWalletNFTs(): With the getWalletNFTs() endpoint, you can effortlessly get all NFTs owned by a given wallet:
const response = await Moralis.EvmApi.nft.getWalletNFTs({
  "chain": "0x1",
  "address": "0x1f9090aaE28b8a3dCeaDf281B0F12828e676c326"
});

Response:

//...
"result": [
    {
      "token_address": "0x495f947276749ce646f68ac8c248420045cb7b5e",
      "token_id": "29951961782403822736913780732861789409251877481262609537575053910383727214602",
      "amount": "1",
      "owner_of": "0x1f9090aae28b8a3dceadf281b0f12828e676c326",
      "token_hash": "a37b79bffa936cf09a2385506cdfa7b1",
      "block_number_minted": "17795113",
      "block_number": "17795113",
      "possible_spam": true,
      "contract_type": "ERC1155",
      "name": "OpenSea Shared Storefront",
      "symbol": "OPENSTORE",
      "token_uri": "https://api.opensea.io/api/v1/metadata/0x495f947276749Ce646f68AC8c248420045cb7b5e/0x423835a8af395237b8bece37fe63933ab5a103890000000000000a000000000a",
      "metadata": null,
      "last_token_uri_sync": "2023-07-29T00:26:29.439Z",
      "last_metadata_sync": "2023-07-29T00:26:36.071Z",
      "minter_address": "ERC1155 tokens don't have a single minter",
      "verified_collection": false
    },
  //...
  ]
  • getNFTMetadata(): The getNFTMetadata() endpoint lets you fetch NFT metadata for any token with a single API call:
const response = await Moralis.EvmApi.nft.getNFTMetadata({
  "chain": "0x1",
  "address": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB",
  "tokenId": "1"
});

Response:

{
  "token_address": "0xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb",
  "token_id": "1",
  "transfer_index": [
    11362111,
    125,
    160,
    0
  ],
  "owner_of": "0xb88f61e6fbda83fbfffabe364112137480398018",
  "block_number": "11362111",
  "block_number_minted": "3934590",
  "token_hash": "a99d02058e62e327e79aabd57e0b88a3",
  "amount": "1",
  "contract_type": null,
  "name": "CRYPTOPUNKS",
  "symbol": "Ͼ",
  "token_uri": null,
  "metadata": "{\"image\":\"https://www.larvalabs.com/cryptopunks/cryptopunk001.png\",\"name\":\"CryptoPunk 001\",\"attributes\":[\"Smile\",\"Mohawk\"],\"description\":\"Male\"}",
  "last_token_uri_sync": "2023-10-19T13:42:11.639Z",
  "last_metadata_sync": "2022-08-22T13:27:58.122Z",
  "minter_address": null,
  "possible_spam": false,
  "verified_collection": true
}

To learn more about this, check out our guide on how to get ERC-721 on-chain metadata!

  • getWalletNFTTransfers(): With the getWalletNFTTransfers() endpoint, you can seamlessly get all NFT transfers of a wallet:
const response = await Moralis.EvmApi.nft.getWalletNFTTransfers({
  "chain": "0x1",
  "address": "0x1f9090aaE28b8a3dCeaDf281B0F12828e676c326"
});

Response:

{
  "page": 0,
  "page_size": 100,
  "cursor": null,
  "result": [
    {
      "block_number": "18369975",
      "block_timestamp": "2023-10-17T12:04:23.000Z",
      "block_hash": "0x810591c588ab64dd94992b801c76d14201cd27e3846ce58b1a16393ebc033871",
      "transaction_hash": "0x8b0956edef389997f499efbe07b65e283ee85806e0c69a29ba6a37a17a4f6f69",
      "transaction_index": 97,
      "log_index": 2626,
      "value": "0",
      "contract_type": "ERC1155",
      "transaction_type": "Single",
      "token_address": "0xb3f0417a13789e9b080079a32fa341bed2162a43",
      "token_id": "1",
      "from_address": "0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae",
      "from_address_label": "EthDev",
      "to_address": "0x1f9090aae28b8a3dceadf281b0f12828e676c326",
      "to_address_label": "rsync-builder",
      "amount": "1",
      "verified": 1,
      "operator": "0x807e8ec760389dd0ebe782f8a37e2cabc6f1d768",
      "possible_spam": false,
      "verified_collection": false
    },
   //...
  ],
  "block_exists": true
}
  • getWalletNFTCollections(): The getWalletNFTCollections() endpoint allows you to query all collections owned by a wallet with a single API call:
const response = await Moralis.EvmApi.nft.getWalletNFTCollections({
  "chain": "0x1",
  "address": "0x1f9090aaE28b8a3dCeaDf281B0F12828e676c326"
});

Response:

{
  "status": "SYNCING",
  "page": "2",
  "page_size": "100",
  "result": {
    "token_address": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB",
    "contract_type": "ERC721",
    "name": "CryptoKitties",
    "symbol": "RARI",
    "possible_spam": "false",
    "verified_collection": "false"
  }
}
  • getNFTLowestPrice(): With the getNFTLowestPrice() endpoint, you can get the lowest price of any NFT effortlessly:
const response = await Moralis.EvmApi.nft.getNFTLowestPrice({
  "chain": "0x1",
  "address": "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D"
});

Response:

{
  "transaction_hash": "0x0fe3316c29dec1de02a70805a5f58fa07c1d6d51e20eb69c94ad03c7171f8af8",
  "transaction_index": "127",
  "token_ids": [
    "9291"
  ],
  "seller_address": "0x1c3912f103563ee38fb827bf03641f4ec6d52e2a",
  "buyer_address": "0x2c2ed4b3876c442fee80bee76ce0ee2ca2a512af",
  "token_address": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d",
  "marketplace_address": "0x00000000000000adc04c56bf30ac9d3c0aaf14dc",
  "price": "2550000000000000000",
  "block_timestamp": "2023-10-17T21:17:23.000Z",
  "block_number": "18372720",
  "block_hash": "0x699f8f59a3d60e9c005c77cf4b9e032c5e95de18bb3f8791541ee86a77eaf076"
}

The endpoints above are just five prominent examples of what you can do with the Moralis NFT API. If you want to learn more, please visit our official NFT API documentation page!

Tutorial: Get NFTs Owned By Address with Moralis in 3 Steps 

In this section, we’re going to show you how to use the premier option out of the top NFT API providers: the Moralis NFT API. To do so, we’ll provide an in-depth tutorial on how to get all NFT tokens owned by a user address. And thanks to the accessibility of this industry-leading API, you can now get this data in three straightforward steps: 

  1. Get a Moralis API Key
  2. Write Code Calling the getWalletNFTs() Endpoint
  3. Run the Script

But before proceeding with the tutorial, you must deal with a few prerequisites! 

Prerequisites

The Moralis NFT API supports several programming languages. However, for this tutorial, we’ll be using JavaScript. As such, if you wish to follow along, you need to have the following ready before you can continue: 

  • Node v.14+
  • NPM/Yarn

Step 1: Get a Moralis API Key 

To interact with the NFT API, you need an API key. And to get your API key, you need a Moralis account. As such, if you haven’t already, set up your account right now by clicking on the ”Start for Free” button at the top right: 

NFT API Provider Moralis Homepage - Start for Free Button

With an account at your disposal, go to the ”Settings” tab, scroll down to the ”Secrets” section, and copy your key: 

Copying NFT API key

Keep it for now, as it’s needed in the next step to initialize the Moralis SDK! 

Step 2: Write Code Calling the getWalletNFTs() Endpoint 

Create a new project in your IDE, open a new terminal, and run the following command in the project’s root folder to install the Moralis SDK: 

npm install moralis @moralisweb3/common-evm-utils

From there, you can create a new ”index.js” file and add the following code: 

const Moralis = require("moralis").default;
const { EvmChain } = require("@moralisweb3/common-evm-utils");

const runApp = async () => {
  await Moralis.start({
    apiKey: "YOUR_API_KEY",
    // ...and any other configuration
  });

  const address = "0xd8da6bf26964af9d7eed9e03e53415d37aa96045";

  const chain = EvmChain.ETHEREUM;

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

  console.log(response.toJSON());
};

runApp();

Next, initialize the Moralis SDK by replacing YOUR_API_KEY with the key you previously copied: 

Code parameter where to paste the NFT API key

Now, you additionally need to configure the chain and address constants to fit your query: 

Chain paremeter to change the blockchain network to fetch NFTs on

We then pass along chain and address as parameters when calling the getWalletNFTs() endpoint: 

Best NFT API providers endpoint - entering in endpoint in code

That’s it for the code! You’re now ready to run the script! 

Step 3: Run the Code 

To execute the code, open a new terminal and run the following command in the project’s root folder: 

node index.js

In return, you’ll get an array of all NFTs owned by the wallet. It should look something like this: 

//...
  "result": [
    {
      "token_address": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85",
      "token_id": "4765809967066625256798886812262830659450023020194524584471225959000376492819",
      "amount": "1",
      "owner_of": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
      "token_hash": "ba6d44b5f16be94283cecffeb784b7ca",
      "block_number_minted": "15572796",
      "block_number": "15573017",
      "contract_type": "ERC721",
      "name": "Ethereum Name Service",
      "symbol": "ENS",
      "token_uri": null,
      "metadata": null,
      "last_token_uri_sync": null,
      "last_metadata_sync": "2022-09-20T06:06:08.153Z",
      "minter_address": null
    },
 //...
  ],
  "status": "SYNCED"
}

Congratulations! You now know how to get all NFTs owned by a wallet using the Moralis NFT API! 

From here, you can apply the same principles to call any other endpoint to get NFT metadata, transfers, owners, and much more! Also, did you know you can get image previews for all the NFTs you just queried? To learn more about this, check out our guide on the industry’s #1 NFT Image API

Summary: A Comparison of the Best NFT API Providers

In today’s article, we compared the top three NFT API providers: 

  1. Moralis
  2. OpenSea
  3. Alchemy

In doing so, we learned that the Moralis NFT API stands out as the fastest option, features the most comprehensive NFT coverage, and provides most of what the competition has to offer and more! So, if you’re looking to build NFT projects, the Moralis NFT API is your go-to option! 

If you liked this tutorial on the best NFT API providers, check out more comprehensive guides on the Web3 blog. For instance, learn how to get an ERC-20 token address or explore the ERC-4337 standard! 

Also, before you leave, remember to sign up with Moralis, and you’ll be able to build Web3 projects faster and more efficiently!  

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

Blockchain Infrastructure Companies – How to Choose the Right Provider

October 16, 2022

Blockchain-Based Authentication – How to Integrate?

September 13, 2022

How to Build a Decentralized Social Media Profile

December 8, 2022

How to Get NFT Collections Using Python and React

December 22, 2022

What is Danksharding? EIP-4844 and Danksharding Explained

March 21, 2023

Get Crypto Data Using a Python API for Cryptocurrency

March 18, 2024

SOC 2 in Web3 – The First SOC 2 Type 2 Certified Web3 Infra Provider 

March 3, 2023

How to Build a Polygon Portfolio Tracker

March 13, 2023

Buy ENS Domain – Where to Buy ETH Domains