What is an API? Definition, examples and how it works
What an API is in plain words, what happens during an API call, the main types, and the tools to test or use one without guessing the bill.
An API (Application Programming Interface) is a set of rules that lets two pieces of software talk to each other. One program sends a request in an agreed format, the other sends back a response, and neither needs to know how the other works inside.
Every time a site shows a map, takes a card payment or logs you in with Google, an API is doing the work in the background. This page explains the idea without jargon, walks through a real request, compares REST, SOAP and GraphQL, and shows the tools people use to test an API or connect one without code, with what they really cost.
The ranking is editorial: a sponsored spot is always labeled on its card, and no affiliate link changes a score.
How do APIs work? A request, an endpoint and a response
Think of an API as a counter with a menu. You don't walk into the kitchen; you read the menu, place an order in the expected format, and get a plate back. In software terms, the program that asks is the client, the program that answers is the server, and the menu is the API's documentation.
A web API call has four parts. The endpoint is the address you call, such as https://api.example.com/orders/42. The method says what you want to do: GET to read, POST to create, PUT or PATCH to change, DELETE to remove. The headers carry extra information, most often an API key or a token that proves who you are. The body, when there is one, holds the data you send.
The server checks the request, does the work and replies with two things: an HTTP status code (200 means it worked, 401 that you aren't authorized, 404 that the resource doesn't exist, 429 that you sent too many requests) and the data, usually in JSON, sometimes in XML.
The idea is older than the web. Programmers were sharing reusable routines between programs in the 1940s, and the term itself appeared in the 1960s and 70s. The web API as we know it took shape in 2000, when Roy Fielding described REST in his doctoral dissertation. Today the same idea powers AI: a model sold through an API (see the best LLM APIs) and an AI agent that calls other APIs as tools.
Types of API: public, partner, private, composite, and the REST, SOAP and GraphQL styles
APIs are sorted in two ways: who is allowed to use them, and how they exchange messages.
By access. A public (or open) API is available to any developer who signs up, like a weather API or the Google Maps API. A partner API is shared with selected companies under a contract, such as a carrier's shipping API for a retailer. A private (internal) API connects a company's own systems, for example accounting and HR. A composite API bundles several calls into one, which saves round trips when a screen needs data from many places.
By style. REST is the dominant style for web APIs: data is exposed as resources at URLs and handled with HTTP methods. SOAP is an older protocol built on XML messages with strict rules, still common in banking, payments and identity systems. GraphQL is a query language that lets the client ask for exactly the fields it needs in one request, no more. RPC (and its modern form gRPC) calls a function on a remote server as if it were local. WebSocket APIs keep a connection open so both sides can send messages at any time, which suits chat, live prices or notifications.
An API example: what happens when a shop checks a delivery date
A customer types a postcode on a product page and sees "Delivered Thursday". Here is the API work behind that line.
The shop's server sends a GET request to the carrier's endpoint with the postcode and the parcel weight as parameters, plus its API key in a header. The carrier's server checks the key, looks up the route and answers with status 200 and a short JSON object: the service name, the estimated date and the price. The shop reads two fields and prints them. The customer never sees the call.
Three things can go wrong, and every integration has to plan for them. The key can be invalid or expired (401). The shop can exceed its quota, and the carrier answers 429 until the window resets, which is why APIs publish rate limits. And the carrier can change its response format: that's why serious APIs version their endpoints (/v1/, /v2/) and announce retirements in advance.
Security basics. An API key identifies the calling application and must stay on the server, never in front-end code. OAuth lets a user grant access to their data without sharing a password, which is what happens when you "Sign in with Google". An API gateway is software that sits in front of a company's APIs, routes each request to the right service, checks keys, applies rate limits and logs every call in one place. Response time matters too: our page on latency explains where the milliseconds go.
When you need an API, and when you don't
An API is the right tool for…
- Showing live data from another service: maps, weather, shipping rates
- Taking payments without storing card numbers yourself
- Syncing a CRM, a billing tool and a support desk
- Letting customers or partners build on your product
- Feeding an AI model or an agent with your own data
You may not need one for…
- A one-off export: a CSV file is simpler
- Two tools that already have a native integration
- Notifications only: a webhook pushes events without polling
- Small automations a no-code tool already covers
- Data that changes once a year
The best tools to test, design and use an API
Once you know what an API is, the next step is calling one. We compared six tools for three jobs: API clients to send requests and read responses (Postman, Bruno, Insomnia), tools to design and document an API (Swagger) or run it in production (Kong), and a no-code way to use APIs (Zapier). Lighter options exist too, such as Hoppscotch, a browser-based client. Each card says who the tool is for, its limit and one tip, with a price order.
The tools
Postman: the default API client, free for one user
Most completePostman lets you build a request, send it and read the response, then save it in a collection, add tests and share it. It also covers mock servers, monitoring and documentation.
Who it's for. Developers and product teams who want one tool from the first call to automated tests. If it has grown too heavy for you, see how to switch from Postman.
The limit. The Free plan includes one user. As soon as a second person needs the same workspace, you move to Team at $19 per user a month, billed annually: $1,140 a year for five people.
The tip. Monitoring beyond the plan's allowance is billed at $20 per 50,000 requests per team per month. Check how often your monitors run before turning them on for every endpoint.
- Price
- Free for 1 user; Solo $9/month and Team $19/user/month, billed annually
- Best for
- Teams that test and document APIs
- Limit
- Free plan is single-user
Bruno: an MIT-licensed client that keeps collections in Git
Best free clientBruno is an API client that stores your requests as plain files on your machine, so a collection lives in your Git repository next to the code and changes show up in a normal diff.
Who it's for. Developers who don't want their requests in someone else's cloud. Bruno is often named on developer forums by people leaving clients that ask them to log in.
The limit. The free Open Source edition includes two workspaces; paid tiers lift that and add Git features inside the app.
The tip. Pro costs $6 per user a month, billed annually, or $72 a year per person. A 14-day trial of the Ultimate tier needs no credit card.
- Price
- Free (MIT license); Pro $6/user/month, billed annually
- Best for
- Local-first teams using Git
- Limit
- 2 workspaces on the free edition
Insomnia: Kong's client, with a local mode that needs no account
Best for REST, GraphQL and gRPCInsomnia, built by Kong, sends REST, GraphQL, gRPC, SOAP and WebSocket requests from one window, and adds design, mocking and tests.
Who it's for. Small teams that switch between API styles. Its local-only Scratch Pad works without logging in.
The limit. The free Essentials plan covers three collaborators. Mock servers include 1,000 requests a month, then cost $10 per 25,000.
The tip. Pro is $12 per user a month on monthly billing and $10 on annual billing: worth it once a fourth person joins. Leaving it? Here is how to switch from Insomnia.
- Price
- Free (Essentials); Pro $12/user/month, $10 billed annually
- Best for
- Teams using several API styles
- Limit
- 3 collaborators on the free plan
Swagger: design and document an API with OpenAPI
Best for API designSwagger, from SmartBear, is the toolset around the OpenAPI specification, the standard file that describes an API's endpoints, parameters and responses. You write the contract first, then generate interactive documentation that others can try.
Who it's for. Teams that publish an API to partners or customers and need its documentation to stay accurate.
The limit. The Individual plan starts at $19 per user a month billed yearly, and the included API testing is 50 test executions a month.
The tip. The page opens on yearly prices: month to month, Individual is $25 and Team $35 per user, instead of $19 and $29. That is $72 more a year per user on Individual.
- Price
- From $19/user/month billed yearly; $25 monthly
- Best for
- Publishing a documented API
- Limit
- 50 test executions a month on entry plans
Kong Konnect: an API gateway with a usage-based bill
Best API gatewayKong Konnect puts a gateway in front of your APIs: it checks keys, applies rate limits, routes traffic and logs every call. It supports REST, GraphQL and gRPC.
Who it's for. Companies that run several APIs in production and want one place to secure and measure them.
The limit. The Plus plan starts at $25 a month plus usage. It includes 1 million API requests a month, each extra million costs $200, and the plan caps at 10 million requests a month.
The tip. Model your traffic first: at 3 million requests a month, requests alone cost about $425 ($25 plus 2 × $200), not $25, and advanced analytics above the first million adds $20 per million. To compare gateways, see the Kong alternatives.
- Price
- From $25/month plus usage; $200 per extra million requests
- Best for
- Running APIs in production
- Limit
- 10 million requests a month on Plus
Zapier: use APIs without writing code
Best no-code optionZapier connects thousands of apps through their APIs without code: a trigger in one tool starts actions in others. Its webhook steps can also call an API that has no ready-made connector.
Who it's for. Marketing, sales and operations teams who need two tools to talk and have no developer free. Our Zapier review covers it in depth, and the Make vs Zapier comparison and the Zapier alternatives show the other options.
The limit. The free plan includes 100 tasks a month, and each action a Zap performs counts as a task.
The tip. Professional starts at $19.99 a month on yearly billing and $29.99 on monthly billing: $120 a year more for paying month by month. Non-profits get 15% off any paid plan, pay-per-task charges excluded.
- Price
- Free (100 tasks/month); Professional from $19.99/month billed yearly
- Best for
- Connecting apps without code
- Limit
- Task quotas add up fast
Is your tool missing from this page? Email us: hello@hackceleration.com
API FAQ
Who invented the API?
The idea is usually traced to Maurice Wilkes and David Wheeler, who built a library of reusable routines for the EDSAC computer in the 1940s. Their book on preparing programs for EDSAC contains the first published API specification, even though the word API only appeared decades later.
Why do developers scaffold a new API?
Scaffolding is a temporary structure generated at the start of an API project: the folders, routes and placeholder code you build on, then replace. Many frameworks can generate it from a single command or from an OpenAPI file.
How do two apps share data through APIs?
API integration means connecting two systems through their APIs so they exchange data automatically, for example a shop sending each new order to its accounting tool. It can be coded by a developer or set up in a no-code automation tool with ready-made connectors.
Is an API a programming language?
No. An API is a contract that says which requests a service accepts and what it returns. You can call the same web API from Python, JavaScript or a no-code tool, because the request travels over HTTP. GraphQL is the exception people mix up: it is a query language used to talk to an API.
Is an API the same as a website?
No. A website returns pages for people to read; an API returns structured data, usually JSON, for programs to use. Many companies run both on the same servers: the site for visitors, the API for apps and partners.
Can an API be copyrighted?
The question is still open in the United States. In Google v. Oracle, over the Java API that Google reimplemented in Android, the Supreme Court ruled for Google in 2021: it assumed the API might be copyrightable and found that Google's copying was fair use. If you plan to copy another company's API, read its terms of use first.
Are APIs free to use?
Many have a free tier, but most commercial APIs charge by volume once you pass a quota, and some charge from the first call. Read the pricing page for the unit (per call, per thousand calls, per user) and for what happens above the limit: a blocked request or an extra charge.
Do I need to know how to code to use an API?
Not always. A client like Postman lets you send requests by filling in fields, and no-code tools call APIs through ready-made connectors. You do need to read the documentation to know which endpoint to call and what to send.
What is the difference between an API and an endpoint?
The API is the whole contract: all the operations a service offers and their rules. An endpoint is one address inside it, for one operation, such as the URL that returns a single order. One API usually has dozens of endpoints.