NiceURL

niceURL.me API

api.nice

A request to this API method will return the niceURL of the URL provided through the `url` query string variable. The provided URL should be in urlencoded form

Request example: GET http://nurl.me/api.nice.php?url=tataencu.com
Response: http://nurl.me/10n

If the request FAILS you will receive a HTTP/1.0 400 Bad Request header and an empty body.

api.nice.json

This does the exact same thing as the api.nice method but it uses JSON for formatting the output.

Request example: GET http://nurl.me/api.nice.json.php?url=tataencu.com
Response: {"ok":true,"url":"http:\/\/nurl.me\/10n"}

If the request FAILS there you will receive a HTTP 400 error code as well as the following JSON: {"ok":false,"url":""}

In order to make integration in JavaScript a lot easier this method also accepts as second parameter, `callback`, whichi should be the function which will be executed with the JSON response as it's parameter

api.ugly

A request to this API method will return the original URL used to create the niceURL provided through the `url` query string variable. The provided URL should be in urlencoded form

Request example: GET http://nurl.me/api.ugly.php?url=nurl.me/10n
Response: http://tataencu.com

If the request FAILS you will receive a HTTP/1.0 400 Bad Request header and an empty body.

api.ugly.json

This does the exact same thing as the api.ugly method but it uses JSON for formatting the output.

Request example: GET http://nurl.me/api.nice.json.php?url=nurl.me/10n
Response: {"ok":true,"url":"http:\/\/tataencu.com"}

If the request FAILS there you will receive a HTTP 400 error code as well as the following JSON: {"ok":false,"url":""}

In order to make integration in JavaScript a lot easier this method also accepts as second parameter, `callback`, whichi should be the function which will be executed with the JSON response as it's parameter


Home | API