Table of contents
No headings in the article.
What is an API?
An application programming interface (API) is code that sends instructions between one software platform to another.
APIs are meant get rid of complex code, and provide you with code that has easier syntax to use in its place.
Want an example?
Think of an electricity socket in your house.
If you want to power your computer, you wouldn't wire it directly into your electricity supply - you'd plug it into the electricity socket!
In this case, the socket serves as your "electricity" API.
What can APIs do in web applications?
๐ Manipulate documents
๐ฅ๏ธ Fetch data from servers
๐๏ธ Draw and manipulate graphics
๐น Play video and audio
๐ฑ Retrieve data from your device
๐ฆ Store data in your browser.
What types of APIs are there?
๐ Browser APIs
๐ 3rd Party APIs
Read the next texts to find out how they are different โคต๏ธ
๐ Browser APIs
โ APIs that are built into your browser
โ Immediately accessible in vanilla JavaScript
โญ Example: Geolocation API
You can find a list of browser APIs here: developer.mozila.org
๐ 3rd Party APIs
โ APIs that are located on 3rd party servers
โ Allow you to use part of those platform's functionality in your web applications
โญ Example: Twitter API
You can find a list of 3rd party APIs on @Rapid_API: rapidapi.com/hub
Want to build a small web application with an API? Here are some ideas to get you started:
๐ API Projects:
Quote Generator
Weather App
Meal Generator
Movie Database
Random User Generator
Flight Information App
GitHub User Search