Hello friends, let’s talk about blockchain API today. To know what blockchain API is, we have to understand what an “API” is at first. We all heard this term “API” many times, but very few people actually know what API is and what its job in modern computing and information technology.
So what is an “API?” API is simply the abbreviation of “application programming interface.” It is a set of rules a software or application can use to talk to another software, it's a contact between two software or two applications so that they can interact with each other in the designated way. In this article, I’ll talk about the basics of API, where and how to use the API, what are the benefits of API and ultimately what’s the role of API in crypto and blockchain.
How an API works: Before explaining about it, let me ask a few questions first. Have you ever booked a flight ticket using an online platform? Have you ever transferred money from an online app account to a bank account? Do you order food using an online platform or mobile app? Did you ever wonder how you ordered something from an app and the order actually delivered by another business or shop, like you ordered something in Amazon, but the product came from another business? If you have done any of this that means you already have an experience of API, because, behind the scene, APIs are used to do all these operations. So, what is an API? There are two entities involved, one is the consumer and another is the service provider. So API consumer calls the service provider and provides certain inputs, and service provider reads the input, tries to understand it and process it and apply some business logic and return the response to the API consumer. And API consumer will pay for utilizing the service from the service provider, if it is a private service provider. If it's a public, then it will be for free.
Let's see an example here. A group of friends went to a restaurant to have some food. They called the waiter and asked for a menu card, and the waiter handed a menu card over. They looked at the menu trying to find out a dish for them, and they decided to have steak and salad. The waiter then goes to the kitchen and asks the chef to prepare three plates of steak and salad the customer. In the kitchen, one of the chefs starts preparing the food and once it’s done, he calls the waiter. The waiter then comes back to the kitchen, take the food, and serves to the customer.
So now we can compare this to the API. The group of friends who came to the restaurant to have food, we can call them the API consumer. They wanted something, and they were ready to pay for that without bothering who is going to prepare it. They came to the restaurant order it and they had the food and paid the bill and left the restaurant. We can compare the menu card to API documentation which is basically a list of dishes. what is the money they have the pay for each dish we can compare this with the AP documentation and the service provider, aka. the waiter, is like a black box who don't bother which chef is going to prepare the the recipe, what are the materials are going to be used, etc. See, we can easily compare this example for what is API and how it works.
I'm going to give you another example here. I wanted to book a flight ticket from London to New York, so I went to the website, searched for the fights and it loaded a lots of flights which were available for that route. All those flights were from different Airlines companies. So that means all those different airlines have exposed their APIs to that online site, which is basically an aggregator. That's why this website was able to look at all those APIs and loaded the flight details based on the result delivered by those APIs. That’s why only in a single online platform, we are able to see different types of flights and able to choose the best one as per our budget and convenience. Otherwise we will have to look at all those airlines sites individually, find a flight for exactly that route, and then compare their prices and other facilities to select the most suitable one, which is really a challenge. So this is one of the most significant advantages of using APIs.
So, what are the benefits of API? In short, when I use APIs in my product, my sales grows. How’s that possible? Because in a single platform, I am able to provide maximum value to the end user. For example, a customer comes to my website to book the flight ticket, then at the same time, I can also offer our hotel booking, train ticket booking, etc. to the same customer. So that means my conversion rate increases and also it supports automation, and I can also easily integrate with other softwares. I don't have to write things from the scratch, actually I can just integrate and start using the APIs of other companies/services and I can also reuse them in my other products too. For instance, if you have a site and now you want to have two-factor authentication on it, you I don't have to code this feature from the scratch if anyone provides the service already. You can pay for it and start using their API (and reuse in your other sites too) and your business grows. So ultimately the revenue grows because of using API.
Blockchain API: Similarly, the blockchain API revolutionising the whole crypto industry right now. Without blockchain API, none of the bitcoin wallet, crypto marketplace, crypto trading platform wouldn’t even exist. Because coding the whole application from scratch without the help of blockchain API, is simply a gigantic task in itself.