Tech for non-tech 27: What are APIs? Easy explanation with examples

Mariam Grigoryan
3 min readApr 23, 2023

--

APIs, or Application Programming Interfaces, are a set of rules and protocols that allow different software applications to communicate with each other. APIs define how software components should interact and exchange data with each other. Think of an API as a plug that connects different pieces of technology together, like a power cord that plugs into the wall and connects to your computer or phone charger. The API provides a standardized way for software programs to connect and exchange information, just like a power cord provides a standardized way for electronic devices to connect to a power source.

You might have encountered a sign up option with the social media platforms. It means that the developer has used the API, for example, from Facebook to connect to the sign up page.

Here are some other examples of APIs:

  1. Social media APIs: Social media platforms like Facebook and Twitter provide APIs that allow developers to build apps that interact with their platforms. For example, an app could use the Facebook API to access a user’s profile information or to post a status update.
  2. Weather APIs: Weather APIs provide real-time information about the weather conditions for a particular location. Developers can use this information to build apps that provide weather forecasts, alerts, and other weather-related information.
  3. Payment APIs: Payment APIs allow businesses to accept online payments through their websites or mobile apps. Payment APIs can be used to process credit card payments, bank transfers, and other forms of electronic payments.
  4. Maps APIs: Maps APIs provide developers with access to mapping data and tools that they can use to build custom maps and location-based services. For example, an app could use the Google Maps API to display the location of nearby restaurants or stores.

In this way, APIs allow different software programs to interact and share information with each other, making it possible for developers to build new apps and services by leveraging the functionality of existing software components.

One of the most common examples is thinking of APIs like a waiter in a restaurant. When you go to a restaurant, you don’t go into the kitchen and cook your own food. Instead, you tell the waiter what you want to eat, and they take your order to the kitchen. The kitchen then prepares your food and gives it to the waiter, who brings it back to your table.

In the same way, APIs act as a waiter between different software programs. When one program needs to use the functionality of another program, it sends a request to the API, which acts like the waiter and takes the request to the other program. The other program then processes the request and sends a response back to the API, which acts like the waiter again and brings the response back to the first program.

There are several reasons why software developers use APIs:

  1. Time-saving: APIs provide a pre-built functionality that can be easily integrated into a new software application. By using APIs, developers can save time and effort by not having to build the functionality from scratch.
  2. Scalability: APIs make it easier to scale a software application. By using APIs, developers can add new features and functionality to their application without having to worry about how the underlying system works.
  3. Cost-effective: APIs can be more cost-effective than building the functionality from scratch. By using APIs, developers can save on development costs, as well as maintenance and support costs.
  4. Integration: APIs make it easier to integrate different software applications. By using APIs, developers can build software applications that can communicate with each other, share data, and work together seamlessly.
  5. Innovation: APIs allow developers to build new and innovative applications by leveraging the functionality of existing software components. By using APIs, developers can focus on building the parts of the application that are unique to their project, rather than spending time on developing basic functionalities.

In summery, APIs are like a bridge between different software programs, allowing them to communicate and exchange information. They make it possible for developers to build new programs and services by leveraging the functionality of existing software components.

--

--