Zi.pe: url shortener - shorten your url

Zi.pe! - Short Url API - Shorten Url API

Zi.pe! has a very simple API (Application Programming Interface). You simply point to the URL you would like to be shortened as a parameter.



Submitting a URL to be shortened.

Your application should access our API URL via an HTTP GET request: http://zi.pe/api.php?url=http://www.alonglink.com The "http://www.alonglink.com" in the example should be replaced with the URL you wish to shorten. The http:// is not required (if you don't include it, the HTTP will be added automatically).

Special Characters / Encoding

Some special characters in the URL you send may not be able to be stored correctly unless they are encoded before you send them. Many languages have the ability to do this. Replace these special characters: Plus sign (use %2B) Hash-sign (use %23), semicolon (use %3B). An simple way to do this is to run URLs through the Javascript function encodeURIComponent() before submission. This should avoid many encoding issues since we use the same method the Zi.pe! bookmarklet.

Getting the Shortened URL

After submitting the URL to be shortened, an HTTP response (a rendered web page) will be displayed. The server response will be "HTTP/1.1 200 OK" if the process was successful, or "HTTP/1.1 500 Internal Server Error" if there was an problem with the process. If the request was successful, the response will contain the new shortened URL in plain text. If the request was unsuccessful, the page will display an error message. These always begin with "Error: " followed by a message describing the error.

Retrieving an original URL from a shortened URL

To get the origional long URL, simple add a dash "-" to the end of the shortened URL. EG: http://zi.pe/bu-






Create a Zi.pe! URL with one click: Zi.pe! Bookmarklet (Drag it to your browser toolbar)