The Thesaurus service provides a simple RESTful API to get synonyms of a given word in the context of a specific language. An application can retrieve the synonyms by using a HTTP GET. The service script can return results either using xml or json format.

Request url:
http://thesaurus.altervista.org/thesaurus/v1

Query Parameters

The following parameters are supported by the thesaurus Web service:

parameterdefaultdescription
key*String that uniquely identifies your application. The key is assigned by subscribing here
word*(urlencoded string)
language*it_IT, fr_FR, de_DE, en_US, el_GR, es_ES, de_DE, no_NO, pt_PT, ro_RO, ru_RU, sk_SK
outputxmlxml or json
callbackjavascript callback function (requires output=json)
*: mandatory parameter

Query parameters are preceded by a question mark ("?") and separated by ampersands ("&") and consist of the parameter name, an equals sign ("="), and a value.

Response content

The thesaurus Web service returns a sequence of elements list. Each list element contains a pair of elements: category and synonyms. The element synonyms contains a list of synonyms separated by the character |.
The detailed schema can be downloaded synonymResponse.xsd.

The query word=peace and language=en_US will return the following result:

xml output (test now: en_US, it_IT, fr_FR, es_ES)

<response>
<list><category>(noun)</category><synonyms>order|war (antonym)</synonyms></list>
<list><category>(noun)</category><synonyms>harmony|concord|concordance</synonyms></list>
<list><category>(noun)</category><synonyms>public security|security</synonyms></list>
<list><category>(noun)</category><synonyms>peace treaty|pacification|treaty|pact|accord</synonyms></list>
</response>

json output (test me!)

{"response":[{"list":{"category":"(noun)","synonyms":"order|war (antonym)"}},
{"list":{"category":"(noun)","synonyms":"harmony|concord|concordance"}},
{"list":{"category":"(noun)","synonyms":"public security|security"}},
{"list":{"category":"(noun)","synonyms":"peace treaty|pacification|treaty|pact|accord"}}]}


Error codes

The following error codes may be returned by the thesaurus Web service:

error codedescription
400 Bad RequestWrong/Missing parameter
403 ForbiddenYou do not have permission to access this resource, or are over your rate limit
404 Not FoundNo match found for given word
405 Method Not AllowedMethods PUT, DELETE, POST... are rejected. Only GET is allowed
Dictionary | Ocr Plugin | News reader | Terms and conditions | Privacy policy