What is an API?
API, short for Application Programming Interface, is a type of software middleman that lets two different software programs (applications) communicate. It does this via a set of defined rules and specifications. Using an API — like Stripe for payment processing — speeds up the application development process without sacrificing functionality.
Looking for Branch’s documentation for APIs? Find it here.
An example of using APIs
If you’ve ever checked the weather or sent an instant message on your phone, you’ve probably interacted with an API. Let’s go through an example. Say you want to check the weather on your phone. You open the weather app. The app checks for your device’s location (or the location you specify) and makes a request to the app’s server. The server then retrieves weather information relevant to your location and processes it into a format that your app can understand. All of this information exchange happens through an API.
The difference between SDKs and APIs
While an API is the library/service definition and/or documentation, an SDK is a software development kit, usually a client-side library that facilitates usages of an API. As such, all SDKs are, or contain, APIs, but not all APIs are SDKs.
As an example, the JDK (Java Development Kit) contains the API as well as the compilers, runtimes, and other miscellaneous tools. As explored on StackExchange, the Java API is simply all the libraries that make up the core language that you can work with out of the box.