Find keywords connected to a certain term with Yahoo BOSS

Retrieving keywords with JavaScript

Retrieving a bunch of keywords using JavaScript is pretty easy. All you need to do is include the bossterms.js script and call the BOSSTERMS.get() method.

The method takes two parameters: the mandatory term to search for and the name of a callback method. If there's no method defined, it'll just user alert().

The callback method retrieves a JSON object with three properties:

term
The term you searched for
keywords
The keywords returned as an array
html
An HTML list with the terms as list items

Example:

Source:

<div id="terms"></div>
<script type="text/javascript" src="bossterms.js"></script>
<script type="text/javascript">
function seed(o){
  var out = '<h2>Keywords for "donkey"</h2>' + o.html;
  document.getElementById('terms').innerHTML = out;
}
BOSSTERMS.get('donkeys',seed);
</script>

By default, the JavaScript uses my own application ID. Please get your own and override it with your own one using the following code:

BOSSTERMS.config.appID = your_app_id

Written by Chris Heilmann, powered by BOSS.

This is not an official Yahoo! site and not endorsed by the company.