This site is open source!
Run your own kish.cm style URL shortener. Fork it on github!


API Acess:

To shorten a link:
POST request to: http://kish.cm/rpc/setLink
With a single variable "originalURL":

curl -d "originalURL=http://kishcom.com" http://kish.cm/rpc/setLink

You'll get a JSON object back that looks like this:
{
"shortenError": false, //A string if there was a problem
"alreadyShortened": true, //Did someone else shorten this URL already?
"originalURL": "http://kishcom.com", //URL to be shortened
"shortenedURL": "http://kish.cm/4w5c9g" //Full kish.cm shortened URL
}

To get information about a link already shortened with kish.cm:
POST request to: http://kish.cm/rpc/getLink
With a single variable "shortenedURL" with either the hash or the full URL:

curl -d "shortenedURL=http://kish.cm/rbv28w" http://kish.cm/rpc/getLink
curl -d "shortenedURL=rbv28w" http://kish.cm/rpc/getLink

You'll get a JSON object back that looks like this:
{
"originalURL": "http://google.com", //Where the short url redirects to
"linkHash": "rbv28w", //kish.cm url hash
"timesUsed": 3, //Times this kish.cm url has been used
"lastUse": 2012-02-20T10:48:26.000Z, //Last time this URL was used
"dateShortened": 2012-02-19T02:48:26.000Z, //Date this URL was shortened
"topReferrals":[ //Up to 10 of the top referrers
{"referrer": "", "referrerCount": 22},
{"referrer": "http://someurl.com/", "referrerCount": 11},
{"referrer": "http://someotherurl.com/", "referrerCount": 8}
],
"topUserAgents":[ //Up to 10 of the top full user agents
{"useragent": "Mozilla", "agentCount": 22},
{"useragent": "IE", "agentCount": 12},
{"useragent": "Opera", "agentCount": 1}
],
"error": false //Error messages will be a string instead of false
}