DEV Community

Cover image for ELI5: What is an API?

ELI5: What is an API?

Andrew (he/him) on March 18, 2019

API is a term that's thrown around a lot by programmers and web developers but it may be foreign to newbies. What exactly is an API? What does API ...
Collapse
 
ademola_ba profile image
Ademola Balogun • Edited

I've been looking for what an API is all day until I found this.
Thanks for sharing, It was really helpful. Hope you write more on things that you think might try to scare away newbies like me.
Thanks once more.

Collapse
 
awwsmm profile image
Andrew (he/him)

Glad it was helpful!

Collapse
 
argustic1 profile image
Argustic

Thank you for making this simple and well written read. I like to be certain what I’m talking about when I use terms and I feel like API gets used very very loosely. I like simple definitions that are easy to remember, so replacing API with “someone else’s code” works great.

Question: What would you say is the difference between an API and a library? I’m speaking from my old C programming days where you would start most your code off with ‘include’ statements. They essentially sound like API’s specific to C

Collapse
 
awwsmm profile image
Andrew (he/him)

You can think of the API as the "surface area" of the library. There may be lots of good stuff inside, but you can't access it without going through the predefined public API.

Collapse
 
andre347 profile image
Andre

Really useful intro to APIs! Could be useful for when I'm teaching about this topic. Thanks!

Collapse
 
vikramchandra profile image
Vikram Sharma

Nice article Andrew. API has made Plumbers of us programmers :). By the way another great resource on this topic is this blog post on what is an api.