APIs and SDKs

The terms API and SDK are common in development. They cause some confusion because they each have multiple meanings. In some contexts, they mean the same thing. This post will define the terms API and SDK as well as describe their various usages.

API

API stands for Application Programming Interface. When developers use the term API, they generally mean one of three things.

In Programming

Often, developers will make use of code they didn't write. This can come in the form of libraries or frameworks. These libraries and frameworks expose their functionality via an API. If a developer was working with a library to program a car, they might just have a simple go function they can call. Under the hood, the car library will do the work necessary to get the wheels turning.

You can think of your own car as having an API. You can control the A/C, speed, and radio through simple controls without having to understand what's going on under the hood.

In Web Services

Web services are applications hosted by servers accessible via the internet. They're what allow you to access content from multiple devices. A web service is made up of multiple endpoints which allow interacting with resources. For example, the LinkedIn web service has end points to list your connections, add blog posts, and send messages. LinkedIn exposes a contract that client applications must adhere to interact with LinkedIn. This contract is the LinkedIn API.

It's very similar to the APIs in code. The main difference is that web service API calls are made over the internet.

As Singular Entity

In the purest sense of the word, an API is a contract or a definition of a service or framework. Sometimes a developer will refer to an application itself as an API. For example, in an application with a frontend and a backend, the backend may be referred to as "The API". The distinction here is that "The API" represents a running application as opposed to a definition.

SDK

SDK stands for Software Development Kit. A SDK is something a developer downloads to make use of a particular product, service, or framework. To build an iOS application, you need the iOS SDK. It can come with documentation, code examples, and many other tools. Part of the SDK can be an API that explains how to interact with a service or framework. The iOS SDK includes APIs for using the camera, sharing content, and interacting with Siri. Sometimes the SDK is just an API which can result in the terms being used interchangeably.