Application Programming Interface API

An API is an agreed way for one program to ask another for information or for an action, so neither program needs to know how the other works inside.

Also known as API programming interface web service

Definition

An API is a way for one program to ask another program for something. Both sides agree on the questions and the answers in advance, so the first program asks in exactly the shape the second one expects. The answer then comes back in the shape it was promised, which means neither side has to know how the other is built inside. That is what makes the whole arrangement work.

You already use APIs every day without ever seeing one of them. When a shop's website shows a live delivery price, it is asking the courier's computer that question. The same thing happens when you pay by card, because the till is asking your bank whether the payment went through. A site that offers a sign-in with Google works the same way, since it is Google that answers and not the site. Each of those is an API call, and you never see any of it happen, because all you see is the price appearing on the screen.

The value sits in the promise, because the shape of the question and the answer is fixed. The courier can rebuild its whole system next year and your shop keeps working, which is why an API is often called a contract. REST is simply the most common style for writing one.

Here is the part a supplier rarely mentions first, and it is the part that costs money. Most APIs count every request, and many of them either charge per request or stop answering once you pass a limit. That adds up faster than people expect, because a screen that refreshes itself every five seconds sends about seventeen thousand requests a day on its own. So ask two things before you sign: how many calls the price includes, and how much warning you get before the API changes. Linkysoft asks both at the start of every web application project, because the answers change the design.

APIs work in the other direction too, because your own system can offer one to everybody else. Your accountant's software, the warehouse and the phone app then read the same figures instead of each keeping its own copy. That is how a business ends up with one number rather than three that disagree. When Linkysoft builds a system the API is built alongside it, so the mobile app and the website are never fed from different data.

Questions about Application Programming Interface

What is an API in simple words?
It is a fixed way for one program to ask another for information or an action. The question and the answer have an agreed shape, so both sides can change inside without breaking the link.
Is an API the same thing as a website?
No. A website is written for a person to read, with a design around it. An API answers another program, so it sends plain data and nothing else. One system often offers both from the same information.
Do APIs cost money?
Often, yes. Many are free up to a limit and then charge per request or per month. Ask for the price list and the limit before anything is built on top of it, not after.
What happens if the other company changes its API?
Your connection can stop working overnight. Serious suppliers number their versions and give months of notice. Ask about that notice period before you choose one, because it is the difference between a planned update and an emergency.
Should my own system have an API?
Usually yes. It lets your phone app, your accountant's software and any tool you buy later read the same figures instead of keeping separate copies that slowly stop matching.

Still not sure how this applies to your project?

Tell us what you are building and we will answer in plain language.