What is API?

An API (Application Programming Interface) is a set of rules and definitions that lets one piece of software talk to another. It specifies the requests a client can make, the data formats to use, and the responses to expect — hiding the internal implementation behind a stable contract.

On the web, "API" usually means an HTTP API that returns data (often JSON) over endpoints. APIs power everything from mobile apps to integrations between services.

Key points

  • Defines a contract: available operations, inputs, and outputs.
  • Hides internal implementation behind a stable interface.
  • Web APIs typically use HTTP and exchange JSON.
  • Common styles include REST, GraphQL, and gRPC.

Example

GET https://api.example.com/users/1
→ { "id": 1, "name": "Ada" }

Common uses

  • Connecting a frontend to a backend
  • Integrating third-party services (payments, maps, auth)
  • Exposing data to mobile and partner apps
  • Automating workflows between systems

More terms