Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I was looking through various APIs and SDKs, when I realized that I couldn't really tell the difference between something called an API and something called an SDK. Both of them are, conceptually, a way for your program to interface with and control the resources provided by another piece of software, whether that other software is a web service, an end-user app, an OS service or daemon, or a kernel device driver.

So, in your opinion, what is the semantic difference between an SDK and an API?

share|improve this question
    
SDK is a Development Kit, usually a client side library that facilitates usages of an API. An API is just the library/service definition and or documentation. –  dietbuddha Aug 21 '11 at 5:50
add comment

10 Answers

up vote 82 down vote accepted

I think it rather falls along the lines of "All SDKs are/contain APIs but not all APIs are SDKs".

An SDK seems to be a complete set of APIs that allow you to perform most any action you would need to for creating applications. In addition an SDK may include other tools for developing for the platform/item that it is for.

An API on the other hand if just a series of related methods that may be good for a specific purpose.

As an example, the JDK (Java Development Kit) contains the API as well as the compilers, runtimes, and other miscellaneous tools. The Java API is simply all the libraries that make up the core language that you can work with out of the box.

share|improve this answer
3  
I'd like to add that an SDK is just a sample of how you would interact with said API. –  The Muffin Man Aug 17 '11 at 20:55
7  
I think you may've inverted that Nick. An SDK is a superset of things, that contains (among other things) API's to interact with it's libraries (not the library itself, but the interface to the library that a coder using the library would use). –  Danny Staple Aug 17 '11 at 22:26
2  
An SDK can include an API, tools, documentation, samples, and everything else that's needed. –  gregmac Aug 18 '11 at 2:02
1  
@gregmac Did I not convey that fact? –  Glenn Nelson Aug 18 '11 at 2:12
add comment

API:

API

SDK:

SDK

Photos by Andres Rueda.

An API is a set of rules and specifications that describes how you can use/interact with an application.

An SDK is a set of tools and components that allows you to create certain applications.

There is a bit of a grey area, though, when the API includes certain tools for you to work with it, and when the SDK is little more than a set of tools and specifications that allows you to create certain applications on an existing platform.

share|improve this answer
add comment
  • API = Application Programming Interface
  • SDK = Software Development Kit

So the real difference is, that an API is no more or less than an interface to "some service", while an SDK is a set of tools/components/classes for a specific purpose. An SDK in fact presents you with an API to interface with. But you might use an API without having the underlying components, for example when the API is provided through a web service.

Examples of APIs:

Examples of SDKs:

share|improve this answer
add comment

API → documented interface

SDK → interface documentation ( + examples & tools )

share|improve this answer
3  
Finally someone that mentions documentation! –  gregmac Aug 18 '11 at 2:02
add comment

An SDK could be nothing but an API (files to help interface with another app), but usually includes other code to help with debugging and other pieces for your IDE.

I'm all out of acronyms.

share|improve this answer
6  
Quick, get yourself some more TLAs! –  Mason Wheeler Aug 17 '11 at 22:19
3  
I'm about ready for EIEIO. –  JeffO Aug 18 '11 at 1:10
add comment

"SDK" is collective in a larger sense than "API".

You typically find only one SDK to cover an entire platform. There's one MacOS X SDK and one iOS SDK, for example, and those each contain the API's for many different areas of functionality.

"API" was originally used as a collective term as well, and it's still often used that way (MAPI, WSAPI, etc.), but it's usually limited to some particular technology. The scope implied by the "API" seems to have diminished over the years; people used to talk about the "Mac Toolbox API" or the "Windows API," both of which obviously contained a lot of functionality. These days, it's not uncommon to hear "API" used to mean a single system function; a new version of an operating system might be said to contain hundreds of new API's, and what's meant is hundreds of new system calls.

Neither term is very precise without some context.

share|improve this answer
add comment

What is API?

API is an interface that allows software programs to interact with each other. It defines a set of rules that should be followed by the programs to communicate with each other. APIs generally specify how the routines, data structures, etc. should be defined in order for two applications to communicate. APIs differ in the functionality provided by them. There are general APIs that provide library functionalities of a programming language such as the Java API. There are also APIs that provides specific functionalities such as the Google Maps API. There are also language dependent APIs, which could only be used by a specific programming language. Furthermore, there are language independent APIs that could be used with several programming languages. APIs needs to be implemented very carefully by exposing only the required functionality or data to the outside, while keeping the other parts of the application inaccessible. Usage of APIs has become very popular in the internet. It has become very common to allow some of the functionality and data through an API to the outside on the Web. This functionality can be combined to offer an improved functionality to the users.

What is SDK?

SDK is a set of tools that can be used to develop software applications targeting a specific platform. SDKs include tools, libraries, documentation and sample code that would help a programmer to develop an application. Most of the SDKs could be downloaded from the internet and many of the SDKs are provided free to encourage the programmers to use the SDK‘s programming language. Some widely used SDKs are Java SDK (JDK) that includes all the libraries, debugging utilities, etc., which would make writing programs much easier in Java. SDKs make the life of a software developer easy, since there is no need to look for components/ tools that are compatible with each other and all of them are integrated in to a single package that is easy to install.

What is the difference between API and SDK?

API is an interface that allows software programs to interact with each other, whereas a SDK is a set of tools that can be used to develop software applications targeting a specific platform. The simplest version of a SDK could be an API that contains some files required to interact with a specific programming language. So an API can be seen as a simple SDK without all the debugging support, etc.

share|improve this answer
add comment

Everything mentioned before is true, but about SDK I would like to add that a software development kit is (or should be) a really complete package with (almost) all the necessary tools for the development process, while API is "just" an interface to interact with.

share|improve this answer
add comment

I would like to compare this way.

If you are a Developer using Microsoft Tools:

API = Microsoft.Net Framework Vs SDK = Visual Studio

If you are a Developer using Java:

API = Java RunTime Vs SDK = Any tool that would provide the Development Kit (JDK)

I guess an SDK would necessarily have to rely on a corresponding API - there is no SDK without an API.

share|improve this answer
    
I think what you're talking about in terms of Visual Studio is an IDE, which can provide access to one or more SDKs and/or APIs. –  KeithS Aug 18 '11 at 16:58
add comment

Here is a simple analogy... APIs are like words that you can use, and SDKs are like sentences that have been put together for you.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.