Have you ever used a banking app to transfer money? Have you ordered food online or checked the weather on your phone?
Have you wondered how these applications get information from other computers so quickly?
One important technology that makes this possible is called an API.
In this module, you will discover what APIs are, how they work and why they are important in the world of technology.
API stands for Application Programming Interface.
That name may sound difficult, but the idea is actually simple.
An API is like a messenger that helps two computer applications communicate with each other.
Imagine that you have a school application that needs to collect examination results from another school system.
Instead of manually copying all the results, the two systems can use an API to exchange the information.
Imagine visiting a restaurant in Ibadan.
You sit down and tell the waiter that you want rice and chicken. The waiter takes your order to the kitchen.
The kitchen prepares your food, and the waiter brings it back to your table.
The waiter acts as the messenger between you and the kitchen.
| Restaurant | Computer Technology |
|---|---|
| You, the customer | The application requesting information |
| The waiter | The API |
| The kitchen | The server |
| Your food | The information returned |
Without the waiter, you would have to enter the kitchen yourself to request your food.
In the same way, an API makes communication between applications easier and more organised.
Before understanding how APIs exchange data, we need to know what data means.
Data is information that computers can store, process and use.
Examples of data include:
Computers use data to perform different activities. For example, a school management system uses student names and examination scores to prepare result sheets.
Data exchange simply means sending information from one computer system to another.
Let's use a Nigerian online shopping platform as an example.
Imagine that you want to buy a pair of shoes from an online store.
Different applications exchange information to complete your order. APIs can make this communication possible.
APIs are used in many services that people use every day. You may have already used an API without knowing it!
When you check your account balance or make a transfer, your banking application communicates with banking services to retrieve information and process your request.
A weather application can request information from a weather service and display the temperature, rainfall and weather conditions in your location.
Shopping websites can use APIs to check product prices, process payments and arrange deliveries.
A school application can exchange information about students, examination results and attendance with other authorised systems.
Some applications use map APIs to display locations, calculate distances and provide directions.
APIs are important because they help:
Imagine that your school wants to create an application where students can check their examination results.
The school already has another computer system that stores examination scores.
Answer these questions:
Think carefully: Your task is to explain how the two systems can exchange information.
In this module, you have learned that:
Test what you have learned by answering these questions.
What does API stand for?
What is the main purpose of an API?
In the restaurant example, what represents the API?
Which of the following is an example of data?
What does data exchange mean?
Which business can use APIs to process customer payments?
You have completed Module 1 of Introduction to APIs for Data. You now understand the basic idea behind APIs and why they are important in today's digital world.
In Module 2, you will learn how APIs work, including requests, responses and endpoints.