Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
  • Shortened URL with Bitly API and jQuery

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 1.33k
    Comment on it

    Hello Readers,


    Bitly API is a way to shrink  long URLs so that we can share it on social media. For example on twitter we can't share long URL so it is a very easy way to shorten long URLs. The most important thing is no server side code required.


    To use API first of all we need to create an account and logged in on bitly.


    To signup / login click here -


    Here is the example to shrink URLs using API:


        var bitlyData = {};
        bitlyData['login'] = login;
        bitlyData['apiKey'] = api key;
        bitlyData['longUrl'] = your long url;
        bitlyData['format'] = "json";
            url: '',
            data: bitlyData,
            success: function (data){
            error: function(e) {


    In the above example, To  get the values of login, apiKey click here - get your api key and the longUrl is url which you want to shink.


    Hope this will help you :)

 0 Comment(s)

Sign In

Sign up using

Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: