Repaso
EspaƱol
Backend & APIsCoreAPI-31

What is an API?

Options

  1. A programming language that is used to build servers
  2. A defined way for one program to request data or actions from another (Correct option)
  3. A type of database that stores the request logs of an app
  4. A visual design tool that is used to draw interfaces

Answer

A defined way for one program to request data or actions from another, e.g. over HTTP

Why

API means Application Programming Interface: the 'menu' a system offers to other programs. It lists what you can ask for and in what format, and hides how it works inside.

A web API is reached over HTTP. Example: a weather app sends GET https://api.weather.com/today?city=Lima and receives JSON with the forecast.

Remember

API = a contract for programs to talk to each other.

Key terms

Practice this question in Repaso