API vs REST API
API vs REST API

API vs REST API

Tags
API
REST API
Web Development
Published
March 6, 2023
Author
Oussama Belhadi

The difference between a normal API and a REST API

 
REST is a type of API. Not all APIs are REST, but all REST services are APIs.
notion image
API is a very broad term. Generally it's how one piece of code talks to another. In web development API often refers to the way in which we retrieve information from an online service. The API documentation will give you a list of URLs, query parameters and other information on how to make a request from the API, and inform you what sort of response will be given for each query.
 
notion image
 
REST is a set of rules/standards/guidelines for how to build a web API. Since there are many ways to do so, having an agreed upon system of structuring an API saves time in making decisions when building one, and saves time in understanding how to use one.
 
 
Other popular API paradigms include SOAP and GraphQL.
Note that the above attempts to answer the question in regards to how the terms are commonly used in web development. Roman Vottner has offered a different answer below which offers good insights into the original definition of the term REST with more technical precision than I have provided here.
 
 
Open API Spec :
Request Methods :