keepcalculator

06 Numbers and Powers

What Is an API? A Plain-English Guide

Card No. 06·29336 · Updated · Standard formula, shown below

An API, or application programming interface, is a defined way for one software program to request information or actions from another. Think of it as a menu of permitted requests: a program sends a request in an agreed format, and the API returns a response. This guide explains the term, how APIs work, and what to watch for when using them.

What API means

API stands for application programming interface. It is a standard technical term, not slang or a nonstandard word. The name describes its purpose: it is an interface through which applications can interact. “Application” can mean a website, mobile app, desktop program, or another software service; “programming interface” means the rules and operations software is allowed to use.

The term is used as a noun, usually pronounced by spelling out the letters: “A-P-I.” In a sentence, someone might say, “The weather app uses an API to get the forecast.” In writing, “API” is the usual capitalization. The plural is “APIs.”

The word is an initialism formed from the first letters of “application programming interface.” The phrase belongs to the history of software interfaces, but APIs are not a single technology or one specific product. The term covers many kinds of interfaces, from functions inside a program to network services used across the internet.

How an API works

An API describes what a program can ask for, how to make the request, and what kind of response to expect. A common web API works roughly like this:

  1. A client program sends a request to a defined address, often called an endpoint.
  2. The request may specify an operation, parameters, and credentials that identify or authorize the client.
  3. The service checks the request and performs an allowed action, such as looking up a record.
  4. The service sends back a response, often containing data and a status indicating success or failure.

For example, a travel website might ask a mapping service for a route between two locations. The website sends location details in the format the service documents. The service calculates or retrieves route information and returns data the website can display. The website does not need to know how the mapping service stores its data internally; it needs to follow the API’s rules.

Many web APIs use HTTP, the protocol also used to load web pages. They may use methods such as GET to retrieve data or POST to submit data. Responses often use JSON, a text format that represents data as objects and lists. These are common choices, not requirements for every API.

APIs in everyday software

APIs are often invisible to the person using an app. A shopping site may use one to check stock, a calendar app may connect to a scheduling service, and a phone app may request features provided by the operating system. In each case, the API gives the software a defined way to communicate without exposing every internal detail.

There are also APIs within a single program. A software library can offer functions that other code calls, while an operating system provides interfaces for applications to work with files, windows, or device capabilities. “API” therefore does not automatically mean “a website service.” The surrounding context tells you which kind is meant.

API, user interface, and database

An API is not the same as a user interface. A user interface is designed for people to operate directly, such as buttons and forms on a screen. An API is designed for software to use, even if its output eventually appears in a human-facing app.

Nor is an API the same as a database. A database stores or organizes information; an API may provide a controlled way to request or change some of that information. A service can use a database behind the scenes, but callers usually interact with the API rather than connecting directly to the database. This separation can help a service change its internal implementation without requiring every client to change at the same time.

What API documentation tells you

Documentation is the guide to using a particular API. Before building against one, look for details such as:

  • Available operations: what requests the API supports and what each one does.
  • Request format: required fields, optional parameters, data types, and endpoint addresses.
  • Response format: what a successful result looks like and how errors are represented.
  • Authentication: whether a key, token, or other credential is required and how it should be supplied.
  • Limits and availability: whether requests are capped, and what happens if a service is unavailable.
  • Versioning and changes: how updates are announced and whether older versions will continue to work.

Do not assume that two APIs with similar purposes work alike. Their endpoint names, data formats, permissions, and rules can differ. Follow the documentation for the specific API and environment you are using.

Access, costs, and common problems

Some APIs are openly documented for general use; others require an account, approval, or credentials. Access terms vary. An API may be free within a stated allowance, charge for certain usage, or be available only to a particular organization. Check the provider’s current documentation and terms rather than assuming that “API” means free or public.

Common problems include a misspelled endpoint, missing required data, invalid credentials, requesting an operation the account is not allowed to use, or exceeding a request limit. Network interruptions and service outages can also prevent a response. Useful clues include the HTTP status code, the error message, and any request identifier supplied by the service. Avoid putting secret keys in public code or sharing them in screenshots; credentials can grant access to an account or service.

Another frequent misconception is that an API automatically shares all of a service’s data. It does not. The API provider defines which operations exist and what information each caller may access. Authentication and permissions can restrict access, and an API can change or be discontinued.

Frequently Asked Questions

What does API stand for?
API stands for application programming interface: a defined set of rules that lets software interact with a program or service.

Is an API a website?
Not necessarily. A web API is accessed over a network, but APIs can also be interfaces within a program, library, or operating system.

Do I need to know how to code to use an API?
Using an API directly usually involves programming or an API tool. You can still understand the idea without coding; everyday apps often use APIs behind the scenes.

Is an API the same as a database?
No. A database stores information. An API defines how software can request or change information or carry out other operations, sometimes using a database internally.

Are APIs free?
Some are available at no charge, while others require payment, approval, or compliance with usage limits. Check the particular provider’s current terms.

In brief

An API is a software-facing interface: a documented way to make requests and receive responses. The term is a standard computing initialism, and its meaning depends on the context—an API may connect web services, expose a library’s functions, or let an app use operating-system features. Knowing the API’s documentation, access rules, and limits is essential to using it correctly.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →