Arbitrum is Ethereum’s Layer 2 scaling solution, addressing the high gas fees and network congestion issues faced by Ethereum. As Ethereum’s Layer 1 has limitations of verifying only 15 transactions per second, this restricts Ethereum’s scalability amid the substantial demand. Arbitrum utilizes Rollup scaling technology, aiming to tackle Ethereum’s congestion and high costs while enhancing the blockchain’s scalability and efficiency. It comprises two independent mainnets based on different technologies: Arbitrum One and Arbitrum Nova. This article will explain how to use the NFTScan NFT API to develop Web3 applications on the Arbitrum One network.
Regarding NFTScan data, as of November 17th, the Arbitrum network has cumulatively issued 20,491,636 NFT assets, with 30,680 NFT Collections, generating 58,379,412 transaction records. There have been interactions from 3,950,849 wallet addresses, resulting in a total transaction volume of 33,660.01 ETH.
Arbitrum NFTScan:https://arbitrum.nftscan.com
Currently, in addition to 15 EVM-compatible chains, NFTScan supports 4 other non-EVM blockchains: Bitcoin, Aptos, Solana, and TON.
Accessing the NFTScan NFT API
Step 1: Create a NFTScan Developer Account
Before utilizing the NFTScan API, visit the NFTScan developer platform and create an account. Go to the official NFTScan website and click on the “Sign Up” button under NFTScan API.
NFTScan Developer: https://developer.nftscan.com/user/signup
Once logged in, find your unique API KEY on the Dashboard. Visit the API documentation and input your API KEY in the designated location. Follow the documentation’s instructions to start using the API services.
In the API documentation, developers can find multiple interface modes to choose from based on their requirements. Additionally, developers can monitor their API usage statistics in the Dashboard, which helps in keeping track of historical data. Furthermore, NFTScan offers each registered developer 1M CU of API calls, which can be used for requesting all NFT API interfaces, and these CU never expire.
Step 2: View Ethereum API Documentation
After successfully registering a developer account and obtaining an API Key, you need to review the NFTScan API documentation. The API documentation contains all available API endpoints and parameters, as well as detailed information on how to build requests and handle responses. Please read the API documentation carefully and make sure you understand how to use the API to obtain the data you need. NFTScan API services are dedicated to helping developers improve their experience in obtaining NFT data analysis.
Currently, NFTScan has the largest and most comprehensive NFT Collection database on the web, supporting full NFT data for 20 blockchains including Ethereum, Solana, BNBChain, Bitcoin, TON, Polygon, zkSync, Aptos, Linea, Base, Avalanche, Arbitrum, Optimism, Scroll, Viction,Fantom, Moonbeam, PlatON, Cronos, and Gnosis. The covered NFT data is extensive and diverse, providing a complete set of interfaces to obtain ERC721 and ERC1155 assets as well as transaction, project, and market statistics information. NFTScan now supports more than 60 public interfaces for EVM-compatible chains and a group of equivalent interfaces for Solana, Aptos, Bitcoin, and TON, largely meeting developers’ needs for indexing various types of NFT data.
Arbitrum NFT API Model
This comprises three primary model interfaces, each with an overview and explanation of core API fields to assist developers in accessing and utilizing data for their Dapp services under development.
1/ Assets API: “Assets” represent the most critical data fields within NFT, uniquely identifying and describing digital assets. Developers can extract “Assets” data from NFTs on the Arbitrum to gain comprehensive insights and construct relevant applications. The “Assets” object provides unique identification for digital assets and data about their entire lifecycle, serving as a foundation for developers to understand and utilize NFTs.
2/ Transactions API: The transaction model represents the complete transaction data for an NFT asset on the blockchain, offering developers a full view of an NFT’s transaction history. This includes NFT minting, transfers, sales, and other transaction activities, providing developers with an opportunity to deeply understand the flow and evolution of NFT assets within the Arbitrum ecosystem. NFTScan continuously aggregates NFT transaction market and related contract information from various blockchain networks. Currently, NFTScan has compiled data for tracking and understanding NFT market dynamics, aiding developers in building NFT-based applications and tools.
3/ Collections API: NFTScan retrieves off-chain data related to NFT Collections, including descriptions, social media, and other fundamental information. This data is obtained from the most popular NFT markets provided through various blockchain networks. Additionally, floor price information is centralized data derived from order information on NFT markets, and it can be accessed via API.
Arbitrum NFT API Retrieval
1/ Retrieve Assets Series
- Get NFTs by account (Retrieve NFTs using a wallet address)
- Get all NFTs by account (Retrieve all NFTs associated with a wallet address and group them by contract address. If the total number of NFTs owned by the account exceeds 2000, the returned NFTs will be limited to 2000 or less. In such cases, developers and users can use pagination queries to retrieve all NFTs owned by the account.)
- Get minted NFTs by account (Retrieve NFTs minted by a specific wallet address)
- Get NFTs by contract (Retrieve NFTs using a contract address, sorted by token_id in ascending order)
- Get single NFT (Retrieve details of a single NFT)
- Get multiple NFTs (Retrieve details of multiple NFTs from different contract addresses simultaneously)
- Search NFTs (This interface returns a list of NFT assets by applying search filters in the request body. Assets are sorted by nftscan_id in ascending order.)
- Get NFTs by attributes (This interface returns a set of NFTs belonging to contract addresses with specific attributes. NFTs are sorted by token_id in ascending order.)
- Get all multi-chain NFTs by account (This interface returns all multi-chain NFTs owned by a specific wallet address, grouped by contract address.)
Here we retrieve detailed information about minted NFTs belonging to a wallet address using the “Get minted NFTs by account” interface, which utilizes the endpoint “/v2/account/mint/{account_address}”. The path parameter includes “account_address” as the selection criteria, and the query parameter involves selecting ERC721 or ERC1155 NFT assets. In this instance, we are querying all ERC721 NFTs that have been minted under the address “0x02ac25b565c053bc1e7aa2a1499622512af375f1”.
Clicking “Try it” returns the following data, primarily including basic information queries about NFT asset contract addresses, metadata details, rarity scores, and rankings. Here, it can be seen that a total of 5 ERC721 NFTs are returned under this address, namely: “Vela — Beta Participation NFT#688,” “Vela AMA — Official NFT#3667,” “Vela’s Official Launch NFT#181,” “Camelot staking position NFT#51,” and “Vela x Arbitrum AMA — Official NFT#4320.”
2/ Retrieve Transactions Series
- Get transactions by account (This interface returns a list of NFT transactions for a wallet address)
- Get transactions by contract (This interface returns a list of NFT transactions for an NFT contract address)
- Get transactions by NFT (This interface returns a list of NFT transactions for a single NFT)
- Search transactions (This interface returns a list of NFT transactions by applying search filters in the request body)
- Get transactions by address (This interface returns a list of NFT transactions filtered by transaction parameters)
- Get transactions by hash (This interface returns transaction records based on a list of transaction hashes)
Here we use the “Get transactions by account” interface, accessed via “/v2/transactions/account/{account_address}”, to retrieve the NFT transaction records associated with a particular wallet address. The query parameters allow the selection of specific NFT event types (Mint/Transfer/Sale/Burn), separated by ‘;’.
Similarly, here we retrieve the NFT transaction records for address “0x02ac25b565c053bc1e7aa2a1499622512af375f1”. Filtering by the Mint event type, the response data contains all key details of NFT Mint events under this address. This includes transaction hash values, ‘From’ and ‘To’ addresses, block information, gas consumption, transaction timestamps, and other foundational data characteristic of NFT transactions.
3/ Retrieve Collections Series
- Get an NFT collection (Retrieve details based on the contract address of the collection, including an overview and classification of items based on descriptions, distribution of holders, average prices, floor prices, and other basic summary information)
- Search NFT collections (This interface returns information about collections by applying search filters in the request body, and the collections are sorted in ascending order based on the deployment block number)
- Get NFT collections by account (This interface returns a list of projects with the given account address, and the collections are sorted from high to low based on the floor price)
- Get NFT collections by ranking (This interface returns a list of projects with the given sorting field, and the collections are sorted based on the specified sorting field and direction)
Here we use the “Get NFT collections by account” interface accessed via “/v2/collections/own/{account_address}” to retrieve details about the NFT collections owned by the address “0x02ac25b565c053bc1e7aa2a1499622512af375f1”.
4/ Collection Statistics
- Collection Statistics (This interface provides an analytical overview of NFT Collection statistics)
- Collection Trade Distribution (This interface primarily provides the distribution of project trades)
- Collection Trending Statistics (Mainly returns trading statistics ranking for a project)
- Collection Holding Amount Distribution (This interface can provide information on the distribution of NFT project holdings)
- Collection Holding Period Distribution (Data returns information about the distribution of NFT project holding periods)
- Collection Blue Chip Statistics (Overview statistics for blue-chip projects)
- Collection Blue Chip List (List of blue-chip projects associated with the project, referring to NFTScan Blue Chip Collection)
- Collection Top Holder (Distribution of the top holders of the Collection)
Here, by utilizing the “Collection Blue Chip Statistics” interface via “/v2/statistics/blue/chip/{contract_address}”, it primarily provides statistical data related to blue-chip projects. For further reference, you can consult the NFTScan Overview available at:
https://www.nftscan.com/0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d?module=Analytics
5/ Account Statistics Series
- Account Overview Statistics (This interface returns an overview of statistical information for an account address, refer to NFTScan Overview)
- Account Holding Distribution (This interface returns statistical information on the distribution of NFT holdings for an account address, refer to NFTScan Portfolio)
- Account Holding NFT Trending (This interface returns statistical information on the trending NFT holdings or quantities for an account address, refer to NFTScan Portfolio)
6/ Analytic Statistics Series
This series of interfaces are typically used to obtain various data analysis and statistical information on the NFTScan Polygon network. Interfaces like Trade Ranking, Mint Amount, and others allow developers or users to query, analyze, and retrieve statistical data related to specific datasets or metrics. They can be used for various purposes, including market analysis, trend tracking, investment decisions, and understanding the nature of specific data.
Reference: https://arbitrum.nftscan.com/analytics
7/ Refresh Metadata
Refresh NFT metadata
Refresh NFT metadata by contract
Interfaces like Refresh Metadata can assist developers or users in submitting backend tasks to refresh metadata. Once reviewed, these tasks will refresh the specified item or the entire contract metadata.
8/ Other
- Get the latest block number (Returns the latest block number reached by NFTScan)
- Get NFT amount by account (Returns information on the quantity of ERC721 and ERC1155 NFTs owned by the account address specified in the request body)
- Get NFT owners by contract (Returns a list of owners for the specified ERC721 NFT contract address, with NFTs sorted by token_id)
- Get owners by an NFT (Returns a list of owners for the specified ERC1155 NFT, with NFTs sorted by account_address)
Building Relevant NFT API Requests
When developers find the desired Arbitrum API endpoints and parameters in the NFTScan API documentation, they can use their preferred programming language (such as Python, Java, JavaScript, etc.) to write code for API requests. Below is an example demonstrating how to request details of the NFT collections held by a wallet address “0x02ac25b565c053bc1e7aa2a1499622512af375f1” using Python and the NFT endpoint “/v2/collections/own/{account_address}”:
This Python code showcases how to use the requests library to construct an API request to fetch information about the NFT collections held by the specified wallet address on Arbitrum using the provided NFT endpoint. This code sends an HTTP GET request to the designated endpoint and expects a JSON-formatted response.
About NFTScan
NFTScan is the world’s largest NFT data infrastructure, including a professional NFT explorer and NFT developer platform, supporting the complete amount of NFT data for 19 blockchains including Ethereum, Solana, BNBChain, Arbitrum, Optimism, and other major networks, providing NFT API for developers on various blockchains.
Official Links:
NFTScan: https://nftscan.com
Developer: https://developer.nftscan.com
Twitter: https://twitter.com/nftscan_com
Discord: https://discord.gg/nftscan
Top comments (0)