YouTube video URL:
example: http://www.youtube.com/watch?v=ddO9idmax0o
RankSider

TwTube Api

TwTube has a very simple rest api.
To shorten a YouTube video URL, just call http://twtu.be/?url=http://www.youtube.com/watch?v=ddO9idmax0o
The response will be something like http://twtu.be/ddO9idmax0o .
That is all.

You can alos use it with javascript, just add a callback parameter.
example: http://twtu.be/?url=http://www.youtube.com/watch?v=ddO9idmax0o&callback=myfunc.

There is only one error code: 400 - Bad request, if you don't provide a valid YouTube URL.