Google Dictionary API
Google does not provide API for Google Dictionary.
Getting Started
Simply install package with
npm i google-dictionary-api
const googleDictionaryApi = require("google-dictionary-api")
googleDictionaryApi.search('price', 'en')
.then(results=>{
console.log(results)
})
.catch(error=>{
console.log(error)
})
Language is optional, if you don't pass, it'll take english by default
[
{
"word": "price",
"phonetic": "/prʌɪs/",
"origin": "Middle English the noun from Old French pris, from Latin pretium ‘value, reward’; the verb, a variant (by assimilation to the noun) of earlier prise ‘estimate the value of’ (see prize). Compare with praise.",
"meaning": {
"noun": [
{
"definition": "The amount of money expected, required, or given in payment for something.",
"example": "land could be sold for a high price",
"synonyms": [
"cost",
"asking price",
"selling price",
"charge",
"fee",
"terms",
"payment",
"rate",
"fare",
"levy",
"toll",
"amount",
"sum",
"total",
"figure"
]
},
{
"definition": "An unwelcome experience or action undergone or done as a condition of achieving an objective.",
"example": "the price of their success was an entire day spent in discussion",
"synonyms": [
"consequence",
"result",
"cost",
"toll",
"penalty",
"sacrifice",
"forfeit",
"forfeiture"
]
}
],
"verb": [
{
"definition": "Decide the amount required as payment for (something offered for sale)",
"example": "the watches are priced at £55",
"synonyms": [
"fix the price of",
"set the price of",
"put a price on",
"cost",
"value",
"rate",
"evaluate",
"assess",
"estimate",
"appraise",
"assay"
]
},
{
"definition": "Discover or establish the price of (something for sale)."
}
]
}
}
]
For more reference, please visit https://github.com/meetDeveloper/googleDictionaryAPI