Tools

API Development

Smal.ly API features:

  • Generate or get existing short URLs, with sequential or custom keyword
  • Get some statistics about your links: top clicked links, least clicked links, newest links
  • Output format: JSON, XML, or simple raw text

Usage

You need to send parameters to http://smal.ly/smally-api.php either via GET or POST. These parameters are:

  • A valid username
  • A valid password
  • The requested action: "shorturl" (get short URL for a link), "expand" (get long URL of a shorturl) or "stats" (get stats about your links)
    • With action = "shorturl":

      • the url to shorten
      • optional keyword for custom short URLs
      • output format: either "json", "xml" or "simple"

      With action = "expand":

      • the shorturl to expand (can be either 'abc' or 'http://site/abc')
      • output format: either "json", "xml" or "simple"

      With action = "stats":

      • the filter: either "top", "bottom" , "rand" or "last"
      • the limit (maximum number of links to return)
      • output format: either "json" or "xml"

      Sample return

      share shorten link

Bookmarklet

Smal.ly comes with two handy bookmarklets for easier link shortening.

  • The simple one generates a short URL from the page you are currently viewing.
  • The second one does the same but first asks for a custom URL keyword – if you enter none a random one will be picked.

The bookmarklets will take you to a page where you can easily edit or delete your brand new short URL.

There is also a Quick Share tool box to make posting to Twitter, Facebook or Friendfeed a snap.

If you want to share a description along with the link you're shortening, simply select text on the page you're viewing before clicking on your bookmarklet link

Simple bookmarklet

Click and drag the link to your toolbar: Shorten

Advanced bookmarklet (custom keyword)

Click and drag the link to your toolbar: Custom shorten

Twitter

Smal.ly offers you support for Tweetie 2

In Tweetie’s settings (accounts --> settings --> url shortening -->custom…), type or paste the following URL, replacing the text in all caps with your smal.ly username, and password (note: for this to work, you cannot have any characters in your username and/or password that are not letters or numbers):

A) Members access

http://smal.ly/smal-api.php?action=shorturl&url=%@&username=U&password=P&format=simple

URL code "U" and "P" deffinition:

  • U - your smal.ly username
  • P - your smal.ly password

Then just click Save and you are done.

B) Anonymous access

You can aslo use smal.ly API as anonymous service, so there is no need to include the &username and &password portions.

http://smal.ly/smal_ano-api.php?action=shorturl&url=%@&format=simple

Wordpress Plugin

Smal.ly Wordpress plugin features:

  • Generate short URLs for each new post or page
  • Send a tweet on your Twitter account with the post title and short URL as you publish them

Download plugin - currently under development