Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use to Google Dictionary as an API? [closed]

Because the Google Dictionary API is deprecated (e.g., following)

http://www.google.com/dictionary/json?callback=a&sl=en&tl=en&q=love 

and has been replaced with define (e.g., following)

https://www.google.com/#q=define+love 

Does anybody know how to use/invoke the "Google define" API in java?

Here is the chrome extension which does similar thing.

https://chrome.google.com/webstore/detail/google-dictionary-by-goog/mgijmajocgfcbeboacabfgobmjgjcoja 

As an alternative, are there any open source dictionary APIs? I found Oxford (OED), Cambridge, Merriam-Webster, Wordnik APIs which provide APIs in subscription models.

Also found Wordnet 3.1 which is pretty old. Not sure if it being updated or not.

like image 323
zack0438 Avatar asked Mar 30 '14 05:03

zack0438


People also ask

Does Google Dictionary have an API?

Google does not provide API for Google Dictionary.

Is there an API for dictionary?

The Merriam-Webster Dictionary API gives developers access to a comprehensive resource of dictionary and thesaurus content as well as specialized medical, Spanish, ESL, and student-friendly vocabulary.

Is Oxford API free?

Free, immediate accessFor the first time, we're offering you free, self-service access to our dictionary data so you can quickly and easily incorporate our lexical data in your apps via one single API.


1 Answers

Unfortunately, like others have said, the Google Dictionary API is deprecated.

As I needed a Google Dictionary API for my project, I decided to create one.

I scraped the web page for the URL https://www.google.com/#q=define+term where term is any word you want to get meaning of, and created the API. You can find it here.

How to use

The basic syntax of a URL request to the API is shown below:

https://api.dictionaryapi.dev/api/v2/entries/<--language_code-->/<--word-->

As an example, to get definition of English word hello, you can send request to:

https://api.dictionaryapi.dev/api/v2/entries/en/hello

The API also provides other meanings of the word, example sentences, and synonyms, if any.

If you want me to include any other details, please comment and I will happily extend the API to cover your needs.

The source code is on GitHub.

like image 159
Suraj Jain Avatar answered Oct 07 '22 02:10

Suraj Jain