If you’re already a Hitchhiker, log in to access this content.
What is an API?| Hitchhikers Platform
What You’ll Learn
In this section, you will learn:
- What is an API?
- How do we commonly use APIs
API stands for Application Programming Interface. To put it simply, an API is an interface for two pieces of software to communicate. This communication consists of a series of “requests” (also referred to as “calls”) and subsequent “responses”.
Think of an API as a waiter in a restaurant.
A patron at the restaurant sits down in front of a menu of choices to order from (system 1) and the kitchen (system 2) will prepare the menu item. Much like an API, the waiter is the critical link between these two systems - they deliver the patron’s order (request) to the kitchen, and then deliver the patron’s food (response) back to them.
Real Life Examples!
APIs are at play in just about every major website you can think of. They all use and provide ways for other websites and tools to consume each other’s data and extend their services.
Let’s take a look of how it may look in everyday life:
You’re searching for a hotel room from an online travel booking site. Using the site’s online form, you select the city you want to stay in, check-in and checkout dates, number of guests, and number of rooms. Then you click “search”.
As you may know, the travel site aggregates information from many different hotels. When you click “search”, the site then interacts with (or “calls”) each hotel’s API, which delivers results for available rooms that meet your criteria. This can all happen within seconds because of an API, which acts like a messenger that runs back and forth between applications, databases, and devices.