Blog > API Tutorials > So What Exactly is an API?
So What Exactly is an API?
January 31, 2018 By Janet Wagner Leave a Comment
What is an API?
What does an API do and how is it used?
Who can Use an API?
What is the API Key?
What is an Open API?
API Architectural Styles
What is REST or RESTful based API?
APIs for Just About Everything
If you're a regular visitor to the RapidAPI website, you probably already know that an API is an amazing thing. You may even be looking for new APIs to integrate with your web or mobile application. But if you're a new developer, you may not know what an API is exactly. We thought today we would cover some of the basics of APIs.
An API (not be confused with the American Petroleum Institute), acronym for Application Programming Interface, is a set of definitions and protocols that allow technology products and services to communicate with each other via the internet.
Let's say you want the Twitter app on your smartphone to display the tweets of a specific Twitter user. The app would first connect to the internet and send a request to an API on the Twitter server. The Twitter server would then retrieve the requested data, convert the data to a readable format, and send a response back to the smartphone Twitter app. The app then interprets the data sent from the Twitter server and presents the data to you, the app user, in a human-readable way.
Well-designed APIs can help simplify and speed up application development. APIs also make it possible for developers to add to applications advanced capabilities and features that they are unable to build themselves. For example, most companies don't have the means to build a machine learning system. If a company developer wants to add a machine learning capability like automatic image tagging to an application, they could find and use a machine learning API.
Who can use an API depends on whether an API is a private API, partner API, or public API. If an API is private, it is for internal use only – only company developers can use that API. A partner API is for use by a company-approved group of developers or business partners.
API Key is a code passed in to identify the calling program, its developer, or its user to the Web site. API keys are used to track and control how the API is being used, for example, to prevent malicious use or abuse of the API.
– from Wikipedia.
If an API is public, it means that it is available to anyone who would like to use it. Partner and public APIs usually have some limitations and developers must follow the API terms of use.
APIs come in a number of architectural styles. Here are just a few:
Representational State Transfer (REST) is one of the most popular types of API architectural styles. REST APIs typically communicate between a client and server using HTTP methods. There's some debate about the definition of a REST API, but that topic is too complicated to be covered in this blog post.
Remote Procedure Call (RPC) – An RPC API calls on a specific procedure of a web service to execute in a different address space. These type of APIs usually involve SOAP and XML.
Event-Driven – Pub-Sub, WebHooks, and WebSockets are examples of event-driven APIs. Event-driven APIs react to changes that happen within an application. A change in an application could be suddenly having a message in the app's inbox. The API would then perform an action based on that change in the system like sending a push notification that a new message has been received.
Today, you can find APIs for just about anything – payments, mapping, weather, email, whatever service you may need. Check out some of the many APIs available here on RapidAPI.
Ready to begin? Learn how to start using an API now!
[ultimate-faqs include_category='what-is-api']
« Five APIs to Make Your Holiday Season Easier
Build Amazing Chat Apps with These Chatbot APIs »
How To Use an API (The Complete Guide) [A Simple API Example]
Filed Under: API Tutorials, APIs Tagged With: api, developer, education, learning, programmer, RapidAPI, What is an API
Janet Wagner