Cointime

Download App
iOS & Android

🛠️ Guide: How to Develop Web3 dApps on Sei Network Using NFTScan NFT API

Validated Project

Gravity is a Layer-1 blockchain designed for massive adoption and the multi-chain future. Its approach abstracts away the technical complexities of multi-chain interoperability, integrating cutting-edge technologies like zero-knowledge proofs, advanced consensus mechanisms, and a re-staking-driven architecture to ensure high performance, enhanced security, and cost-effectiveness. Adopting a cross-chain settlement protocol, it aims to leverage its high performance and fast finality chain capabilities fully.

According to data from NFTScan, as of August 27th, a total of 18,633 NFT assets have been issued on the Gravity Network, with 32 NFT Collections and 18,700 interaction records generated, involving 17,630 unique wallet addresses.

👉 Gravity NFTScan: https://gravity.nftscan.com/

Creating an NFTScan Developer Account

Before starting to use the NFTScan API, you need to visit the developer website and create an account. Go to the official NFTScan website and click the “Sign Up” button for NFTScan API to register.

Sign Up - NFT API | NFTScan Developer Platform developer.nftscan.com

After logging in, find your unique API KEY on the Dashboard, and copy it. Access the API documentation, and enter your API KEY in the appropriate field. Following the guidance in the documentation, you can start using the API service. In the API documentation, developers can find various interface modes to choose from based on their needs.

In the Dashboard, developers can also view statistics on their API usage, helping to record historical usage data. Moreover, NFTScan provides each registered developer with 1M CU of API call service to request all NFT API interfaces, and the CU never expires, until it’s used up!

Check Gravity NFT API Documentation

After successfully registering a developer account and obtaining an API Key, you need to review the NFTScan API documentation. The API documentation includes all available API endpoints, parameters, and detailed information on how to construct requests and handle responses. Please read the API documentation carefully and ensure you understand how to use the API to obtain the data you need. The NFTScan API service is dedicated to helping developers improve their experience in obtaining NFT data analysis.

Currently, NFTScan has the largest and most comprehensive NFT Collection database, supporting full NFT data from 25 blockchains, including Ethereum, Solana, BNBChain, Bitcoin, Mint, and more. The NFT data covered is comprehensive and diverse, providing a complete set of interfaces to obtain information on ERC721, ERC1155, ERC404, ERC6551 assets, as well as transactions, projects, and market statistics. It now supports over 60 public interfaces for EVM-compatible chains, as well as a batch of interfaces with the same model for Solana, Aptos, Bitcoin, and TON, largely meeting developers’ needs for indexing various types of NFT data.

Gravity NFT API Models

The main models include the following three API models, including an overall introduction and explanation of some core fields in the APIs, to help developers understand how to obtain data and utilize this information to serve the Dapp services they are building.

Assets API: “Assets” is the most critical data field in NFTs, used to uniquely identify and describe digital assets. Developers can gain a comprehensive understanding by extracting the “Assets” data of NFTs on Gravity blockchain and building relevant applications. The “Assets” object provides a unique identifier for digital assets and data throughout their entire lifecycle, providing a foundation for developers to understand and apply NFTs.

Transactions API: The transaction model represents the complete transaction data of an NFT asset on the blockchain, providing developers with the complete lifecycle transaction information of the NFT. This includes the NFT’s mint, transfer, sale, and other transaction activities, allowing developers to gain a deep understanding of the flow and evolution of the NFT asset within the Gravity ecosystem. NFTScan continuously aggregates information from various blockchain networks’ NFT transaction marketplaces and related transaction contracts. Currently, NFTScan has indexed data for tracking and understanding NFT market dynamics, which also helps developers build NFT-based applications and tools.

Collections API: NFTScan obtains off-chain data related to NFT Collections, such as descriptions, social media, and other basic information. NFTScan acquires this information through the APIs provided by the most popular NFT marketplaces across various blockchain networks. Additionally, the current floor price information is based on the centralized data of order information from NFT marketplaces, which is also accessible via APIs.

  • Get NFTs by account (Retrieve NFTs by wallet address)
  • Get all NFTs by account (Retrieve all NFTs owned by a wallet address, grouped by contract address. If the total number of NFTs owned by the account address exceeds 2000, the returned NFTs will be limited to less than 2000. In this case, developers and users can use paged queries to retrieve all NFTs owned by that account address)
  • Get minted NFTs by account (Retrieve the Minted NFTs of the wallet address)
  • Get NFTs by contract (Retrieve NFTs by contract address, sorted by token_id in ascending order)
  • Get single NFT (Retrieve a single NFT)
  • Get multiple NFTs (Retrieve NFTs from multiple 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 NFT contract addresses with 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 an account address, grouped by contract address)

For example, we use Get NFTs by contract “/v2/assets/{contract_address}” to retrieve NFT details for a contract address, with the contract_address as the path parameter. In this case, we query the Galxe — OAT project.

  • 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 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 queried by a list of transaction hashes)

For example, we use the Get transactions by contract interface “/v2/transactions/{contract_address}” to retrieve NFT transaction records for a contract address. The query parameters can optionally filter for NFT event types (Mint/Transfer/Sale/Burn), separated by ‘;’.

Similarly, here we retrieve the NFT transaction records for Galxe-OAT. Filtered by the Mint event type, the response data includes all key data for the Items Minted in this NFT Collection, such as transaction hash values, From and To addresses, block information, gas consumed, transaction timestamps, and other basic NFT transaction characteristic information.

  • Get an NFT collection (Query details by the contract address of a Collection, including an overview, Items categorized by description, holder distribution, average price, floor price, and other basic summary information)
  • Search NFT collections (This interface returns a list of Collection information by applying search filters in the request body. Collections are sorted by deployment block number in ascending order)
  • Get NFT collections by account (This interface returns a list of projects owned by a given account address. Collections are sorted by floor price from high to low)
  • Get NFT collections by ranking (This interface returns a list of projects with a given ranking field. Collections are sorted by the given ranking field and direction)

For example, we use the Get an NFT collection “/v2/collections/{contract_address}” to retrieve details for the address 0xcbe29f1a6685a90f68552988898baebb59ea4374, named Galxe-OAT:

  • Collection Statistics (This interface provides an overview of analytical statistics for an NFT Collection)
  • Collection Trade Distribution (This interface mainly provides the trade distribution of a project)
  • Collection Trending Statistics (Returns the Trading statistics ranking of a project)
  • Collection Holding Amount Distribution (This interface can return the holding amount distribution information for an NFT project)
  • Collection Holding Period Distribution (Returns the holding period distribution information for an NFT project)
  • Collection Blue Chip Statistics (Overview of Analytical Statistics for Blue Chip Collections)
  • Collection Blue Chip List (The list of Blue Chip Collections involved in the project, refer to NFTScan Blue Chip Collection)
  • Collection Top Holder (Distribution of the top holders for this Collection)

For example, we use the Collection Statistics “/v2/statistics/collection/{contract_address}” to return the analytical statistics overview for an NFT Collection. You can refer to: https://gravity.nftscan.com/0xcbe29f1a6685a90f68552988898baebb59ea4374

  • Account Overview Statistics (This interface returns overview statistics for an account address, refer to NFTScan Overview)
  • Account Holding Distribution (This interface returns the NFT holding distribution statistics for an account address, refer to NFTScan Portfolio)
  • Account Holding NFT Trending (This interface returns the NFT holding amount (or quantity) statistics for an account address, refer to NFTScan Portfolio)

This series of interfaces is typically used to obtain information related to data analysis and statistics on the NFTScan Gravity network, such as Trade Ranking, Mint Amount, etc. These interfaces allow developers or users to query, analyze, and retrieve statistics related to specific data sets or metrics. They can be used for various purposes, including market analysis, trend tracking, investment decisions, and understanding the nature of specific data.

  • Refresh NFT metadata
  • Refresh NFT metadata by contract

The Refresh Metadata interfaces can help developers or users submit background tasks to refresh metadata. After review, these tasks will refresh the metadata of the submitted specific Item or the entire contract.

  • Get the latest block number (Returns the latest block number reached by NFTScan)
  • Get the latest reorganization block numbers (Returns the latest reorganized block numbers)
  • Get NFT amount by account (Returns the number of ERC721 and ERC1155 NFTs owned by account addresses based on the search list in the request body)
  • Get NFT owners by contract (Returns a list of owners for an ERC721 NFT contract address, with NFTs sorted by token_id in ascending order)
  • Get owners by an NFT (Returns a list of owners for an ERC1155 NFT, sorted by account_address in ascending order)

Developers can use different languages to write code that calls the NFTScan API, such as Python, Java, JavaScript, etc. For example, in Python, you can use the requests library to initiate API requests; in JavaScript, you can use axios; in Java, you can use libraries like OkHttp or Retrofit. When writing the code, developers only need to organize the interface parameters, such as contract addresses, API Keys, etc., and call the corresponding NFTScan API, and they can conveniently obtain standardized JSON format data.

For example, we retrieve the NFT details for the contract address 0xcbe29f1a6685a90f68552988898baebb59ea4374, using the Get NFTs by contract with the path “/v2/assets/{contract_address}”. We send an HTTP GET request to access the NFTScan API, using the requests library in Python, and can construct the request like this:

import requests # Define the contract address and API path contract_address = '0xcbe29f1a6685a90f68552988898baebb59ea4374' api_url = f'https://api.nftscan.com/v2/assets/{contract_address}' # Set up the request headers, including the API key headers = { 'Authorization': 'Bearer your_api_key_here', # Replace with your API key 'Content-Type': 'application/json', } # Make the HTTP GET request response = requests.get(api_url, headers=headers) # Check the response status if response.status_code == 200: # Parse the response data nft_data = response.json() print(nft_data) else: print(f'Request failed with status code: {response.status_code}')

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 20+ blockchains including Ethereum, Solana, BNBChain, Arbitrum, Optimism, Mint 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

Join the NFTScan Connect Program

Comments

All Comments

Recommended for you

  • Strategy CEO: Company to Continue Adding More Bitcoin This Year

    On August 11, Strategy CEO Phong Le said in an interview with Fox News that the company will continue to accumulate more Bitcoin within this year.

  • BTC Falls Below $64,000

    Market data shows BTC has fallen below $64,000, currently trading at $63,998, with a 24-hour decline of 1.25%. Market volatility is significant; please exercise risk control.

  • Nvidia reportedly developing trillion-parameter open-source AI model Nemotron 4

    On August 11, Nvidia is developing a new generation of open-source artificial intelligence model, Nemotron 4, with an expected parameter scale of at least 1 trillion, aiming to compete with the world's leading open-source large models. Nvidia hopes to expand the application scope of AI through an open model ecosystem and further drive market demand for its GPU computing power. Nvidia has previously launched the Nemotron series of open-source models, including the Nemotron-4 340B series with 340 billion parameters, primarily used for large language model training data generation, model development, and enterprise AI applications.

  • Crypto-Friendly Bank Erebor Seeks $1.5B Funding with a16z Participation

    On August 11, Erebor Bank, a crypto-friendly bank co-founded by Oculus and Anduril founder Palmer Luckey and Palantir co-founder Joe Lonsdale, is seeking $1.5 billion in funding, with a pre-money valuation target of $8 billion. This valuation is nearly double the $435 million valuation the company had when it completed a $350 million funding round in December 2025. Erebor has already received support from investment institutions such as 8VC and Haun Ventures, and the new funding round is expected to attract participation from Lux Capital, Andreessen Horowitz (a16z), Human Capital, Valor Equity Partners, and SV Angel, among others. As AI infrastructure investment enters a phase of rapid expansion, Erebor is targeting the financing needs of AI companies. AI companies require substantial capital to purchase GPUs, build data centers, and secure energy supplies, while traditional financial institutions are gradually exploring financing models for AI infrastructure assets. However, whether Erebor can maintain rapid growth after the AI and crypto industry cycles cool down remains a key focus for the market. The funding round has not yet been finalized and is expected to be completed within the coming weeks.

  • Russia's Central Bank Adds Bitcoin, Ethereum, and USDT to Publicly Tradable Cryptocurrency List

    On August 11, the Central Bank of Russia included Bitcoin, Ethereum, and Tether (USDT) in the list of cryptocurrencies that can be publicly traded on domestic exchanges.

  • BTC Breaks Above $64,000

    Market data shows BTC has broken through $64,000 and is currently reported at $64,000.33, with a 24-hour decline of 1.53%. Market volatility is high, so please exercise caution and manage risks accordingly.

  • BTC Falls Below $64,000

    Market data shows BTC has fallen below $64,000, currently at $63,999.77, with a 24-hour decline of 1.89%. Market volatility is significant; please exercise risk control.

  • Vitalik Updates Ethereum Roadmap: Privacy, Post-Quantum Scaling, and Native Rollups Become New Priorities

    On August 10, Vitalik Buterin stated that he had compared the 2023 Ethereum roadmap with the current Strawmap. The overall direction still overlaps considerably, but some priorities and technical paths have been clearly adjusted, including raising the priority of quantum safety, downweighting VDF and some EVM improvements, and replacing old designs with solutions such as a unified binary tree, PBT, and new state types. He noted that the most notable change in the current Strawmap is the emergence of several new topics not included in the 2023 roadmap, reflecting a shift in Ethereum's R&D focus. These new priorities include: stronger native privacy support, aggressive scaling in a post-quantum context, specification streamlining for formal verification, Blob and Gas futures, native Rollups, and a more open design space for the future shape of the EVM. Vitalik also emphasized that Ethereum's scaling approach is shifting from 'expanding all activities comprehensively' to 'designing more scalable dedicated mechanisms for specific high-load scenarios,' and he regards STARK proofs and AI-accelerated formal verification as important foundations for the protocol's future. Overall, this update shows that the Ethereum roadmap is evolving toward quantum safety, privacy-first, censorship resistance, high performance, and simpler protocol design.

  • ETH Falls Below $1900

    Market数据显示,ETH has fallen below $1900, currently reported at $1899.19, with a 24-hour decline of 1.28%. The market is highly volatile. Please exercise risk control.

  • Microsoft Plans to Release Next-Gen MAIA 300 AI Chip in September

    On August 10, according to reports, Microsoft plans to release its next-generation MAIA 300 AI chip in September.