Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

google-dictionary-api

1.0.8 • Public • Published

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

Install

npm i google-dictionary-api

DownloadsWeekly Downloads

15

Version

1.0.8

License

ISC

Unpacked Size

62.4 kB

Total Files

12

Last publish

Collaborators

  • avatar