What Is an API? How Do Apps Talk to Each Other?
When you press “Sign in with Google” on a site, or open a weather app, an API is working in the background.
An API (application programming interface) is a set of rules that defines how one piece of software communicates with another. Users never see APIs, but almost every modern app depends on them.
An analogy: the waiter
In a restaurant, you do not walk into the kitchen yourself. You tell the waiter what you want from the menu, the waiter takes the order to the kitchen and brings back your food. An API is like that waiter: one app sends a request following set rules; the other system processes it and sends back a response. You do not need to know what happens inside the kitchen.
Everyday examples
- A weather app getting data from a weather service
- An online shop connecting to a payment provider
- A map embedded in a website
- Sign-in buttons such as “Sign in with Google”
- Showing a parcel’s status from its tracking number
Requests and responses
Most web APIs work over HTTP. An app sends a request to a specific address, such as “give me the weather for London”. The server usually replies in a format called JSON, which both people and computers can read. Request types are defined too: getting data (GET), sending new data (POST), updating and deleting.
API keys
Many APIs require an API key to know who is sending requests. The key allows usage to be limited and paid services to be billed. If a key is stolen, someone else can send requests in your name.
Why it matters
Thanks to APIs, no app has to build everything from scratch. Services such as payments, maps, sending email or AI can be used through specialist companies’ APIs. That speeds up software development.
Frequently asked questions
Is using an API paid?
It depends on the service. Many APIs are free up to a certain amount of use and then charge per request.
Can you use APIs without coding?
Some automation tools let you connect different apps’ APIs without writing code.