Google's URL Shortener API - the best?
Tuesday, 18 January 2011

The Google URL shortening service has to offer something extra if it is to capture the ground currently occupied by existing services. The new API might go someway to this end but is it as good as it could be?

 

Banner

 

Google has a finger in every pie you could imagine and the announcement of its URL shortening service  back in October 2010 came as no surprise - more surprising was the fact that it didn't have an API. Now it does.

Google claim that they have the best URL shortening service because it's fast, reliable and integrated with Google Safe Browsing. It also collects statistics for your links and creates QR bar codes. The last two should be enough to encourage you to at least checkout the new API.

 

urlshorten

The first thing to say is that if you are a heavy short URL user then you will have to pay Google for the service. However at the moment the free usage is very generous at 1,000,000 queries/day. You can use it without an API key but then the usage limits are much lower. You also need the API key if  you want to see traffic reports. The Google API console can be used to manage key access. For some actions you also need an auth token.

The API is based on REST and very easy to use.  You simply send an https post request to the server with the URL to be shortened in the body in JSON format. As the request is encrypted it is reasonably secure. The response is JSON formatted.  If you use an API key then the use of the shortened link will be displayed in the dashboard. If you use an auth token then the short URL will be unique to that user and show statistics in their dashboard. That is if you want to shorten a URL for another user you need their auth token.

As well as the basic shortening service you can also request that a short URL be expanded so that you can check its status without actually visiting the site. You can also retrieve the analytics for a shortened URL so that you can construct your own graphs etc.

One disappointment is that the API doesn't provided a way to retrieve the QR barcode corresponding to the short URL. This is a shame as programmatic access to the barcode would have opened up a range of interesting possibilities.

Perhaps it will be in version 1.5 if we ask for it in sufficient numbers.

More Information

The URL shortener  http://goo.gl/

The API http://code.google.com/apis/urlshortener/

 

Banner


CheckCell Detects Bugs In Spreadsheets
27/10/2014

A free Excel  plug-in that takes a new approach to automatically finding data errors in spreadsheets has been released. Rather than looking for errors in programs and formulas, CheckCel [ ... ]



Firefox OS Comes To Raspberry Pi
28/10/2014

Firefox OS hasn't taken over the world yet despite its promise. Now we have a small effort from Mozilla to make it run on one of the most successful budget devices in the world - the Raspberry Pi.


More News

Last Updated ( Tuesday, 18 January 2011 )
 
 

   
RSS feed of news items only
I Programmer News
Copyright © 2014 i-programmer.info. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.