Exploring the Web3 API Economy Posted in Strategy J Simpson February 15, 2022 Blockchain has been blowing up for the past several years. Worldwide spending on blockchain is projected to reach $11.7 billion by 2022. And some analysts predict it will rise as high as $20 billion by 2024. Anytime a new sector emerges in technology, many new tools, products, and resources are released in its wake. Seeing as how APIs are essentially the nervous system of the connected economy, it’s no surprise that the rise of blockchain/Web3 would see a corresponding outburst in the API sector. Incorporating APIs into blockchain’s decentralized format has some challenges, though. In the past, blockchain developers had to rely on third-party middleware nodes, known as oracles. Now, developers are starting to create native solutions for incorporating APIs into blockchain technology without relying on middleware. Meet API3 Blockchain technology relies on real-time data to function, known as “off-chain data” in the blockchain industry. These can either be “inbound oracles” or “outbound oracles.” But now, API and blockchain developers have been creating new solutions that cut out the need for a middle man. The API3 initiative‘s solution adds an abstraction layer between the API and the blockchain, which API3 co-founder Heikki Vänttinen calls a first-party oracle approach. This creates a layer of constancy and trustlessness that is essential for the blockchain. This connectivity makes it possible for the blockchain to interact with real-time data like sports scores or financial data; send or receive SMS; collect map data, and more. Some speculate this could be a trillion-dollar opportunity. To this end, API3 relies on Airnode, their first-party oracle approach for connecting APIs to the blockchain. So far, many API-first businesses from the agricultural sector, biotechnology, open communications, banking, insurance, and supply-chain management have all joined the API3 Alliance. If you’re an API provider, you can apply here to join the API Alliance. Airnode isn’t the only API gateway for blockchain out there, of course. Other API gateways include: Kaleido 0xcert Chaingateway BlockVigil Band Protocol The API3 Initiative isn’t the only attempt to create a standard between APIs and the blockchain. In December 2020 data oracle Band Protocol became the first blockchain firm to join the OpenAPI Initiative. They joined the ranks of other prestigious tech giants like Google, Microsoft, and eBay working towards creating a common ground between APIs and the blockchain. This is an important first step in creating a workable collaboration between centralized and decentralized data. APIs and Smart Contracts Another of the main challenges in integrating APIs and the blockchain is that it violates some of the principles of blockchain technology, particularly smart contracts. By definition, a smart contract depends upon an asset being exactly the same every time. Luckily, there are some workarounds for this. The main solution is called an “oracle pattern,” where the oracle acts as a buffer between the API and smart contract. This also means this problem is common enough that pre-made solutions are available. Provable.xyz‘s query feature is a ready-made solution for the oracle pattern. It lets you receive a response to any callback method. Using pre-made solutions comes with some drawbacks, too, unfortunately. API data might be stored on the blockchain, for one thing, which raises some security concerns. Being reliant on third-party providers means you’re susceptible to their downtime and security breaches. It also adds an extra expense to your project. Blockchain APIs Of course, some APIs are explicitly built for the blockchain. Others are just particularly effective for decentralized tasks, such as processing cryptocurrency transactions. These APIs make it so you don’t have to reinvent the wheel every time you want to incorporate blockchain technology into one of your projects. Here are a few existing blockchain APIs that are especially useful NOWNodes Interacting with cryptocurrency data is one of the most common API tasks. It’s also one of the more complicated. The real-time data needs to be secure, reliable, and updated continually. NOWNodes offers support for 47 different crypto networks at the time of this writing. It also supports block explorers, so you can research and keep track of the most popular crypto networks. NOWNodes offers a free tier with up to 20,000 requests per day. Coinbase Node.js is particularly well-loved among developers, thanks to its small size, cross-platform availability, and easy customizability. Node.js developers often need to interact with cryptocurrencies, too, though. Coinbase offers one of the most popular blockchain APIs, especially for those working with Node.js. Coinbase supports the most popular cryptocurrencies like Bitcoin, Ethereum, or Litecoin. It’s particularly well-loved for its Ethereum support alone. The Coinbase API supports other actions as well, though. You can fetch and track prices, store crypto, buy, sell, and trade coins, and receive notifications for every transaction. Coinbase is free to use for up to 10,000 queries an hour. Bitcore While there are now thousands of cryptocurrencies out there, Bitcoin remains one of the most popular. If you’re creating an app or product that uses Bitcoin in any regard, you will do well to check out Bitcore. Bitcore was created by the popular Bitcoin payment processor Bitpay. It’s more than just an API — it’s a complete toolset for working with Bitcoin. It has everything from a node and wallet to a chain explorer. Bitcore has a full node and runs on a completely P2P network, which means it’s lightning-quick and completely scalable. It’s also completely free to use and open-source, so there are few reasons not to try it out if you’re looking for a premade Bitcoin API. Blockchain API If you’re looking for a solution to simply add blockchain payment processing via API, check out Blockchain API. It’s one of the longest-running and most established cryptocurrency APIs you can find, with a thriving community of over 25,000 developers. The Blockchain API has several useful APIs for working with the blockchain, including a wallet, payment processing, blockchain exploration, and sending queries via text. This data is then returned via a simple JSON format. Web3.JS Ethereum API Like Bitcore, the Web3.js Ethereum API is the primary API for working with Ethereum. It features full wallet support, generates wrappers for smart contracts, and supports both ERC20 and ERC721 tokens. Web3.JS Ethereum API is free to use, but you’ll have to run your own node to use it. Nomics API Some of the blockchain APIs we’ve mentioned include historical price tracking, but what should you do if you’re looking for something more robust? The Nomics API is a trade data aggregator that processes raw trade data and crafts its own tickers. This ensures that the trading data you’re getting is clean and trustworthy. Nomics draws on data from 13 individual exchanges. It’s also free to use! APIs For Blockchain: Final Thoughts Blockchain and decentralized technology aren’t going anywhere. If anything, in today’s disrupted, asynchronous world of remote collaboration and work from home, it’s only going to keep becoming more important. The same thing goes for APIs. Application programming interfaces allow our tools to talk to one another, sharing important information in real-time, which is essential for everything from generating analytics to processing payments. Rest assured, we will see much more interplay between the blockchain and APIs in the coming years. Let some of the existing tools, especially API3, serve as templates and inspiration for your own blockchain and API projects!