The Wiktionary API provides access to definitions, etymology, and pronunciation of words from Wiktionary, a free content dictionary of all words in all languages. It is collaboratively edited via a wiki, and its name is a portmanteau of the words wiki and dictionary.
"https://openapi-idk8.onrender.com/"
GET `/wiktionary`
Description: Retrieves the definition, etymology, and pronunciation of a specified word from Wiktionary.
GET `https://openapi-idk8.onrender.com/wiktionary?word=example`
{
"api_info": {
"api_name": "Wiktionary",
"author": "OpenAPI",
"description": "Wiktionary is a multilingual, web-based project to create a free content dictionary of all words in all languages. It is collaboratively edited via a wiki, and its name is a portmanteau of the words wiki and dictionary."
},
"word": "example",
"definitions": [
"Something that is representative of all such things in a group.",
"An action or event that is typical or characteristic of a larger group."
],
"etymology": "From Latin exemplum.",
"pronunciation": "/ɪɡˈzɑːmpəl/",
"sourceUrl": "https://en.wiktionary.org/wiki/example"
}
To use the API, make a GET request to the `/wiktionary` endpoint with the required query parameter:
fetch('https://openapi-idk8.onrender.com/wiktionary?word=example')
.then(response => response.json())
.then(data => console.log(data));
400 Bad Request: Returned when the required query parameter is missing.
{
"error": "Word parameter is required"
}
500 Internal Server Error: Returned when an error occurs while fetching or processing data.
{
"error": "An error occurred while fetching data"
}