D2
This website uses cookies even from third parties. If you proceed you agree to our privacy policy | X

Urly

APIs

Updating from API version 1

API version 1 is now deprecated, but it's still available. API version 1 returned the ID of the short link (e.g. 2t5k). API version 2 now returns the whole short link (e.g. http://urly.it/2t5k).

Urly APIs version 2

It is possible to interface Urly with other services and applications using the following API set. You'll need a secret API key that you can request for free, contact us.

In order to create a shortened link, you have to supply the following URL: http://urly.it/api.php?apiv=2&apik=KEY&url=ADDRESS in which KEY is your own secret key and ADDRESS is the original long URL that you want to shorten (the leading http:// in the URL to be shortened isn't mandatory).

The output is served in plain text (text/plain) and it's the shortened link URL. For example:
http://urly.it/2t5k
An error code is preceded by the underscore symbol _ and can be one of the following list:

_NO_API_KEYYou didn't pass your secret key using apik=KEY.
_BANNED_API_KEYThe key you passed doesn't exist or it was banned from Urly.
_NO_API_VERSIONYou didn't pass the API version using apiv=1.
_UPDATE_APIThe API version you're using is not available anymore. You need to update your application.
_NO_URL You didn't pass any URL to shorten.
_INVALID_URLYou passed a wrong or malformed URL.
_ANTIFLOOD_WAITYour application's user must wait some seconds before creating another link.
_INVALID_IPOur servers could not detect the user's IP address. The link can't be shortened for security reasons.
_INTERNAL_ERRORGeneric internal error. We couldn't shorten your link.
How does it work? APIs Contacts Terms of Service
EnglishItalianoEspaƱol