API(application programming interface) is an interface or communication protocol between ;
- Different parts of a computer program intended to simplify the implementation and maintenance of software
- Different computer programs intended to simplify interchangeability and interoperability.
An API may be a set of functions and procedures allowing the creation of applications in types of web-based system, operating system, database system, computer hardware, or software library.
Assume that you are making a project, but both the website and its applications on Android and iOS are separate. Instead of writing all the controls and repetitively for each platform, it will provide great convenience and minimize complexity by performing operations as APIs in one place and accessing the API from these applications.
Firstly, SOAP API (Simple Object Access Protocol) services were used to communicate with each other between applications running in different languages and on different platforms. SOAP services usually return requests over HTTP and SMTP protocols in XML format. Although its use has decreased today, there are still companies that use it.
Today, an architectural approach, also known as REST API (Representational State Transfer), is preferred. It only receives a response over the HTTP protocol and usually returns it in JSON format (optionally, it can also return XML).
Examples of APl;
E-Bay API: Instead of manually entering items to sell on eBay, you can automatically upload them.
Stripe API: When you make sales from your website, card information and payment request are transmitted to Stripe API.
AccuWeather API: If you want to show weather information on your site or app, you can get the information automatically from this API.