The spreadsheet component of Google Docs provides some useful functions for importing web data into your online documents. For instance, you can use the importFeeds function to manipulate RSS in Google Docs while the importHTML function helps you fetch information from a live web page into Google Docs.
This Google Spreadsheet demonstrates how one can use these import functions in Google Docs to convert web addresses into tiny URLs on the fly. You may have to create a copy of this spreadsheet into your own Google Account for entering new data or for modifying the cell formulas.
Also check this tutorial on how to setup TinyURL like redirection service for your own website in two minutes using Google Apps.
This spreadsheet, written by bit.ly developers, makes a call to the bit.ly API as soon as a URL is entered by the user and displays the API response in the short URL column. Internally, it uses the importData function which is normally used to display CSV data in Google Docs.
Cell A1 (input field): User enters a URL
Cell B1 (result) =importData(concatenate(”http://api.bit.ly/shorten?longUrl=“,A1))
TinyURL vs. Bit.ly
TinyURL.com was initially the most popular URL shortening service on the web but that’s fast changing because the service didn’t really add anything new in the last so many years. On the other hand, bit.ly provides web statistics (so you can track clicks), has an API and users can create their own account on bit.ly (see example) to track their complete history of shortened links.
Maybe that explains why Twitter switched away from TinyURL and as a result, bit.ly recently managed to eclipse TinyURL and is now the most popular URL shortening service at least among the Twitter glitterati.