Member-only story
URL Shortener using Python
We will discuss and learn how to use various Python APIs to shorten URLs with only a few lines of code.
Hello Readers! So, you would have seen short URLs used in various places (social media, websites, messaging platforms etc.). Short URLs are easy to remember or type, so they are very popular. No one loves long URLs and so the need to shorten lengthy URLs often comes to us.
You would have personally used various URL shortening services online, and they all do the job well! Even Google forms, LinkedIn etc., shortens the URLs for ease of use. So, it is a widely used thing on the internet.
So, have you ever thought of or tried to make your own URL shortener? Hopefully, there are many libraries and APIs available to help us do the same programmatically without the need to visit any website and use anyone’s service.
We can write a program in Python language for our needs. Then we can give a long URL as the input, and we would get short URLs as output, that too in very few lines of code. Is not it exciting? Using various APIs does it very easily without digging into complex topics.
So there are various APIs available for doing this job, so let’s have a look at some of the APIs and let’s implement them and see how we can use them to…