Tag Cloud Format


The 'tagcloud' format is an alternate output format available for the concept and category requests. Two other variants of the tag cloud format are the 'jsontagcloud' and 'javascripttagcloud' formats.

Below are parameters that can be included with the requests to configure the tag cloud output:

Name Value Required
(Yes/No)
Usage Notes
linkTarget String No The identifier of the window to open the cloud links into. Defaults to '_blank'.
linkBase String No The base part of the URL to use when building the cloud links. Currently defaults to 'http://delicious.com/tag/'
listClass String No The classname to use for the <ul> element in the output HTML. Defaults to 'tw-cloud'.
tagSizeClass String No The classname to use for the <li> element(s) in the output HTML. Defaults to 'size'.
fullDocument 'true' or 'false' No Toggles if a complete HTML document should be returned in the 'tagcloud' format response. Defaults to 'false'. The 'fullDocument' parameter does not apply to the 'javascripttagcloud' or 'jsontagcloud' formats.
withStyles 'true' or 'false' No Toggles if the CSS styling for the tag cloud should be included in the response. Defaults to 'false'.

Examples

http://api.semantichacker.com/TOKEN/concept?uri=http%3a%2f%2fwww.distrowatch.org&format=tagcloud

  <ul class="tw-cloud">
    <li class="size6">
      <a rel="tag" href="http://delicious.com/tag/ubuntu" target="_blank" title="ubuntu (1.000)"><span>ubuntu <em>(1.000)</em></span></a>
    </li>  
    <li class="size5">
      <a rel="tag" href="http://delicious.com/tag/distrowatch" target="_blank" title="distrowatch (0.829)"><span>distrowatch <em>(0.829)</em></span></a>
    </li>  
    <li class="size4">
      <a rel="tag" href="http://delicious.com/tag/linux" target="_blank" title="linux (0.478)"><span>linux <em>(0.478)</em></span></a>
    </li>  
  </ul>

http://api.semantichacker.com/TOKEN/concept?uri=http%3a%2f%2fwww.distrowatch.org&format=tagcloud&withStyles=true&fullDocument=true&listClass=twList&tagSizeClass=twTagSize

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
</head>
<body>
  <style>
    ul.twList { padding: 0; margin:0; }
    ul.twList li { display: inline; }
    ul.twList li a { text-decoration: none; }
    ul.twList li a span em { display: none; }
    li.twTagSize6 { font-size: 2.25em; }
    li.twTagSize5 { font-size: 2em; }
    li.twTagSize4 { font-size: 1.5em; }
    li.twTagSize3 { font-size: 1em; }
    li.twTagSize2 { font-size: 0.75em; }
    li.twTagSize1 { font-size: 0.625em; }
  </style>
  <ul class="twList">
    <li class="twTagSize6">
      <a rel="tag" href="http://delicious.com/tag/ubuntu" target="_blank" title="ubuntu (1.000)"><span>ubuntu <em>(1.000)</em></span></a>
    </li>  
    <li class="twTagSize5">
      <a rel="tag" href="http://delicious.com/tag/distrowatch" target="_blank" title="distrowatch (0.829)"><span>distrowatch <em>(0.829)</em></span></a>
    </li>  
    <li class="twTagSize4">
      <a rel="tag" href="http://delicious.com/tag/linux" target="_blank" title="linux (0.478)"><span>linux <em>(0.478)</em></span></a>
    </li>  
  </ul>
</body>
</html>