Inspired by freeDictionaryAPI
🏠 Homepage
✨ Demo
- More than 700k+ Definitions of word
- freedictionaryapi base on open source Wiktionary.
- It is a simple and easy to use API to get the definition of a word.
- It is a free and open source project.
npm install
npm start
https://api.freedictionary.dev/api/{version}/entries/en/{word}
interface IPhonetic {
ipa: string;
audio: string;
type: string;
}
interface IForm {
text: string;
type: string;
}
interface IAntonym {
text: string;
meaning: string
}
interface ISynonym {
text: string;
meaning: string
}
interface IMeaning {
definition: string;
examples: string[]
antonyms?: IAntonym[] | null;
synonyms?: ISynonym[] | null;
}
interface IWord {
word: string;
partOfSpeech: string;
phonetics?: IPhonetic[];
meanings: IMeaning[];
forms?: IForm[];
}
https://api.freedictionary.dev/api/v1/entries/en/go
You will get result
[
{
"word":"go",
"partOfSpeech":"verb",
"phonetics":[
{
"type":"uk",
"audio":"https://upload.wikimedia.org/wikipedia/commons/transcoded/e/ef/En-uk-to_go.ogg/En-uk-to_go.ogg.mp3",
"ipa":"/ɡəʊ/"
},
{
"type":"us",
"audio":"https://upload.wikimedia.org/wikipedia/commons/transcoded/0/0a/En-us-go.ogg/En-us-go.ogg.mp3",
"ipa":"/ɡoʊ/"
}
],
"forms":[
{
"text":"goes",
"type":"present singular third-person"
},
{
"text":"going",
"type":"participle present"
},
{
"text":"went",
"type":"past"
}
],
"meanings":[
{
"definition":"To move through space (especially to or through a place). (May be used of tangible things like people or cars, or intangible things like moods or information.)",
"examples":[
"She was so mad she wouldn't speak to me for quite a spell, but at last I coaxed her into going up to Miss Emmeline's room and fetching down a tintype of the missing Deacon man.",
],
"antonyms":[
{
"text":"freeze",
"meaning":""
},
{
"text":"halt",
"meaning":""
}
],
"synonyms":[
{
"text":"move",
"meaning":""
},
{
"text":"fare",
"meaning":""
}
]
}
]
}
]
https://api.freedictionary.dev/api/{version}/pronunciation/en/{word}
interface IPhonetic {
type: string;
audio: string;
}
interface IPronunciation {
word: string;
phonetics: IPhonetic[];
}
https://api.freedictionary.dev/api/v1/entries/en/go
You will get result
{
"word": "go",
"phonetics": [
{
"type": "uk",
"audio": "https://dictionary.cambridge.org/media/english/uk_pron/u/ukg/ukglu/ukglutt024.mp3"
},
{
"type": "us",
"audio": "https://dictionary.cambridge.org/media/english/us_pron/g/go_/go___/go.mp3"
},
{
"type": "uk",
"audio": "https://dictionary.cambridge.org/media/english/uk_pron/u/ukg/ukglu/ukglutt024.mp3"
},
{
"type": "us",
"audio": "https://dictionary.cambridge.org/media/english/us_pron/g/go_/go___/go.mp3"
}
]
}
If you are using linguarobot, create .env
and add linguarobot API key to it.
API_KEY=xxxxx
- Performance query
- Docs
- Refactor code
👤 ngocsangyem
- Website: https://www.ngocsangyem.dev/
- Twitter: @ngocsangyem
- Github: @ngocsangyem
- LinkedIn: @ngocsangyem
Contributions, issues and feature requests are welcome!
Feel free to check issues page. You can also take a look at the contributing guide.
Give a ⭐️ if this project helped you!
Copyright © 2022 ngocsangyem.
This project is MIT licensed.