Explain It Like I'm 5: API

API is short for Application Programming Interface.

An interface is simply a predefined way to work with a tool. That tool can be a 3rd party service like Facebook, a library like React.js, or your company's internal backend service.

Imagine you want to display your recent tweets on a website. Your first instinct might be to copy the last few tweets into your code. Nice!

But now every time you write a tweet, you have to copy the tweet into your website. That's a hassle, right?

Twitter's API solves this by giving you a way to work with their database without needing access to their internal code. Using their API, you can fetch your recent tweets, retrieve them as data, and display them however you like.

Real-world examples:

  • Facebook API - Get data from Facebook such users, friends, likes.
  • Twitter API - Get data from Twitter such as tweets, profiles, followers.
  • Stripe API - Process payments and send customer invoices for an online store.
  • REST API - An API designed for common operations like creating, reading, updating, and destroying (or CRUD) data.
  • React.js API - The methods and intended usage instructions to use the React.js library

See the entire series.

Thanks for reading! You are my favorite person for sticking around until the end. 🍻

This blog is a constant work in progress, and I want to get better with your help! If you have feedback or questions on this post, please leave a comment below, use my site's contact page, or reach out to me on Twitter.