{"componentChunkName":"component---src-templates-blog-template-blog-template-js","path":"/blog/What-are-APIs","result":{"data":{"blog":{"createdAt":"November 21st, 2020","title":"What are APIs?","id":"93208169-4f74-53a6-bcc9-6eeea7f8d65a","overview":"An API (Application Programming Interface) is a software intermediary that makes 2 or more applications to communicate to each other. Most apps you are using are using an API, be it your Weather app, Facebook app, etc.","slug":"What-are-APIs","author":"Philane Msibi - UI/UX Designer and Software Engineer","content":{"childMarkdownRemark":{"html":"<p><img src=\"//images.ctfassets.net/d8xmlp2haryb/6jjKodjjKWjMvrvi6Fs3uQ/94f187341b3959cca9f9280a7faf1617/API-page-graphic.png\" alt=\"API-page-graphic.png?itok=5zMemph9\"></p>\n<h2>In Simple Terms</h2>\n<p>Think of it as a middle man, getting and suplying data from backend systems or databases to different end user apps. Your Facebooks, Twitters and Amazons use APIs also. Let's take a Weather app on your phone. The Weather company collects weather data using their devices and save them into their databases and show them to you via Television or Radio but since Technology is moving faster, you can view the weather on a mobile app and if you go to Google Play Store or Apple Store and search for weather app, you will be overwhelmed with many applications developed by different developers so where do they gave the weather data from? Do they have devices that Weather Companies have to measure Wind Direction, Humidity and temperature? Nope! Weather companies supply their data to the public so that developers can also use this weather data on their apps so the Weather companies doesn't access to their database instead they code an API which interact with their databases and supply information to the public. I hope this makes total sense.</p>\n<h2>Let's get technical now.</h2>\n<p>APIs supply data in different formats: JSON, XML, etc. We get data from an API using endpoints of that API and some APIs need API keys for authentication and some are just free. APIs also work with the HTTP(S) protocol for data exchange. We send HTTP requests to the API using its endpoint provided. Instead of you digging for data and creating that data, APIs are there to help and give you realtime and live information regarding something. There are APIs for movies, which give you a list of movies that are comming up, their information and some provide ratings for that movie, etc.</p>\n<h3>API Endpoints</h3>\n<p>API endpoint is just a URL. And if you take that URL and put it into your browser's addressbar, you will get information in a particular format, either JSON, XML, etc. With that API endpoint, you can make HTTP requets using many language HTTP Requets API. In JavaScript, we mostly use the FETCH API or Axios. The same data you get on your browser for that API endpoint, is the same data you will get back when using your HTTP language library, then manupulate the data then show it into your app.</p>\n<h3>Can I make an API?</h3>\n<p>Absolutely!!! APIs are developed by developers also so if you are a developer then yes you can. APIs can be made using most languages. Here are some languages that you can use:</p>\n<ol>\n<li>JavaScript, using ExpressJS, Hapi, Feathers, Adonis, etc</li>\n<li>Python, using Flask</li>\n<li>C#, using ASP.NET</li>\n<li>etc.</li>\n</ol>\n<h3>After developed an API?</h3>\n<p>After you have developed your API and have tested it using HTTP Request senders, such as Postman, PostWoman, etc, you must find a server to host your API so that it will be public to everyone on the internet to use and also make documentation on how to use it, its endpoints, return format, etc.</p>\n<h2>Conclusion</h2>\n<p>APIs are used everywhere, big and small companies and as a developer, you must know what are they, how to use them and how integrate an app with them, etc.</p>"}}}},"pageContext":{"slug":"What-are-APIs"}},"staticQueryHashes":[]}