<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Belam Muia</title>
    <description>The latest articles on Forem by Belam Muia (@belam_muia).</description>
    <link>https://forem.com/belam_muia</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3500606%2Ffb6c9b95-7e24-412d-acaf-56dd029a2bad.png</url>
      <title>Forem: Belam Muia</title>
      <link>https://forem.com/belam_muia</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/belam_muia"/>
    <language>en</language>
    <item>
      <title>What exactly is an api?</title>
      <dc:creator>Belam Muia</dc:creator>
      <pubDate>Thu, 14 May 2026 10:19:16 +0000</pubDate>
      <link>https://forem.com/belam_muia/what-exactly-is-an-api-4fob</link>
      <guid>https://forem.com/belam_muia/what-exactly-is-an-api-4fob</guid>
      <description>&lt;h2&gt;
  
  
  APIs: The Silent Heroes of the Internet
&lt;/h2&gt;

&lt;p&gt;API is a term every developer whether beginner or experienced has probably heard before. And honestly? Without APIs, the digital economy would collapse and send us back to “traditional ways.”&lt;/p&gt;

&lt;p&gt;Think about it.&lt;/p&gt;

&lt;p&gt;When you log into an application, stream a movie on Netflix, or text/call your loved ones on WhatsApp, APIs are working behind the scenes to make all of that possible. Without them, most modern digital experiences simply wouldn’t exist.&lt;/p&gt;

&lt;p&gt;So… what exactly is an API?&lt;/p&gt;

&lt;h2&gt;
  
  
  What is an API?
&lt;/h2&gt;

&lt;p&gt;Imagine visiting a restaurant.&lt;/p&gt;

&lt;p&gt;You don’t walk straight into the kitchen and start telling the chef what food you want. Instead, you sit at your table, place your order through a waiter, and the waiter relays the message to the chef. Once the food is ready, the waiter brings it back to you.&lt;/p&gt;

&lt;p&gt;That waiter is basically what an API does.&lt;/p&gt;

&lt;p&gt;An API (&lt;em&gt;Application Programming Interface&lt;/em&gt;) acts as the middleman between the client and the server. Every request passes through the API. The client sends a request, the API communicates with the server, and then returns the correct response back to the client.&lt;/p&gt;

&lt;p&gt;Simple, but powerful.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Simple API Example
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;https://yoursitebackend.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Take the URL above.&lt;/p&gt;

&lt;p&gt;Imagine you’re building an e-commerce website. A frontend alone isn’t enough if real users are going to use your platform. You’ll need a backend to handle business logic such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Price calculations&lt;/li&gt;
&lt;li&gt;Tax additions&lt;/li&gt;
&lt;li&gt;User authentication&lt;/li&gt;
&lt;li&gt;Inventory management&lt;/li&gt;
&lt;li&gt;Payments&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now let’s say a user wants to make a purchase.&lt;/p&gt;

&lt;p&gt;Your frontend will send a request to the backend saying something like:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“User A is making a purchase. Please calculate the total price for these items.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The backend processes the request and sends back a response.&lt;/p&gt;

&lt;p&gt;That entire communication process is an API call.&lt;/p&gt;

&lt;h2&gt;
  
  
  Characteristics of an API
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Abstraction
&lt;/h3&gt;

&lt;p&gt;If you’ve done Object-Oriented Programming before, this term probably sounds familiar.&lt;/p&gt;

&lt;p&gt;APIs hide internal server logic and only expose what the client should see. For example, users don’t need to see raw database errors or sensitive backend processes.&lt;/p&gt;

&lt;p&gt;Imagine getting this on your screen:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;Database&lt;/span&gt; &lt;span class="k"&gt;connection&lt;/span&gt; &lt;span class="n"&gt;failed&lt;/span&gt; &lt;span class="k"&gt;at&lt;/span&gt; &lt;span class="n"&gt;port&lt;/span&gt; &lt;span class="mi"&gt;3306&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Yeah… not exactly user-friendly 😭&lt;/p&gt;

&lt;p&gt;APIs help prevent that by abstracting the complexity away from users.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Standardization
&lt;/h3&gt;

&lt;p&gt;APIs follow specific structures or schemas. You can’t just format data however you want.&lt;/p&gt;

&lt;p&gt;One of the most common standards used today is JSON.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"username"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"pookiepotato"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"role"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"developer"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This standardization makes communication between systems predictable and easier to manage.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Endpoints
&lt;/h3&gt;

&lt;p&gt;Communication in APIs happens through specific URLs called &lt;em&gt;endpoints&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Endpoints are basically locations where resources can be accessed.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;https://yoursitebackend.com/users
https://yoursitebackend.com/products
https://yoursitebackend.com/orders
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each endpoint usually serves a different purpose.&lt;/p&gt;




&lt;h2&gt;
  
  
  API Architectures
&lt;/h2&gt;

&lt;p&gt;An architecture is like a blueprint for how an API is designed and communicates.&lt;/p&gt;

&lt;p&gt;Some common API architectures include:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;REST APIs&lt;/li&gt;
&lt;li&gt;SOAP APIs&lt;/li&gt;
&lt;li&gt;GraphQL APIs&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;There are many others too, but these are among the most popular.&lt;/p&gt;

&lt;h2&gt;
  
  
  API Types
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Public APIs
&lt;/h3&gt;

&lt;p&gt;These APIs are accessible to the public with fewer restrictions. Most of the time, all you need is an API key to start using them.&lt;/p&gt;

&lt;p&gt;A good example is the Google Maps API.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Private APIs
&lt;/h3&gt;

&lt;p&gt;These are used internally within organizations and are not exposed publicly.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Partner APIs
&lt;/h3&gt;

&lt;p&gt;These APIs are shared between specific businesses or partners under controlled access.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Composite APIs
&lt;/h3&gt;

&lt;p&gt;Composite APIs combine multiple API requests into a single request, making systems more efficient.&lt;/p&gt;




&lt;p&gt;There’s honestly so much more to APIs than just the name, and that’s what makes them exciting to learn.&lt;/p&gt;

&lt;p&gt;I’m still exploring APIs myself, and I’ll definitely be sharing more about them in upcoming blogs 🚀&lt;/p&gt;

</description>
      <category>frontend</category>
      <category>backend</category>
      <category>fullstack</category>
    </item>
  </channel>
</rss>
