1 Simple Step to Effortlessly Convert Long URLs to Shortened Links

In this tutorial, we will learn how to convert long URLs to Shortened Links Easily.

1 Simple Step to Effortlessly Convert Long URLs to Shortened Links

Problem Statement: The problem was that we had a long URL in the email body and it was not looking good and the content in the email was not understandable and not in a readable format.

How to Easily Convert Long URLs to Shortened Links: A Step-by-Step Guide

Solution:

We are using the tinyurl API to resolve this issue.

History About Tiny URL

TinyURL™ was created when our founder, Kevin Gilbertson, ran into issues sending long links from his unicycling website to email subscribers. When sending a link that was over 80 characters, links would commonly break and not be clickable or end up sending users to 404 pages.

After a long ride on his unicycle pondering his link problems, Kevin had a big idea: What if there was a way to make those long links, well, tinier?

Thus TinyURL™ was born the internet’s original link shortener. Since early 2002, Kevin has shared his tool with millions of people to help them shorten their links with reliable, and tiny URLs.

Now, TinyURL is offering users a full-scale link management platform that gives businesses with big ideas the power of shortened links. With a TinyURL premium account, users can create, manage, track, and grow their brands through link campaigns of all sizes.

NOTE: All the above content is picked from the tinyurl.com website. and That content Does not belong to us.

Working with API

We are using an API that helps us to convert the Long URLs to shortened ones.

API:

curl 'http://tinyurl.com/api-create.php?url=some-long-url'

Example:

I have a requirement to make a tiny URL and to make this I used the below command:

URL required to short:

https://docs.google.com/forms/d/e/1FAIpQLSc9Iar8f954etjh8vbUQIZoQW8qegsZYCMjt_BV_fWobu_Jsw/formResponse

Command Triggered:

curl 'http://tinyurl.com/api-create.php?url=https://docs.google.com/forms/d/e/1FAIpQLSc9Iar8f954etjh8vbUQIZoQW8qegsZYCMjt_BV_fWobu_Jsw/formResponse'

After running the above command we get the following output where we received a short url like below.

Output:

https://tinyurl.com/2q77tm5u

image 1

So, in this tutorial, we have illustrated How to Easily Convert Long URLs to Shortened Links: A Step-by-Step Guide. Moreover, we have also discussed how we can use the API to Shortened Links.

Read some more tutorials related to Python.

Python Tkinter temperature converter

Python Tkinter Todo List

Python Tkinter Simple Calculator

Stone Paper Scissor using Python Tkinter

Python Tkinter Color Game

Python Tkinter Instagram User Detail

Github User Name: PythonT-Point

34 thoughts on “1 Simple Step to Effortlessly Convert Long URLs to Shortened Links”

  1. This is the perfect web site for anyone who would
    like to understand this topic. You know a whole lot its almost hard to argue with you (not that I personally
    would want to…HaHa). You certainly put a new spin on a subject that’s been discussed for decades.

    Wonderful stuff, just excellent!

    Reply

Leave a Comment