Okay, So one thing I had always wondered is: Do big companies like Spotify, Google and Youtube build a separate backend and a database for every platform and how do they even manage the integration. Then I came across the concept of api's. API stands for Application Programming Interface and most of the popular internet services use api's. Although not all api's a public, most are with an api key.
Imagining an API
Source: Nil
This is one of the most popular representations of an api: think of the server as the kitchen and you as the customer. An API can be compared to the waiter who gets you the food, in this case information processed in the server.
Source: Jenkins
So technically, all the talk of integration boils down to simple front end development integrated with an uniform and strong api which is what provides the functionality, the brain, to a website
Qualities of a good api
A good api must have a few hallmark properties stated below
- It must be versatile: A good api must work fast anywhere and to the user's needs
- It must be fast: It must be fast and must have less downtime
- It should be secure: The api must be secure and should work with appropriate api key's.
- It should be easy to integrate: This part of the api is crucial and is very important
Building an API
There are many good ways to build an api, but in my opinion, the most easy and secure way is to build it in flask or fastapi. Both use python and a excellent for a beginner and a advanced programmer. Fastapi is, as the name suggests, even more faster and reliable but I am a die hard fan of flask. Many of my projects are written using flask and I am awestruck by the ease and convivence it gives. Want to try it out on your own? Given below is the code for an simple api
But if you want a detailed one, here's a detailed video published on the freecodecamp youtube channel or you can watch it below
Some Good Ones
So with all that hype about api's, do you want to use some in your next project? I have divided them in two categories, The Official ones and the fun free ones
Official Ones
YouTube API: The official api of YouTube. It lets you access YouTube data and it works like a charm, ones you set it up. It even has libraries for every programming language to make integration even easier.
Requires API Key
Spotify API: The official api of spotify. Very programmer friendly and very rich. You can basically custom design spotify itself using this api. Hats off to the spotify team
Requires API Key
Open Weather API: No API List is complete without mentioning the openweather api, it has it all. It is feature rich, fast and does it's job well. Highly recommended for a beginner.
Requires API Key
Imgur API: Imgur has an api as well. It is easy and beginner friendly. Just gets it's job done.
Requires API Key
Unsplash API: The best api. It is so easy and customizable. Just Love it. Definitely give it a try.
Requires API Key
Now for the fun ones
No Time to explain! Just Discover them!
- Predict Age From Name: agify.io
- Dog Status Codes: http.dog
- Predict gender from Name: genderize.io
- IP Address and Country: myip.com/api-docs
- Estimate Nation from Name: myip.com/api-docs
- QR Code generator: qrtag.net/api/qr_10.png?url=https://www.qrt..
- Email Authentication: eva.pingutil.com
- Excuses for every ocassion: excuser.herokuapp.com
- Check Noreis Jokes API: api.chucknorris.io
- Random Useless facts: uselessfacts.jsph.pl
- Tech Sounding Phrases: techy-api.vercel.app
- Random Pictures of Coffee: coffee.alexflipnote.dev
- Data About All Kinds of Fruits: fruityvice.com
- Random Pictures of Food Dishs: foodish-api.herokuapp.com
- Ip Locator: abstractapi.com/api/ip-geolocation-api
- Countries API: restcountries.com
- Programming Quotes: programming-quotes-api.herokuapp.com/index...
- Official NASA API: api.nasa.gov
- Random Person Face API: thispersondoesnotexist.com
- API of Ice And Fire: anapioficeandfire.com
- Game Of Thrones Quotes API: gameofthronesquotes.xyz
- Harry Potter API: hp-api.herokuapp.com
- Movie Quotes API: movie-quote-api.herokuapp.com
Conclusion:
So Hope that taught you something new today. If you have any queries or issues, please feel free to reach out. I am always available on twitter and mail. Feel free to check out my projects on GitHub and check this article out on my own blogging platform I made here.
Stats:
- Time Spent Writing: 42minutes
- Music Playing: Lofi Girl
- Platform Used: Hashnode, TheNooblog
- Level: Beginner to Moderate