SDK <>API | The difference

Shankar Y Bhavani
3 min readMay 30, 2021

Introduction

SDK and API are the two terms that are often heard when integrating different systems. In general, developers tend to overthink and spend time on deciding whether to use an SDK or API directly. This often leads to comparing them, in reality they overlap and there is no clear solution/steps to make us understand situations where we can clearly decide on one.

API is the acronym for Application Programming Interface. An API is a set of functions and procedures that allows users to to interact with the data or the functionality of an existing application. In general, REST, GraphQl are somewhat mostly used in the entire industry.

SDK is the acronym for Software Development Kit. It often encompasses code samples, Documentation and models that are used in order to interact with the existing application. This is in general language specific, for example we can have a java based SDK or a go based SDK that can perform same functionality but implemented in different languages.

Difference

  • An SDK contains APIs, but an API needn’t contain an SDK.
  • An SDK in general act as building block for application development by using API’s.
  • An API in general is light weight, fast and generally limited to single functionality, where as an SDK is more robust in nature and includes lot of utilities to help build an application.
  • Examples of API : Google maps API, Github API, lichess API etc.;
    Examples of SDK : Android SDK, Mapbox Android SDK, etc.;
  • An API in general is language agnostic. It is an interface to communicate with the developed application. Any application can use the API to interact with developed application as long as it adheres to the interface contract. On the contrary, an SDK is language specific.

What to use ?

There is no right answer to this question, but although from my experience I we can decide based on context.

  • Example-1 (Mobile app size) : In case of mobile app development, let’s say our app supports sign up using Google, Facebook auth layer. In this case, it’s better to use Auth API’s provided by the respective applications if there is no other functionality is used from those apps. The rationale behind this is, if we start including SDK’s in our app it might bloat our app size by increasing the overall size of the application when we share it in app store or play store. This might hinder the over all user experience when they are downloading the app.
  • Example-2 (Faster dev cycles) : In case of mobile app development, let’s say our app uses google vision API. In this case it’s better to directly use vision client SDK provided by Google as that will provide with additional utilities which we can use in our app development and also easily enhance in case of new feature requests that involve image processing.
  • Example-3 (Abstraction) : If the developer is new to app development and don’t have enough understanding on JSON to object conversion in the language that we are working on. It’s better to go with SDK as that provides an abstraction layer which we can use it in our application if the dependencies are properly set up.
  • Example-4 (Quick functionality check) : If our app want to use Google vision API and we don’t know which api to use. We can always use tools like postman or cURL in order to check the functionality. This way we know the behaviour of the API when we are using it in our app.

Conclusion

We have seen the basic definitions, differences and small examples where we can make use of SDK and API. There is no clear set of rules where we can say we have to use SDK and not API or vice versa, it’s always better to leave the choice to the developer.

--

--