0%
Overview page background
HomeOverviewsNFTs
Arbitrum NFT API: Overview and Quickstart Guide

Arbitrum NFT API: Overview and Quickstart Guide

Alchemy headshot

Written by Alchemy

Brady Werkheiser headshot

Reviewed by Brady Werkheiser

Published on October 28, 20223 min read

Arbitrum is a Layer 2 (L2) scaling solution for Ethereum that increases transaction speeds and lowers gas costs relative to the Ethereum mainnet, making it an attractive choice for Solidity developers familiar with the Ethereum Virtual Machine.

Arbitrum is the leading layer 2 Ethereum scaling solution that uses optimistic rollups (ORUs), and based on Arbitrum statistics, is showing healthy growth. Although the entire market has been in a down trend since the beginning of 2022, the Q3 Web3 Developer report shows the Arbitrum ecosystem has grown:

  • 516% growth in active teams YTD

  • 795% growth in active developer teams Y/Y

  • 121% growth in API consumption YTD

Some of the most popular dApps on Arbitrum include:

  • Aave - one of the biggest Peer-to-Peer lending protocols in DeFi

  • 1inch - a decentralized exchange (DEX) aggregator that helps users find the best value when swapping tokens

  • Yearn Finance - a DeFi protocol focused on yield optimization when lending crypto assets

Additionally, platforms like Uniswap, Sushi, Balancer, and OpenSea have recently integrated Arbitrum support to bring more mainstream dapps to the Arbitrum network.

With so much demand for faster and cheaper EVM-compatible blockchains, Arbitrum provides developers with an attractive blockchain. Because developers face time and resource constraints when indexing and querying NFT metadata, Alchemy extended NFT API support so developers can create high-end NFT projects on Arbitrum.

An Arbitrum NFT API is a suite of API endpoints for querying non fungible tokens (ERC721) and semi-fungible tokens (ERC1155) tokens on the Arbitrum blockchain including getNFTs, isHolderForCollection, and more.

To communicate with Arbitrum nodes using Alchemy's multichain NFT API, developers can use JSON-RPC methods to read and write data to and from Arbitrum through a self-hosted node or an Arbitrum node provider. The Arbitrum NFT API supports on-chain and off-chain NFTs in JSON, SVG, UTF-8 format, IPFS gateways like Pinata, and encoded Base64 pictures.

Alchemy' Arbitrum NFT API offers a variety of powerful endpoints for querying everything from the most fundamental getNFTs call to calls for ownership and metadata. Common use cases include dashboards, wallets, NFT viewers, NFT search, rarity tools, and analytics tools.

The following Arbitrum NFT API endpoints are often used by developers to determine the holders of a particular NFT or collection. These endpoints are useful for setting up token gating mechanisms on platforms like Discord or Shopify.

  • getNFTs - find Arbitrum NFTs owned by a specific wallet 

  • getOwnersForToken - get Arbitrum owners for a token 

  • getOwnersForCollection - get Arbitrum NFT owners for collection

  • isHolderOfCollection - check if the Arbitrum wallet holds a specific NFT

  • getNFTsForCollection - get NFTs for that are part of an Arbitrum NFT collection

Metadata includes information such as collection name, supply, attributes, and symbol. The Arbitrum NFT metadata is helpful for developers building analytics tools and traders analyzing data.

  • getNFTMetadata - get Arbitrum NFT metadata

  • getContractMetadata - get Arbitrum NFT smart contract metadata

The Alchemy SDK is the most comprehensive and powerful Javascript SDK available today to interact with Arbitrum. Alchemy's web3 SDK supports the exact same syntax and functionality of the Ethers.js AlchemyProvider and WebSocketProvider, making it a 1:1 mapping for anyone using the Ethers.js Provider.

It gets better!

The Alchemy SDK adds a significant amount of improved functionality on top of Ethers, such as:

  1. Access to Alchemy’s Enhanced APIs

  2. Access to Alchemy's NFT APIs

  3. Robust WebSockets support

  4. Automated retries

The SDK leverages Alchemy's resilient node infrastructure, guaranteeing best-in-class node reliability, scalability, and data correctness, and is undergoing active development by Alchemy's engineers.

For full instructions on how to get started using the web3 SDK, read our official documentation. Simply running this script will install the SDK:

Copied
npm install alchemy-sdk

If you don't have an Alchemy account, create a new account and create an Arbitrum app. You will need the API Key and the URL to import the SDK.

Create a new Arbitrum app in Alchemy's developer dashboard.
Create a new Arbitrum app in Alchemy's developer dashboard.

You can then import and use the SDK. Before running the script in your terminal, make sure to replace your:

  • apiKey - you can get this by creating a new Arbitrum app in Alchemy and copying the API Key

  • network - you can copy and paste this from your Arbitrum app settings

Copied
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.ARB_MAINNET, // Replace with your network. }; const alchemy = new Alchemy(settings); // Access standard Ethers.js JSON-RPC node request alchemy.core.getBlockNumber().then(console.log);

You can also copy the example code provided directly within the Alchemy dashboard and run it in your terminal:

Arbitrum API key and code example in the Alchemy dashboard.
Arbitrum API key and code example in the Alchemy dashboard.

That's it! Now you're running Alchemy's SDK and connected to the Arbitrum network. Now, you have full access to the most powerful NFT API for Arbitrum in web3!

Overview cards background graphic
Section background image

Build blockchain magic

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

Get your API key