Merriam-Webster API

The Merriam-Webster API provides access to definitions, pronunciations, parts of speech, and examples for a specified word from Merriam-Webster, a trusted and authoritative online dictionary and thesaurus.

Base URL

"https://openapi-idk8.onrender.com/"

Fetch Word Information Endpoint

GET `/webster/:word`

Description: Retrieves the definitions, pronunciations, parts of speech, and examples for a specified word from Merriam-Webster.

URL Parameters

  • word (required): The word for which the information is to be fetched.

Sample Request

GET `https://openapi-idk8.onrender.com/webster/science`

Sample Response


{
  "api_info": {
    "api_name": "Merriam Webster",
    "description": "Merriam-Webster is the most reliable, trusted, easy-to-use dictionary and thesaurus online. Find definitions for over 300000 words from the most authoritative English dictionary. Continuously updated with new words and meanings.",
    "author": "OpenAPI"
  },
  "word": "science",
  "partOfSpeech": "noun",
  "pronunciation": {
    "spelled": "sci·​ence",
    "phonetic": "ˈsī-ən(t)s",
    "audioUrl": "https://www.merriam-webster.com/dictionary/science?pronunciation&lang=en_us&dir=s&file=scienc01"
  },
  "definitions": [
    "1. knowledge or a system of knowledge covering general truths or the operation of general laws especially as obtained and tested through scientific method",
    "2. such knowledge or such a system of knowledge concerned with the physical world and its phenomena : natural science",
    "3. a department of systematized knowledge as an object of study",
    "4. something (such as a sport or technique) that may be studied or learned like systematized knowledge",
    "5. a system or method reconciling practical ends with scientific laws",
    "6. christian science",
    "7. the state of knowing : knowledge as distinguished from ignorance or misunderstanding",
    "8. an area of knowledge that is an object of study",
    "9. something (as a sport or technique) that may be studied or learned like a science",
    "10. any of the natural sciences (as biology, physics, or chemistry)",
    "11. knowledge covering general truths or the operation of general laws especially as obtained and tested through the scientific method",
    "12. knowledge or a system of knowledge covering general truths or the operation of general laws especially as obtained and tested through the scientific method and concerned with the physical world and its phenomena"
  ],
  "examples": [
    "The Malay tapir, the largest of the world's four tapir species, remained largely invisible to science until recently. The other three species of these odd, endearing animals all live in South America.",
    "If there were any doubt, Golden's muckraking investigation—he is the Ida Tarbell of college admissions—reveals that almost every word uttered by representatives of the top colleges about the care and nuance and science of the much vaunted admissions process is bunk.",
    "Of course, there is both corporate and government-sponsored grant money available for such initiatives in science and engineering. And scientists are used to working together in laboratories. But in the humanities it was different, said the deans.",
    "The journal Annales was started in 1929, by Bloch and Lucien Febvre, two friends conversant with the new sciences of sociology and geography, psychology and anthropology.",
    "The program encourages students to pursue a career in science.",
    "a list of terms commonly used in science",
    "a new branch of science",
    "advances in science and technology",
    "Students are required to take two sciences.",
    "students majoring in a science",
    "Thompson now hopes to attend the University of Indianapolis to study biomedical science.",
    "In just under four hours, Tyson, who narrates the audiobook edition, looks to simplify the most complicated space science concepts like black holes, dark matter, quarks, and everything else in between.",
    "Another way to get involved is contribute to volunteer and contribute to specific citizen science projects initiated the DNR.",
    "In response to requests for comment, representatives of the water utility and chemical manufacturing groups referred to statements alleging the EPA didn’t rely on the best available science and underestimated the cost of the rule."
  ]
}

Usage Example

To use the API, make a GET request to the `/webster/:word` endpoint with the required URL parameter:

fetch('https://openapi-idk8.onrender.com/webster/science')
    .then(response => response.json())
    .then(data => console.log(data));

Error Handling

400 Bad Request: Returned when the required URL 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 the data"
}