Yahoo BOSS keyword extraction API wrappers (JS/PHP)Thursday, November 13th, 2008 at 3:49 pm
One of my favourite “old school” Yahoo APIs is the term extractor which is a service that extracts relevant keywords from a text you give it.
Yahoo BOSS is now supporting this feature for indexed web sites. While you’d normally just get a list of sites with for example:
You can get the keywords for each of the pages returned by adding the (so far undocumented)
This can be pretty useful to get a list of keywords related to a certain term.
The PHP API wrapper
The PHP version takes three parameters: the mandatory
term to search for, an optional
callback method name to wrap around the JSON return value and an optional
format parameter that can be set to HTML to return an HTML list instead of a JSON object.
- Get keywords for “donkey” as HTML: bossterms.php?term=donkey&format=html
- Get keywords for “kitten” as JSON: bossterms.php?term=kitten
- Get keywords for “puppies” as JSON and call “bark”: bossterms.php?term=puppies&callback=bark
Get the lot
You can download the whole BOSS keyword API here. As always, it is BSD licensed, so go nuts using it :)