Does anyone know of a webservice for looking up definitions of words that would be able to return results in JSON?

StackOverflow https://stackoverflow.com/questions/1424421

Question

I found http://words.bighugelabs.com/api.php but nothing like this for definitions/dictionary.

Ideally I'd grab a dictionary file and build my own API for this, but this is for a demo and we need something short-term that can be called from within a javascript function.

Was it helpful?

Solution

wiktionary.org provides an API for example:

http://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=Television&format=json

gives back

    {
       "query": {"searchinfo": {"totalhits": 208862},
       "search": [{ 
           "ns": 0, 
           "title": "Television", 
           "snippet": "<span class='searchmatch'>Television<\/span> (TV) is a widely used telecommunication  medium  for transmitting and receiving moving images , either monochromatic  (\"black  <b>...<\/b> ",
           "size": 28228, 
           "wordcount": 3566, 
           "timestamp": "2009-10-02T15:09:56Z"},
...
       ]},
       "query-continue": {"search": {"sroffset":10}}
    }

OTHER TIPS

I think this is what you are looking for

Not sure if it would fit your needs, but answers.com has webmaster tools that offer various services, including dictionary lookup. Don't know if any can be called from javascript.

At short notice you could set up a reverse-proxy on your server that lets you AJAX your favorite dictionary website and then 'scrape' the definitions from the document that is returned. It's obviously not a long term solution but for a one time thing, you probably won't get into trouble.

This is a web service and have several dictionaries:

http://services.aonaware.com/DictService/DictService.asmx

P.S. I did not notice the JSON part of your question.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top