Provide Short URLs Exclusive For Your Business With Prompt API

Ali Sozkesen
Ali Sozkesen 22 December 2020
Author:

Have you ever tried to share a URL to a social media site or an email on a platform where people can see it and were disappointed with how long the link was or even contains complex numbers? It is time to overcome this problem and learn more about PrompAPI's Url Shortener tool. So let's get started.

url shortener api by prompt api

What is URL Shortener?

URL shortener, as the name suggests, is a method for shortening the URLs of your pages. URL shortener tools take your url and link it with the shortened url, make sharing long links more manageable. You can also customize shortened urls with your own branding.

What are the Benefits of URL Shortener?

The link shortener tools have very important advantages. Here are some of them:

  • One of the most important reasons for website owners who use these tools is visuality. In other words, instead of long URLs, short links that you can put in your articles will also enhance the appearance of your content.
  • Especially, the character limit of the content you share on Twitter is short despite the updates. In other words, while you are trying to attract visitors to your site with a few impressive sentences, long links prevent this work. By shortening your links, you can strengthen your content.
  • URL shorteners can also give you information about who is clicking on your links, from where and when. Keeping track of this information is a good way to increase the visitors to your site​. ​Monitoring the effectiveness of your links is in many cases the most important reason for using an URL Shortener. Most of them track especially the following values: the number of clicks, time and date, device types and browsers used, location and language, etc. In fact, the collected data is partly similar to tools like Google Analytics. This data about your clicks is extremely helpful when it comes to analyzing the effectiveness of your content. It’s crucial to measure the effectiveness of your social media posts.
  • Shortened URLs create variations of a single link so you can easily track traffic. For example, You can create different short links for Twitter, different one for Facebook, different one for Instagram and customize the tracking.

Except those, although the companies that provide these services are very large, problems on these sites will make your links invalid. You should be very careful and work with good services. In order to avoid a problem like this, let's talk about why we should use the Url Shortener tool provided by Prompt API and how to use it.

Some Popular URL Shortener Services

Bitly

Bitly’s analytics package provides almost everything you would want for link tracking. The app collects over 20 data points with every click, from geographic data down to the local city level to referral channels to device type. You can track links individually.

Bitly price:​ ​Free plan available; paid plan from $35/month

For more information click here

ReBrandly

While Rebrandly is a URL shortener much like any other, its appeal is slightly unique. Rebrandly believes that brands, whether it's a product or a person, get value out of customizing links to content that references them from all over the web.

ReBrandly price:​ ​Free plan available; paid plan from $29/month

For more information click here

Prompt API

The Prompt API Url Shortener service actually allows Bitly and ReBrandly services to do the work that they do separately, at a more affordable price than a single service. First of all, it provides a very strong monitoring environment for the shortened link created, and a response containing extensive information such as browser, country, city, region, device, operating system returns. In addition, it provides custom url shortener service with a special domain for your brand, allowing you to create custom url abbreviations for your brand. Finally, it has a very powerful and explanatory documentation and a mail service is available for support. It does all this with more affordable prices and flexible packages than the services that provide this service in the market.

Prompt API price: Free plan available; custom plan available; paid plans start from 9.99$/month

For Prompt API URL Shortener API Prices, please visit: https://promptapi.com/marketplace/description/short_url-api#pricing-tab​

Prompt API provides URL shortener service, allowing you to manage and monitor your url and create Custom Urls. It also offers powerful documentation support to help you discover all these features and more. Click here for documentation.

Let's make a small example by following this document.

Imagine you are a seller at “https://www.amazon.com/”. You wanted to advertise your best-selling or on-sale product on various social media sites. After many nice explanations to introduce your product, You do not want to add this type of url at the end of the descriptions in order not to spoil the readability and create a bad advertising visual:
https://www.amazon.com/Samsung-500GB-Internal-MZ-76E500B-AM/dp/B0781Z7Y3S/ref=zg_bs_1292116011_6?_encoding=UTF8&psc=1&refRID=P0NRB

At this point, we will create a short url using the Prompt API's URL Shortener tool.

Before using, we have to sign up the Prompt API and get API Key. After signing to the Prompt API, we can pass to the Url Shortener API page. We are selecting the Live Demo button to test.

how to use prompt api url shortener api - 1

After clicking the Live Demo button, we will see URL Shortener API Playground.

how to use prompt api url shortener api - 2
  1. We are making a POST request to the “/hash” method and pasting the amazon product url to the HTTP Body field. Then we press the Run Code button.
  2. After running the code, we are getting a result with three fields. “hash”is a unique code of the URL to manage and monitor, “long_url” is an existing url. and “short_url” is our new, simple and usable url
  3. After creating a short url, we are sending a GET request with hash number to the “stats/{hash}” method, where we will get information about this url.
how to use prompt api url shortener api - 3

After running the code, we will get a response from our URL as below.


    {
        "browser": {
          "family": {
            "Chrome": 1,
            "Firefox": 1,
            "Safari": 1
          },
          "version": {
            "14.0.2": 1,
            "84.0": 1,
            "87.0.4280": 1
          }
        },
        "country_code": {
          "TR": 3
        },
        "device": {
          "family": {
            "Mac": 3
          },
          "type": {
            "pc": 3
          }
        },
        "geo": {
          "city": {
            "Istanbul": 3
          },
          "country_name": {
            "Turkey": 3
          },
          "region": {
            "Istanbul": 3
          }
        },
        "language": {
          "en-US": 1,
          "en-us": 1,
          "tr-TR": 1
        },
        "os": {
          "family": {
            "Mac OS X": 3
          },
          "version": {
            "10.15.6": 1,
            "10.16": 1,
            "11.1.0": 1
          }
        }
      }

The data returned from this service provides us with very strong information about our URL. These data help us to take actions such as scaling our link, analyzing and determining the target audience. Thanks to these analyses, actions can be taken to ensure our url gets more traffic.

It is that simple to shorten your urls and collect detailed information from these urls with the Prompt API Url Shortener tool. Also, if you want to shorten the url for more than one products’ urls and see them all together, you can make a GET request to the "/hashes" method. You can also remove the URLs you want to remove by sending a DELETE request to the "hash/{hash}" method.

You can visit Prompt API Url Shortener API page for more information.
Share:
 
Ali Sozkesen
Written by

Ali Sozkesen

A marketing professional with software development skills.