API

Welcome to gkurl.us. Create an Account or Login with Facebook or Twitter to continue.

Twitter icon
Facebook icon
Google+ icon

SHORTENING A URL:
-------------------------------
Default format is JSON:
http://gkurl.us/shurly/api/shorten?longUrl=http://www.lullabot.com

Text format returns just the short URL:
http://gkurl.us/shurly/api/shorten?longUrl=http://www.lullabot.com&format=txt

XML format:
http://gkurl.us/shurly/api/shorten?longUrl=http://www.lullabot.com&format=xml

PHP serialized array:
http://gkurl.us/shurly/api/shorten?longUrl=http://www.lullabot.com&format=php

JSONP takes (optional) additional "callback" argument to define function:
http://gkurl.us/shurly/api/shorten?longUrl=http://www.lullabot.com&format=jsonp&callback=gimmeUrl

API Keys:
Users can create API keys and use them to associate a shortening request with their account. Additionally, their roles will be honored and the associated rate limiting will be used.
http://gkurl.us/shurly/api/shorten?longUrl=http://www.lullabot.com&apiKey=84a29ac36f0507b7b98672a9d13a2e46_A

Additionally, a user's API key can be retrieved programmatically if the browser is logged in.
http://gkurl.us/shurly/api/key

EXPANDING A URL:
-------------------------------
Works just as above, but returns expanded URL. All formats above are supported.
Here, the API key only modifies rate limiting.

http://gkurl.us/shurly/api/expand?shortUrl=http://gkurl.us/Zk5

BACK SUPPORT:
-------------------------------
gkurl.us supports the old API.php schema, but custom URLS are not supported.

Example:
http://gkurl.us/api.php?action=shorturl&format=simple&url=http://twitter.com

This will return the short URL only (Like the text mode above.)

Note: this is deprecated, and will not return custom URLS, titles, or any other format other than "simple"

Bookmarklet

Drag this link to your bookmark bar to quickly create a short URL from any page: gkurl.us