For each request a different two word phrase, or slug line, is generated. The words are chosen randomly from Princeton University's WordNet database. Dictionary definitions are powered by DuckDuckGo. Individual definition sources are attributed within definition popups.

A url parameter of ?mode=alliteration will make TwoSlug generate slug lines that begin with the same character. Further, url parameters can be used to provide seed values to the random number generator. Parameters of oct, int, hex will set the seed from a value in base 8, 10 and 16. The parameters seed and hash are synonyms for int and hex respectively.

TwoSlug also has an API for requesting your own random slug lines. The API root is:

http://twoslug.aaroniles.net/api/

Each path segment beyond the API root requests an additional random word by word class. The following classes are supported.

  • verb for an English verb.
  • noun for an English noun.
  • adj for an English adjective.
  • adv for an English adverb.

Return values are JSON objects with a single key slugline. The slugline value is a list of objects for each word in the slug line. These objects have two keys, class and word for the word class and chosen word respectively.

{
  "slugline": [
    {
      "class": "verb",
      "word": "rebuild"
    },
    {
      "class": "noun",
      "word": "stearin"
    }
  ]
}

The sluglines generated for the main page are a verb followed by a noun. This is equivalent to requesting http://twoslug.aaroniles.net/api/verb/noun