cambridge-dictionary-api
Version:
API for Cambridge Dictionary
76 lines (62 loc) • 2.35 kB
Markdown
[](https://www.npmjs.com/package/cambridge-dictionary-api)
[](https://www.npmjs.com/package/cambridge-dictionary-api)
[](https://www.npmjs.com/package/cambridge-dictionary-api)
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.
```bash
npm install cambridge-dictionary-api
```
```ts
import { fetchDictionaryWord } from 'cambridge-dictionary-api';
const result = await fetchDictionaryWord('abandon');
console.log(result);
```
```json
{
"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"]
}
}
```
**Vladyslav Braslavskyi [GitHub](https://github.com/vlbras)**
Licensed under the MIT License - see the [LICENSE](LICENSE) file for details.