Why not just follow redirects instead? All proper URL-shortening services would work no matter of API. And just add support for those that does it via IFRAME. much more convenient.
I've thought for some time that url shortening and expanding should be an RFC, done in the browser, the same across browsers.