API stands for Application Programming Interface. It is a set of routines, protocols, and tools for building software applications. APIs specify how software components should interact, such as what data to use and what actions should be taken.
In simple terms, an API is an acting middleman between you and the provider you are making a request to. The API takes your request to the provider and brings the response back to you.
An accurate real-life analogy of an API is the waiter at a restaurant. When dining out, you rarely place your order directly with the kitchen (the provider). Rather, you sit down at your table and check the menu of available food options (available functionality on a website). The order (your request) is communicated to the waiter (the API). After bringing your order to the kitchen, the waiter returns with a hot meal (the response to your request) to your table.
Usage of APIs is a practice heavily promoted by developers today. This type of interface allows for a substantially quicker development process. By implementation of APIs coding for complex processes is often reusable, and does not need to be written from scratch. This shortcut and simplification of the coding process is widely considered the number one cause of today’s rapid advancements in app development.
Examples of APIs in practice
- Rich Weather Snippet: You type in “weather + your city” in the Google search bar, the top result is a rich snippet featuring current and future weather stats. Google does not collect weather data, rather information is sourced from a third party weather API, and brought back to you in snippet form with Google formatting.
- e-Commerce Checkout: You visit your favorite eCommerce site, pick out an item, and decide to make a purchase. You are presented with a list of payment options and choose PayPal, the site sends a request with essential order details to the PayPal API, and returns to you with a user verification pop-up prompting you to confirm the order.
- Login with Facebook: Logging into a website is easier today than ever before, and rarely requires the creation of a new profile. Most sites offer the option to sign in using Facebook, if selected an API is used to send a user authentication request to Facebook. If signed into Facebook, your Facebook profile is used to authenticate you.
Tags #Blockchain #Crypto Glossary