Overview
The Merriam-Webster API offers developers access to a comprehensive suite of linguistic resources, directly from one of the most recognized authorities in American English lexicography. Established in 1831, Merriam-Webster has maintained a reputation for accuracy and depth in its dictionary and thesaurus content. The API exposes this content through several distinct products, including the Collegiate Dictionary API, Medical Dictionary API, Spanish-English Dictionary API, Thesaurus API, and Learner's Dictionary API.
This API is particularly suited for applications that require validated definitions, pronunciations, etymologies, and usage examples. Educational technology platforms can integrate the Collegiate Dictionary API to provide students with on-demand definitions and vocabulary building tools. Content management systems might utilize the Thesaurus API to suggest synonyms and antonyms, enhancing text quality and SEO. Language learning applications can benefit from the Learner's Dictionary API, which offers simplified definitions and usage notes tailored for non-native speakers, or the Spanish-English Dictionary API for translation capabilities. Developers can retrieve data in both JSON and XML formats, allowing for integration into various backend and frontend environments.
The developer experience is supported by clear documentation and example code in multiple programming languages, facilitating implementation. Rate limits are specified for both the free tier, which allows 1,000 requests per day, and the various paid tiers. This transparency assists developers in planning their usage and scaling requirements. For example, a developer building a small-scale vocabulary quiz application could start with the free tier, while a larger content platform would need to consider a paid subscription to handle higher request volumes. The API's consistent data structure across its different dictionary products simplifies the process of integrating multiple linguistic resources into a single application.
Key features
- Collegiate Dictionary API: Provides access to definitions, pronunciations, etymologies, and usage examples from the Merriam-Webster Collegiate Dictionary.
- Thesaurus API: Offers synonyms, antonyms, and related words to enhance vocabulary and content creation.
- Medical Dictionary API: Delivers specialized definitions and information for medical terms, suitable for healthcare-related applications.
- Spanish-English Dictionary API: Facilitates translation and provides definitions for both Spanish and English words.
- Learner's Dictionary API: Features simplified definitions and example sentences designed for English language learners.
- JSON and XML Responses: Supports flexible data consumption by offering both JSON and XML output formats for all API products.
- Rate Limiting: Defines clear request limits for both free and paid tiers, enabling predictable usage and cost management.
- Example Code: Documentation includes practical code examples in languages such as Python, JavaScript, and PHP to aid rapid integration.
Pricing
Merriam-Webster offers a free tier for initial development and testing, alongside various paid plans for increased usage. As of May 2026, the pricing structure is as follows:
| Plan | Monthly Requests | Monthly Cost | Details |
|---|---|---|---|
| Free Tier | 1,000 requests/day | $0 | Suitable for personal projects and initial testing. |
| Standard Plan | 2,500 requests/day | $100 | Entry-level paid plan for moderate usage. |
| Professional Plan | Custom | Contact Sales | For high-volume applications and enterprise needs. |
For more detailed information on available tiers and custom pricing, refer to the Merriam-Webster API pricing page.
Common integrations
- Educational Platforms: Integrate dictionary lookups directly into learning management systems or e-learning applications.
- Content Creation Tools: Embed thesaurus functionality into writing software, text editors, or content marketing platforms to assist with vocabulary and phrasing.
- Language Learning Applications: Utilize the Learner's Dictionary API for simplified definitions or the Spanish-English Dictionary API for translation features within apps focused on language acquisition.
- Chatbots and Virtual Assistants: Power conversational AI with accurate definitions and linguistic context to respond to user queries.
- Lexical Analysis Tools: Incorporate into research tools for analyzing text, identifying word relationships, or generating vocabulary lists.
- Website Widgets: Create interactive dictionary or thesaurus widgets for websites, allowing visitors to look up words without leaving the page.
Alternatives
- Oxford Dictionaries API: Offers lexical data from Oxford's extensive dictionary collection, including definitions, pronunciations, and example sentences.
- Wordnik API: Provides access to a large corpus of words with definitions, examples, pronunciations, and relationships.
- Collins Dictionary API: Delivers dictionary and thesaurus content from Collins, including various language pairs and specialized dictionaries.
Getting started
To begin using the Merriam-Webster API, you will typically need an API key, which can be obtained by registering on their developer portal. Once you have your key, you can make HTTP requests to the API endpoints. The following Python example demonstrates how to fetch a definition using the Collegiate Dictionary API:
import requests
import json
API_KEY = "YOUR_API_KEY" # Replace with your actual API key
WORD = "serendipity"
# Collegiate Dictionary API endpoint example
url = f"https://www.dictionaryapi.com/api/v3/references/collegiate/json/{WORD}?key={API_KEY}"
try:
response = requests.get(url)
response.raise_for_status() # Raise an HTTPError for bad responses (4xx or 5xx)
data = response.json()
if data and isinstance(data[0], dict) and "fl" in data[0]:
print(f"Word: {WORD}")
print(f"Part of Speech: {data[0]['fl']}")
if "def" in data[0] and data[0]["def"] and "sseq" in data[0]["def"][0]:
for definition_entry in data[0]["def"][0]["sseq"]:
for sub_entry in definition_entry:
if isinstance(sub_entry, list) and sub_entry[0] == "dt":
# Extract the definition text, removing any formatting codes like '{bc}'
definition_text = sub_entry[1].replace('{bc}', '').strip()
print(f"Definition: {definition_text}")
break # Only print the first definition for brevity
else:
print(f"No dictionary entry found for '{WORD}' or unexpected response format.")
if data and isinstance(data[0], str): # Sometimes returns suggestions as strings
print(f"Suggestions: {', '.join(data)}")
except requests.exceptions.RequestException as e:
print(f"An error occurred during the request: {e}")
except json.JSONDecodeError:
print("Failed to decode JSON response.")
except Exception as e:
print(f"An unexpected error occurred: {e}")
This Python code snippet demonstrates how to construct a request to the Collegiate Dictionary API, handle the JSON response, and extract a basic definition. Developers should consult the Merriam-Webster API reference for specific endpoint details, response structures for different dictionary products, and error handling best practices. It's also important to manage your API key securely and adhere to the specified rate limits to prevent service interruptions, as described in the Merriam-Webster developer documentation.