YouTube video URL:

TwTube Api

TwTube has a very simple rest api.
To shorten a YouTube video URL, just call
The response will be something like .
That is all.

You can alos use it with javascript, just add a callback parameter.

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