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?
Is an API the same thing as a website?
Do APIs cost money?
What happens if the other company changes its API?
Should my own system have an API?
Still not sure how this applies to your project?
Tell us what you are building and we will answer in plain language.