API
This site sports a very simple API for retrieving the synonyms for any word. You can access the API by making a GET request to the following URL:
http://words.bighugelabs.com/api/{version}/{api key}/{word}/{format}
Arguments
- version
- 2
- api key
- Your API key.
- word
- The word you want to lookup.
- format (optional)
- json, php, xml. If left off then the response defaults to newline delimited plain text.
- JSON callback function (optional)
- See examples below
Response
The response is always an array. 'xml' and 'json' should be
self-explanatory. The 'php' format is a serialized PHP array that can be
unserialized with the unserialize() function. The plain text
response is pipe and newline delimited.
Examples
There are two versions of the API as of April 2008.
Version 2 provides a richer set of data including part of speech and relationship to the requested word:
- http://words.bighugelabs.com/api/2/your-api-key/love/
- http://words.bighugelabs.com/api/2/your-api-key/love/xml
- http://words.bighugelabs.com/api/2/your-api-key/love/json
- http://words.bighugelabs.com/api/2/your-api-key/love/json?callback=my_callback_function
- http://words.bighugelabs.com/api/2/your-api-key/love/php
Relationship types are "syn" for synonyms, "ant" for antonyms, "rel" for related terms, "sim" for similar terms, and "usr" for user suggestions. Not all parts of speech or relationship types are guaranteed to be available for all words so test for their existence before using them.
Version 1 provides very simple output and is deprecated.
- http://words.bighugelabs.com/api/1/your-api-key/love/
- http://words.bighugelabs.com/api/1/your-api-key/love/xml
- http://words.bighugelabs.com/api/1/your-api-key/love/json
- http://words.bighugelabs.com/api/1/your-api-key/love/json?callback=my_callback_function
- http://words.bighugelabs.com/api/1/your-api-key/love/php
You can also view a sample administration page that comes with every API key: Sample admin page
HTTP Response Codes
200 OK: The word was found and the results are in the body.
303 {alternate}: The original word was not found but an alternative has been. The alternative is the HTTP response message. For example, a request for "reminding" returns 303 remind. The Location header contains the URL for the API request for "remind."
404 Not Found: No data could be found for the word or alternates.
500 Usage Exceeded: Usage limits have been exceeded.
500 Inactive key: The key is not active.
Terms of use
- You may use the service for any purpose so long as you link to this site in your website or application credits as follows: Thesaurus service provided by words.bighugelabs.com
- THE SERVICE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. The entire risk as to the quality and performance of the service is with you. Should the service prove defective, you assume the cost of all necessary servicing, repair or correction.
- Old versions of the service will probably remain available indefinitely even after new versions are released. It's possible old versions will be retired if there is a good reason to do so. I don't know what will happen if I decide to expire an old API version (it's never happened yet). It's likely it would start returning responses with a message to upgrade.