API (Application Programming Interface)

You have permission to create programs that automatically generate lilurl.com urls using our API.


Requests

Send a GET request using the following url format:
http://api.lilurl.com/?url=TARGET-URL-HERE
or
http://api.lilurl.com/?name=CUSTOM-NAME-HERE&url=TARGET-URL-HERE
- the 'name' parameter is optional
- parameter values must be url encoded


Responses

The response will be your new lil urls (one per line) eg:
http://lilurl.com/abc
http://ilik.es/abc
http://idislik.es/abc
http://captchaurl.com/def

If there was a problem, the response codes can be one of the following:
ERR:01:You forgot to provide a url.
ERR:02:The url you entered is too long (max 5000 characters)
ERR:03:Please enter a valid url
ERR:04:The domain you entered is not permitted
ERR:05:You cannot shorten the url of another url shortening service
ERR:06:Your custom url name should not have spaces in it
ERR:07:That name is already taken, please try another one
ERR:08:Something went wrong, please try again in 2 minutes
ERR:09:We're doing some server maintenance. Please try again in 2 minutes

Example

Send the following GET request:
http://api.lilurl.com/?name=Spam%20Score%20Checker&url=http%3A%2F%2Fwww.google.com%2F%3Fq%3DSpam%20Score%20Checker

Then receive the following response:
http://lilurl.com/Spam%20Score%20Checker
http://ilik.es/Spam%20Score%20Checker
http://idislik.es/Spam%20Score%20Checker


Download sample php file