Every time an app shows you the weather, processes a payment or logs you in with Google, an API did the work. API stands for Application Programming Interface: a defined way for one piece of software to ask another to do something and get a structured answer back.
The restaurant analogy that actually helps
Think of a restaurant. You do not walk into the kitchen; you read a menu, place an order in a defined format, and the kitchen returns a dish. An API is the menu: it lists what you can request, what format to use, and what you will get back. The kitchen (the server) can be rebuilt completely and your ordering experience never changes.
How a REST API call works
Most modern web APIs follow REST conventions over HTTP. You send a request to an endpoint (a URL) with a method: GET to read, POST to create, PUT/PATCH to update, DELETE to remove. The server responds with a status code and usually JSON data.…