Developers can quickly create applications based on NFTScan's Bitcoin NFT API, such as an NFT Marketplace.
Bitcoin NFT, also known as the Bitcoin Ordinals protocol, is a method of creating digital assets on the BTC blockchain. In January 2023, software engineer Casey Rodarmor officially released the Ordinals NFT protocol on the Bitcoin blockchain, allowing users to create unique NFTs on the smallest unit of Bitcoin, the Satoshi (SAT). The main purpose is to assign a unique identity to each satoshi, enabling users to track them using an ordinal numbers system.
Using the Ord software, this protocol adds data to these sats and allows users to track them based on the ordinal numbers system. In other words, the Ordinals protocol represents Bitcoin's smallest unit, sats, in the form of NFTs, giving them significant trading and collectible value. In a way, it has created a new dimension of value for the smallest unit of Bitcoin, serving as a form of scaling for the cryptocurrency. Since the creation of the Ordinals protocol, users have been able to engrave information on the Bitcoin blockchain, including text, images, audio, and video, thereby creating NFTs on the BTC chain.
Since the release of Ordinals, an increasing number of people have started minting Bitcoin NFTs. The ecosystem is still in its early stages, but the popularity and quantity are growing rapidly. According to data from Bitcoin NFTScan as of July 27th, a total of 19.79 million NFT assets have been engraved on the Bitcoin network, with 605,000 Bitcoin wallet addresses holding NFT assets. NFTScan has currently indexed and recorded 1,534 NFT Collections on the Bitcoin network.
Developers can quickly create related applications, such as NFT marketplaces, based on NFTScan's Bitcoin NFT API.
Bitcoin NFTScan: https://btc.nftscan.com/
Join us in showcasing the cryptocurrency revolution, one newsletter at a time. Subscribe now to get daily news and market updates right to your inbox, along with our millions of other subscribers (that’s right, millions love us!) — what are you waiting for?
How to access the NFTScan NFT API:
- Create an NFTScan Developer Account Before using the NFTScan API, you first need to visit the developer website and create an account. Go to the official NFTScan website (https://developer.nftscan.com/user/signup) and click the "Sign Up" button for NFTScan API registration.
After logging in, navigate to your Dashboard where you can find your unique API KEY, which you should copy. Access the API documentation and input your API KEY in the designated location as instructed in the documentation. With the guidance provided in the documentation, you can begin using the API service. Within the API documentation, developers can explore various interface modes to choose the most suitable one according to their specific needs.
In the Dashboard, developers can also view statistical data about their API usage, helping them keep track of their historical usage. Moreover, NFTScan provides each registered developer with 1M CU (Compute Units) of API call service, which can be used for requesting all NFT API interfaces, and the CU never expires, allowing developers to use it until it's fully consumed!
Viewing the Bitcoin API Documentation After successfully registering for a developer account and obtaining an API Key, you need to access the NFTScan API documentation. The API documentation contains all available API endpoints and parameters, along with detailed instructions on how to construct 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. The NFTScan API service is dedicated to helping developers enhance their experience in obtaining and analyzing NFT data.
Currently, NFTScan has the largest and most comprehensive NFT Collection library across 15 blockchains, including Ethereum, Solana, BNBChain, Bitcoin, Polygon, Aptos, Linea, Avalanche, Arbitrum, Optimism, Fantom, Moonbeam, PlatON, Cronos, and Gnosis. It covers a wide range of NFT data with abundant variety, offering a complete set of interfaces to retrieve ERC721 and ERC1155 assets, transaction details, project information, market statistics, and more. NFTScan now supports over 50 public interfaces for EVM-compatible chains, as well as a batch of similar interfaces for Solana, Aptos, and Bitcoin, significantly fulfilling the diverse needs of developers in indexing various types of NFT data.
The core data model in NFTScan's BTC API is Assets, representing each unique digital project. It mainly includes fields such as inscription ID, inscription number, collection name, transaction hash, block number, mint price, owner, and other comprehensive data.
Users can use the Transactions API to retrieve complete transaction records, action logs, and current ownership information of any NFT asset, enabling comprehensive tracking of NFTs and providing reliable data sources for developers to analyze NFT transaction characteristics, price trends, and circulation paths.
NFTScan continuously tracks newly emerging NFT projects and rapidly acquires their off-chain data information publicly available on various trading platforms. This information is then opened to developers through the Collections API, enabling developers to obtain essential information about projects' off-chain descriptions, holders, and transaction activities without having to aggregate data from different platforms manually. This integration can be easily done by accessing the Collections API for the application.
Query related API:
By entering the name of the NFT Collection and clicking "Try it," the API will return detailed information about all NFT assets under that collection. The data is paginated by default and can be controlled using the limit and cursor parameters to specify the number of items per page and navigate between pages. Once you have obtained all the NFT data, it can be used for display, analysis, or other application scenarios. This API allows for the convenient batch retrieval of all NFT data within a specific NFT project, providing powerful support for building NFT applications. The displayed data is as follows:
The query parameter field available for selection includes event_type: Mint/Transfer, using ';' to separate multiple events.
Building relevant API requests:
Once developers have found the required BTC API endpoints and parameters in the NFTScan API documentation, they can write API request code using their chosen programming language. Accessing NFTScan's API documentation will provide the following information:
In the chosen programming language, developers can use HTTP libraries or API client libraries to send HTTP requests and include the required parameters and header information in the request. For example, Python can use the requests library, while JavaScript can use axios or fetch libraries.
The general process of writing API request code is as follows:
- Import the necessary HTTP library or API client library.
- Build the API request URL, including the endpoint and parameters (if any).
- Set the request method, request headers (if authentication is required), and request body (if it is a POST or PUT request).
- Send the API request and receive the server's response.
- Parse the response data and handle it accordingly.
When writing API request code, be sure to refer to the NFTScan API documentation to ensure correct usage of API endpoints, parameters, and authentication methods to successfully interact with NFTScan and obtain the required data.
Use an HTTP GET request to access NFTScan's API endpoint and pass the required parameters. For instance, using Python's requests library, you can construct the request as follows:
In the above code, we first constructed the complete API request URL and then used the requests.get() method to send a GET request and retrieve the returned NFT data from the response (assuming the NFT data is returned in JSON format). Developers can further process and analyze the obtained NFT data according to their needs.
Conclusion
Not limited to the Bitcoin NFT API, developers can flexibly access the rich NFT data resources provided by NFTScan based on their application requirements. NFTScan's NFT API offers comprehensive, real-time, and reliable core NFT data, allowing developers to quickly obtain the desired NFT data, greatly simplifying and accelerating the development process. Developers can freely combine these APIs according to their business scenarios, building NFT applications or solutions that meet their specific needs.
NFTScan continues to optimize the API and introduce more advanced features to further enhance developers' work efficiency and reduce development costs. It provides professional and reliable NFT fundamental data support, allowing developers to focus more on the innovation of their applications.
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