“Application Programming Interface (API) is a set of subroutine definitions, protocols, and tools for building application software”
-Wikipedia
Cool definition bro. Now what?
As a complete beginner in Front-End Development, I sometimes panic after seeing unfamiliar terms such as these. Not only do I have to understand the definition, but I also have to implement it in my future projects. So, there really was no way of escaping this learning process.
I’ll try to explain it in my own simple words:
APIs are program “libraries” that developers can use to make their own programs.
Say, you want to develop a simple weather app. You work on the HTML/CSS and it looks very pretty and all, but the necessary weather data is still missing. This data will not magically pop-up out of nowhere in JavaScript. I also don’t think setting up weather thermometers/barometers to collect this data would be practical for the up-and-coming developer. Therefore, we use….APIs!

“Need a weather app? Let me just collect the weather for today”
As I’ve mentioned before, APIs are libraries where developers can “borrow” information and functionality from pre-existing programs, such as Google Maps. For my first Local Weather Project, I utilized the APIXU Online World Weather API to get my weather data and IPinfo.io to get current geographic location information.
- Create an account to get your own API Key (a secret token specifically to identify the user)
- Use JSON in JavaScript to call the selected API by pasting its url and adding your own API Key to activate it
- Look at the API documentation and learn the various request commands that you’ll have to type to acquire the data that you need
- Store them in JS variables so they can be reused later on
For Example: Current temperature in Fahrenheit can be requested by typing current.temp_f so for convenience one can store this into a variable called weatherF to avoid the hassle of typing out current.temp_f later on.
Well that’s all I can explain for now.
Peace out,
TechHamster