APIs 101

Yoel Yukalo
2 min readApr 8, 2021

Application Programming Interface, or API for short, is a very common and useful tool used by programmers. It allows the application to communicate with one another application.

NOTE: Neither the server nor the database is the API. The API is the code that governs the access point(s) for the server. Generally, when people mention the word ‘API’, they sometimes are referring to “a publicly available web-based API that returns data, likely in JSON or XML”.

Intro

Let's focus on web-based APIs that return data when requested by the client. APIs not only allow the client to access data but also lets the client alter some data. For example, you’ve most likely seen “Share on Instagram” or “Share on Twitter” buttons. When those share buttons are clicked, the site is you currently are on is communicating with Instagram or Twitter to add a post to your account or share a tweet. Lots of web-based APIs are largely created by large tech companies, government organizations, or even individuals.

Typically APIs do not have frontend styling, and all the magic is done by sending an HTTP request to a server. A lot of the API data out there is in JSON, JavaScript Object Notation, which is just a way of representing the data pulled from the server.

Suggestion: Download a JSON Viewer as a Chrome extension for data that's easier to read.

Building an API

Creating an API is not hard with server-side web programming and routing with languages like Ruby on Rails. Building a public API will require the following:

  • A database to store the data (MySQL/Postgres/Firebase)
  • A server that is accessible to the web (AWS/Azure)
  • A backend with server-side web routing (Using Rails is my personal favorite)

--

--