Cointime

Download App
iOS & Android

Guide: How to Retrieve NFT Assets Using NFTScan NFT API

Validated Project

In recent years, with the rapid development of blockchain, developers are facing a retrieval dilemma due to the vast amount of NFT asset data. The explosive growth of NFT assets on public chains presents a challenge as these assets are numerous and diverse, spread across different blockchains. This requires significant time and effort to parse and clean the data, posing a major challenge for NFT application developers — how to efficiently retrieve NFT data?

As of August 14, 2023, NFTScan currently supports 16 mainstream blockchain networks, generating a total of 2,658,452 NFT contracts, 1,005,025,576 NFT assets, 1,922,619,688 NFT on-chain records, 134,009,635 NFT trading active wallet addresses, a total NFT market cap of $13,523,058,924, and a historical NFT trading volume of $65,130,304,272.

  Data source: NFTScan


Developers are currently facing many challenges in obtaining and utilizing NFT data. Firstly, NFT data is distributed across numerous public chains that are fragmented and lack interoperability, making it difficult to aggregate NFT data from different chains for unified access. Secondly, even on the same public chain, there is a vast array of NFT projects, making the task of retrieving NFT metadata and transaction information a substantial undertaking.

Currently, developers struggle to find convenient tools for manually obtaining NFT data. Many exceptional teams are building NFT developer tools, with platforms like NFTScan serving as data infrastructure providers. These NFT-related data platforms offer a simple and effective solution through NFT APIs. Developers can easily access on-chain NFT data through these API interfaces and analyze, process, aggregate, and visualize the data.

How to Access NFTScan NFT API

1/ Create an NFTScan Developer Account

Before using the NFTScan API, visit the developer website and create an account. Register by clicking the “Sign Up” button on the NFTScan API page.

https://developer.nftscan.com/user/signup

After logging in, find your unique API KEY on the Dashboard. Access the API documentation and enter your API KEY where required. Follow the instructions in the documentation to start using the API services. The API documentation provides various interface modes for developers to choose the most suitable one based on their needs.

In the Dashboard, developers can also view statistical data about their API usage, aiding in tracking historical usage. Additionally, NFTScan provides each registered developer with 1M CU of API calls, allowing requests for all NFT API interfaces, and these CUs never expire.

2/ View NFT API Documentation

After successfully registering and obtaining an API Key, you need to review the NFTScan API documentation. The API documentation contains all available API endpoints, parameters, and detailed information on building requests and handling responses. Carefully read the API documentation and ensure you understand how to use the API to retrieve the required data. NFTScan API services aim to enhance the NFT data analysis experience for developers.

NFTScan currently boasts the most extensive NFT Collection library across the network, supporting a comprehensive range of NFT data from 16 blockchains including Ethereum, Solana, BNBChain, Bitcoin, Polygon, zkSync, Aptos, Linea, Avalanche, Arbitrum, Optimism, Fantom, Moonbeam, PlatON, Cronos, and Gnosis. The covered NFT data is diverse and rich, offering a complete set of interfaces for obtaining ERC721 and ERC1155 assets, transactions, project statistics, and market information. The platform now supports over 50 public interfaces for EVM-compatible chains, along with a batch of interfaces for Solana, Aptos, and Bitcoin, meeting developers’ needs to index various types of NFT data.

3/ Retrieve NFT Asset-Related APIs

  • Get NFTs by Account Retrieve NFTs associated with an account address.
  • Get All NFTs by Account Retrieve all NFTs owned by an account address. NFTs are grouped by contract addresses. If an account address holds more than 2000 NFTs, the returned NFTs will be limited to 2000 or fewer. In such cases, developers and users can perform paginated queries to fetch all NFTs owned by the account.
  • Get Minted NFTs by Account Retrieve NFTs minted by a specific account address.
  • Get NFTs by Contract Retrieve NFTs using a contract address and sort them in ascending order based on token_id.
  • Get Single NFT Retrieve a single NFT.
  • Get Multiple NFTs Retrieve multiple NFTs from different contract addresses simultaneously.
  • Search NFTs This API returns a list of NFT assets by applying search filters in the request body. Assets are sorted in ascending order of nftscan_id. Note: When filtering data using only the block_number condition, the range between block_number_start and block_number_end should not exceed 10000.
  • Get NFTs by Attributes This API returns a group of NFTs belonging to contract addresses with specific attributes. NFTs are sorted in ascending order based on token_id.
  • Get All Multi-Chain NFTs by Account This API returns all multi-chain NFTs owned by an account address, with NFTs grouped by contract addresses.

These APIs significantly simplify the complexity of retrieving cross-chain NFT data for developers. They offer a comprehensive range of data across different chains, making them highly applicable in scenarios like data querying, visualization, and analysis. Built on reliable APIs, they greatly enhance development efficiency.

NFTScan API doc
  1. Get all NFTs by account

“/v2/account/own/all/{account_address}” — In this interface, we’re requesting all NFTs owned by the whale address:

0xca1257ade6f4fa6c6834fdc42e030be6c0f5a813.

Clicking “Try it” reveals the response showing a total of 349 items under this address, grouped in intervals of 100. It provides descriptions of basic information for certain top-level NFT collections held by this address, like BoredApeYachtClub (BAYC).

  1. Collection address: 0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d Name: BoredApeYachClub Total items: 10,000 Owned by address: 26 Symbol: BAYC Floor price: 30 ETH
  2. Collection address: 0x60e4d786628fea6478f785a6d7e704777c86a7c6 Name: MutantApeYachtClub Total items: 19,481 Owned by address: 23 Symbol: MAYC Floor price: 5.7399 ETH
  3. Collection address: 0xba30e5f9bb24caa003e9f2f0497ad287fdf95623 Name: BoredApeKennelClub Total items: 9,602 Owned by address: 23 Symbol: BAKC Floor price: 2.1878 ETH

2. Get all multi-chain NFTs by account

“/v2/assets/chain/{account_address}” — This interface retrieves all NFT assets across various chains for a wallet address. It offers a global analysis of user behavior and provides a data foundation for cross-chain applications.

In this instance, we’re examining the whale address 0xca1257ade6f4fa6c6834fdc42e030be6c0f5a813. Clicking “Try it” reveals activity on Ethereum and BNBchain, showing 349 Collections on the ETH network and 2 Collections on the BNB network, along with precise item data analysis.

3. Get NFTs by contract

“/v2/assets/{contract_address}” — This interface fetches a list of all NFT assets generated under a specified contract address. It has applications such as retrieving all NFTs within a project or obtaining metadata for multiple token IDs.

To acquire all NFTs within a specific NFT project, you can easily retrieve a list of all NFT IDs generated by that project by filtering according to its contract address.

For bulk retrieval of NFT metadata based on contract addresses, you can first obtain all tokenIDs through the contract address, and then retrieve the metadata for each tokenID in bulk.

Constructing yield analysis for NFT projects involves gathering the total number of NFTs deployed within different time periods, enabling an analysis of the project’s growth trajectory.

To track the circulation of NFTs within a contract address, you can periodically fetch the NFT list within the contract, thereby detecting incoming and outgoing NFTs.

The data response showcases fundamental information and metadata for all items within the NFT Collection. For instance, using Bored Ape Yacht Club as an example, data is sorted by token_id. For item ID 0:

  1. Individual item’s basic data: Contract address: 0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d, Name: Bored Ape Yacht Club. NFT Token ID: 0, Accounting for 1% within the project, erc721 standard. Wallet address at Mint/Holder’s wallet address at Mint. Timestamp at casting/Mint hash address/Token URI address. latest_trade_price/Latest_trade_symbol/Latest_trade_timestamp is currently displayed as null, indicating no trading has occurred.
  2. Metadata: Metadata is hosted on IPFS, format: image/png. Storage path: ipfs://QmcJYkCKK7QPmYWjp4FD2e3Lv5WCGFuHNUByvGKBaytif4, along with detailed descriptions of the image.
  3. Rarity: Score of 1.08649973006184, comprehensive rarity ranking at 2273.

NFTScan not only focuses on providing API for NFT asset retrieval, but also provides multidimensional and comprehensive NFT data resources for developers. These resources cover multiple levels from NFT metadata, user data to industry data. The rich data resource types provide developers with highly customizable combination choices. Developers can freely retrieve suitable NFT data from the interface according to the actual business needs of their application.

It can be said that NFTScan provides a customized NFT data retrieval experience that is different from traditional blockchain data platforms. This not only enriches the functionality settings of applications, but also greatly reduces the cost of developers obtaining and processing NFT data. With continuous expansion and optimization of the interface, NFTScan will become the backbone of developers’ NFT data services. We look forward to developers freely unleashing their creativity here, nurturing more NFT innovative applications and promoting the development of the entire industry.

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 15 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

NFTScan Connect Program

Comments

All Comments

Recommended for you

  • Walsh to Hold FOMC Press Conference at 2:30 PM ET

    On October 28, it was announced that Federal Reserve Chairman Kevin Walsh will hold a FOMC press conference at 2:30 PM ET.

  • Changxin Technology Included in Shanghai Composite Index as Top Weighted Stock

    On October 28, according to the website of the China Securities Index Company, Changxin Technology has been included in the Shanghai Composite Index with a weight of 4.67%, making it the largest weighted stock in the index. Agricultural Bank of China and Industrial and Commercial Bank of China rank second and third, with weightings of 3.83% and 3.77%, respectively. Changxin Technology has also been included in the Shanghai STAR Market Composite Index, with a weight of 15.74%, making it the top weighted stock there as well. According to the compilation plan, the weight factor will be adjusted on the next trading day after the second Friday of each month or when the newly included sample weight exceeds 15%.

  • SK Hynix Plans 100 Trillion Won Shareholder Returns by 2026

    On October 28, regulatory filings revealed that SK Hynix plans to distribute at least 30 trillion won in cash dividends and to repurchase and retire at least 60 trillion won worth of shares by 2026. The share buyback includes a recently completed 40 trillion won stock repurchase.

  • SK Hynix Reports Q3 Sales of 104.62 Trillion Won

    On October 28, SK Hynix reported third-quarter sales of 104.62 trillion won, exceeding expectations of 98.96 trillion won. The operating profit for the third quarter was 83.33 trillion won, higher than the anticipated 77.5 trillion won. SK Hynix plans to repurchase 20 trillion won worth of shares.

  • WTI Crude Oil Drops 1.5% to $100.19 per Barrel

    International oil prices hit a daily low, with Brent crude futures (December contract) trading around $114. WTI crude oil experienced a daily decline of 1.5%, settling at $100.19 per barrel.

  • Meta Falls 1.4%, Plans to Raise $95 Billion for AI Investment

    On October 27, Meta (META.US) fell 1.4%, closing at $621.47. In news, Meta has initiated a public offering to raise approximately $35 billion and plans to raise up to $60 billion through a market offering of a new class of non-voting C shares. Meta stated that these plans will support its ongoing investments in AI infrastructure and personal superintelligence.

  • General Compute Completes $100 Million Series A Funding, Valued at $800 Million

    On October 27, AI computing cloud service provider General Compute announced the completion of a $100 million Series A funding round, led by Blackbird Ventures and Abstract Ventures, with a post-funding valuation of $800 million, up from a valuation of $60 million after its seed round in May. The company was co-founded by Finn Puklowski, who serves as CEO, and focuses on building cloud services using specialized inference chips that compete with Nvidia. Chip suppliers include SambaNova (which previously secured a $400 million procurement agreement), Positron, and Cerebras. The company has signed a major client with an annual recurring revenue of $100 million. Its strategy involves not building large data centers but instead utilizing smaller power sources, renting space in other companies' data centers, and repurposing former Bitcoin mining sites for AI model operations. Puklowski expects to deploy 75 megawatts of computing power by 2027 and to secure 200 megawatts of electricity.

  • US Bitcoin Spot ETF Sees $203 Million Net Outflow in October, Cumulative Net Inflow Reaches $57.4 Billion

    As of October 26, the US Bitcoin spot ETF experienced a net outflow of approximately $203 million, bringing the cumulative net inflow to $57.4 billion.

  • Morgan Stanley: Gold's Hedging Role Needs Reassessment, Still Prefers Metal Assets

    On October 27, the price of gold has fallen from $5,600 per ounce at the beginning of this year to recently dropping below $4,000 per ounce. Despite the weak short-term trend, Morgan Stanley stated that it will maintain gold as the preferred metal asset and set a target price of $5,000 per ounce for the second quarter of 2027.

  • U.S. Stock Market Opens Higher, SK Hynix Rises Over 2%

    On October 27, the U.S. stock market opened with all three major indices rising. The Nasdaq increased by 0.45%, the S&P 500 rose by 0.3%, and the Dow Jones gained 0.04%. SK Hynix saw a rise of over 2% following the release of its Q3 earnings report, which is expected to announce an additional shareholder return plan of 50 trillion to 60 trillion Korean won. Broadcom rose nearly 3% as Anthropic finalized a $63 billion financing deal to purchase Broadcom chips. HSBC Holdings fell over 6%, with Q3 pre-tax profit increasing by 32% year-on-year to $9.6 billion, which was below expectations.