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?
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.
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.
The URL shortener http://goo.gl/
The API http://code.google.com/apis/urlshortener/