What is an API?

An API (Application Programming Interface) is a set of rules that allows different software applications to communicate with each other. Learn what APIs are, how they work, and why they matter.

Definition
Application Programming Interface

An API is a set of rules and protocols that allows one software application to communicate with another. It defines the methods and data formats that applications use to request and exchange information. APIs act as intermediaries — like a waiter taking your order to the kitchen and bringing food back — enabling different systems to work together without exposing their internal code.

How an API Works

A typical API interaction follows this pattern: 1. Client sends a Request — e.g., GET https://api.weather.com/today?city=Seoul 2. API receives the request and validates it 3. Server processes the request and retrieves data 4. API returns a Response — usually in JSON format This is called a REST API, the most common type on the web today.

Types of APIs

• REST API — Uses HTTP methods (GET, POST, PUT, DELETE); returns JSON • GraphQL API — Client specifies exactly what data it needs; reduces over-fetching • SOAP API — XML-based, older protocol; still used in enterprise systems • WebSocket API — Enables real-time two-way communication (chat, live data) • SDK/Library API — Functions provided by a programming library (e.g., localStorage.getItem())

Real-World API Examples

• Weather apps fetch forecasts from a weather data API • "Sign in with Google" uses the Google OAuth API • Payment processing on e-commerce sites uses Stripe or PayPal APIs • Maps embedded in apps use the Google Maps or Mapbox API • Social media sharing buttons call Twitter/Facebook APIs • Your JSON formatter tool calls no external APIs — it processes data locally

Try it yourself

Format API Responses

About APIs

The concept of an API predates the web — operating systems have provided APIs for applications to use system resources since the 1960s. Today, web APIs have become the foundation of the software economy. Every app you use — from ride-sharing to food delivery — connects dozens of third-party APIs to function.

FAQ

What does API stand for?
API stands for Application Programming Interface.
What is a REST API?
REST (Representational State Transfer) is an architectural style for designing APIs that use standard HTTP methods (GET, POST, PUT, DELETE) and return data in formats like JSON. It is the most widely used API design pattern on the web.
What is an API key?
An API key is a unique string used to authenticate requests to an API. It identifies the application or user making the request and may enforce rate limits or access controls. Keep API keys private — they are like passwords.

Related Tools