Features:

  • very quick and simple set-up
  • redir.ec bookmarklet, simple drag it to your bookmarks to shorten URLs from anywhere
  • detailed stats page for short URLs (example)
  • simply send tweets directly from here
  • optional custom URLs
  • Firefox add-on to shorten directly via context menu and copy to clipboard
  • Wordpress Plugin - Shorten permalinks and tweet directly via redir.ec

Introduction to redic.ec API

Creating a short URL with redir.ec

redir.ec short URLs are created by using the URL (http://redir.ec/_api/rest/redirec/create).

There are four parameters (url, redirec, appid, apikey); the URL parameter (url) is compulsory.

Example of call containing all parameters: http://redir.ec/_api/rest/redirec/create?url=http%3A%2F%2Fwww.domain.de%2F%3Fugly%3Dparameter&redirec=my-custom-short-url&appid=my-application-name&apikey=1a1a1a1a1a1a1a1a If this call was successful, the following URL would be returned: http://redir.ec/my-custom-short-url
Example of call with minimal parameters: http://redir.ec/_api/rest/redirec/create?url=http%3A%2F%2Fwww.domain.de%2F%3Fugly%3Dparameter If this call was successful, the following URL would be returned: http://redir.ec/thDM

Parameters

url

The URL to be shortened. The parameter is required and must be URL-encoded.

Example of parameter value: http%3A%2F%2Fwww.domain.de%2F%3Fugly%3Dparameter http%3A%2F%2Fwww.foobar.de%2F
redirec

An optional custom URL name from redir.ec. If the parameter is not available, a random URL name will be created.

Examples of parameter value: my-custom-url new-spam-info
appid

An optional Application ID. This ID is saved in order to retrieve the service via which the redir.ec API was used. Using text and URL is possible with a URL-encoded parameter.

Examples of parameter value: my-application twitter tweetdeck My+tool+from+http%3A%2F%2Fwww.my-tool-box.de%2F
apikey

Your API key. If you add your API key to the API create request, the created short-URL will be added to your account. You will find your API key in your Profile.

Example of parameter value: 1a1a1a1a1a1a1a1a

Returns

Code 200

If the URL was created successfully, the server will deliver the standard HTTP status code 200 with the shortened URL.

Examples of returns: http://redir.ec/my-custom-url-name http://redir.ec/thDM
Code 404

If an error occurs, the server will deliver the code 404 with an explanation of the error situation.

Return in case of error: compulsory field "URL" not provided or empty. please provide a url to shorten
Return in case of error: compulsory field "URL" too short; must have at least 8 characters. please provide a longer url
Return in case of error: custom URL provided (redirec) contains forbidden characters. Allowed are A-Z, a-z, 0-9 and hyphen (-). your provided custom url name contains forbidden characters
Return in case of error: The custom URL provided (redirec) is already in use. your provided custom url name is already in use
Return in case of error: The URL provided is already a redir.ec URL. the url you provided is short enough

Expand shortened URL (expand)

Get the destination of an shortened URL.

Example of call: http://redir.ec/_api/rest/redirec/expand?redirec=http%3A%2F%2Fredir.ec%2Ftx0b If this call was successful, the following URL would be returned: http://translate.google.com/translate_t#en|de|Short%20this%20really%20long%20URL%20with%20redir.ec!

Parameters

redirec

The shortened URL, the parameter is required and must be URL-encoded.

Example of parameter value: http%3A%2F%2Fredir.ec%2Ftx0b tx0b

Returns

Code 200

If the shortened URL (redirec) exists, the server will deliver the standard HTTP status code 200 with the shortened URL.

Example of return: http://translate.google.com/translate_t#en|de|Short%20this%20really%20long%20URL%20with%20redir.ec!
Code 404

If an error occurs, the server will deliver the code 404 with an explanation of the error situation.

Return in case of error: redirec not valid or unknown

Tools

Browser Bookmarklet

Shorten with redir.ec

simple drag it to your bookmarks to shorten URLs from anywhere

redir.ec Email

Drag it to your bookmarks and on click the current URL will be shortened and copied to your email client

Firefox add-on

Shorten with redir.ec

to shorten directly via context menu and copy to clipboard

From Firefox 3.5 please use Shorten URL for now. (It's supporting redir.ec)

Or use Nadens Jetpack Plugin

redir.ec API

API Documentation

Useful functions for your application

Wordpress Plugin

Wordpress Plugin

Shorten permalinks and tweet directly via redir.ec

Top 10

Top redir.ecs

Top redir.ec targets ranked by clicks
  New: whitelabel service