There was no free Dictionary API on the web when I wanted one for my friend, so I created one.
This API uses Wiktionary as its data source via the Wiktionary REST API. Wiktionary is a free, collaboratively edited multilingual dictionary.
Dictionary definitions provided by this API are sourced from Wiktionary, a project of the Wikimedia Foundation.
The content from Wiktionary is available under the Creative Commons Attribution-ShareAlike 4.0 International License (CC-BY-SA 4.0).
If you use this API, you must:
- Provide attribution to Wiktionary as the source of the definitions
- Include a link to the CC-BY-SA 4.0 license
- If you modify the content, you must distribute your contributions under the same license
For individual word entries, the original contributors can be found in the page history at https://en.wiktionary.org/wiki/<word>.
The API usage has been ramping up rapidly, making it difficult for me to keep the server running due to increased AWS costs.
Your support directly helps the development of Dictionary API and keeps the server running.
The basic syntax of a URL request to the API is shown below:
https://api.dictionaryapi.dev/api/<--version-->/entries/en/<--word-->
As an example, to get definition of English word hello using v2, you can send request to
https://api.dictionaryapi.dev/api/v2/entries/en/hello and the result returned will be:
[
{
"word": "hello",
"phonetics": [],
"meanings": [
{
"partOfSpeech": "interjection",
"definitions": [
{
"definition": "A greeting (salutation) said when meeting someone or acknowledging someone's arrival or presence.",
"example": "Hello, everyone."
},
{
"definition": "A greeting used when answering the telephone.",
"example": "Hello? How may I help you?"
}
]
},
{
"partOfSpeech": "noun",
"definitions": [
{
"definition": "\"Hello!\" or an equivalent greeting.",
"example": "They gave each other a quick hello when they met, and went back on their merry ways."
}
]
},
{
"partOfSpeech": "verb",
"definitions": [
{
"definition": "To greet with \"hello\"."
}
]
}
]
}
]Note: The API now uses Wiktionary as its data source. Response format remains compatible but some fields like
phonetic,origin,synonyms, andantonymsmay not always be present.
The API earlier used to send response as shown below, but this structure of response was found out to be difficult to work with (you can take a look at these tickets #32 and #4), based on feedback in these tickets I have updated the API to v2 version. But v1 version will always be supported for backward compatibility.
[
{
"word": "hello",
"phonetics": [],
"meaning": {
"interjection": [
{
"definition": "A greeting (salutation) said when meeting someone.",
"example": "Hello, everyone."
}
],
"noun": [
{
"definition": "\"Hello!\" or an equivalent greeting.",
"example": "They gave each other a quick hello."
}
],
"verb": [
{
"definition": "To greet with \"hello\"."
}
]
}
}
]| Location | Endpoint |
|---|---|
| Root path | https://api.dictionaryapi.dev/api/<--version--> |
| Method | Endpoint | Description | Examples |
|---|---|---|---|
GET |
/entries/en/<YOUR_WORD> |
Retrieves the definition of the given word. | /api/v2/entries/en/bliss |
You can see existing and add new feature proposals on the projects GitHub page. Pull requests are welcome!
If you need any assistance or find any bugs, feel free to contact me directly via email or create a new issue on the GitHub page.
This Dictionary API was initially created as an API that could be used by my friend for his project. I did not in my wildest dream thought that this API will become so popular, in few months this API took off and many people started to use it, initially I was able to manage the server costs but as number of requests started increasing, so did the server costs. Currently API has more than 10 million requests per month and to keep it running I need support of the community. I have planned few things in near future that will bring the cost down, but that will take some time.
Kindly help me keep running and developing this API. Thanks a lot for using my API, it feels good when your creation help other create their own projects.
The Dictionary Anywhere extension helps you stay focused on what you are reading by eliminating the need to search for meaning, Double-clicking any word will view its definition in a small pop-up bubble. Now you never have to leave what you are reading to search for the meaning of the words you don't yet know.
Extension is available for Google Chrome and Mozilla Firefox.