Skip to content
A Ruby gem that connects to various URL shortening services like RubyURL, moourl, etc.
Find file
New pull request


ShortURL 1.0.0


ShortURL is a very simple library to use URL shortening services.


ShortURL is available as a gem, installation is just like any other gem: $ gem install shorturl

You can also download the tar.bz2 archive at if you do not want to use the gem.

Supported services

Here is the list of the services supported by ShortURL:



require "shorturl"
puts ShortURL.shorten("")
puts ShortURL.shorten("", :moourl)

The second parameter represents the service you want to use. These are:

  • :tinyurl

  • :shorl

  • :snipurl

  • :metamark

  • :makeashorterlink

  • :skinnylink

  • :linktrim

  • :shorterlink

  • :minlink

  • :lns

  • :fyad

  • :d62

  • :littlink

  • :clipurl

  • :orz

  • :moourl

  • :urltea

  • :vurl

  • :bitly**

You can use ShortURL.valid_services to obtain a list of the valid services (in case I forget to update the documentation)


Their API changed to require an API key.

Two painfree steps to fix this.

1) Get yours easily right now from:

2) Save it in ~/.shorturl similar to this YAML template:

— Start of file ~/.shorturl —

  username: O_adsfasdfasfasfd
  key: R_afasdfasdfasdf

— END of file ~/.shorturl —

You're done!  Have a martini.  Cheers.


  • Marcel Molina Jr., Devin Mullins for some ideas

  • imperator from #ruby-lang (I don't know your real name, sorry) for helping me with creating and uploading a RubyGem

  • Daniel Dipaolo for telling me about and


  • Vincent Foley (original developer)

  • Robby Russell <>

Something went wrong with that request. Please try again.