JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4
  • Score
    100M100P100Q40044F
  • License MIT

API for Cambridge Dictionary

Package Exports

  • cambridge-dictionary-api
  • cambridge-dictionary-api/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cambridge-dictionary-api) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

cambridge-dictionary-api

npm license npm downloads

Description

A powerful yet lightweight Node.js package for fetching word definitions, pronunciations and usage examples from the Cambridge Dictionary. Perfect for language learning apps, AI-driven assistants, and NLP projects.

Installation

npm install cambridge-dictionary-api

Usage

import { fetchDictionaryWord } from 'cambridge-dictionary-api';

const result = await fetchDictionaryWord('abandon');
console.log(result);

📖 Example

{
  "word": "abandon",
  "dialects": {
    "us": {
      "audio": "https://dictionary.cambridge.org/us/media/english/us_pron/a/aba/aband/abandon.mp3",
      "phonetic": "/əˈbæn.dən/"
    },
    "uk": {
      "audio": "https://dictionary.cambridge.org/us/media/english/uk_pron/u/uka/uka__/uka____013.mp3",
      "phonetic": "/əˈbæn.dən/"
    }
  },
  "definitions": [
    {
      "definition": "to leave a place, thing, or person, usually forever:",
      "partOfSpeech": "verb",
      "level": "B2",
      "examples": [
        "We had to abandon the car.",
        "By the time the rebel troops arrived, the village had already been abandoned.",
        "As a baby he was abandoned by his mother.",
        "We were sinking fast, and the captain gave the order to abandon ship."
      ]
    },
    {
      "definition": "to stop doing an activity before you have finished it:",
      "partOfSpeech": "verb",
      "level": "C1",
      "examples": [
        "The game was abandoned at halftime because of the poor weather conditions.",
        "They had to abandon their attempt to climb the mountain.",
        "The party has now abandoned its policy of unilateral disarmament."
      ]
    }
  ],
  "derivedForms": {
    "noun": ["abandonment"]
  }
}

Author

Vladyslav Braslavskyi GitHub

License

Licensed under the MIT License - see the LICENSE file for details.