NewConnect Claude, Gemini, ChatGPT, and other AI agents to API Ninjas via our MCP server

Dictionary API

The Dictionary API allows you to look up definitions for any English word.

(4.3)

From 9,274 users

2,900+

Applications using this API

API Status

Online - All Systems Operational

API Response Times

Average
P50
P75
P90
P95
375ms397ms420ms787ms1240ms

Didn't find what you were looking for? Suggest an improvement


/v1/dictionary GET

https://api.api-ninjas.com/v1/dictionary

Returns a string containing definitions for a given word.

Parameters

  • word  required

    Word to look up.

Headers

  • X-Api-Key  required

    API Key associated with your account.

Response

A JSON object with the following fields or an error if the request is unsuccessful.

  • word

    The word that was looked up.

  • definition

    The definition of the word (only present if valid is true).

  • valid

    Whether the word is valid (true or false).

Sample Request Live Demo!

word

Try our APIs in the API playground

Sign up for a free API key to get started — no credit card required.

https://api.api-ninjas.com/v1/dictionary?word=code

Headers

X-Api-KeyLog in or sign up to get your API Key

Sample Response

JSON
{
    word:"code",
    definition:"1. A body of law, sanctioned by legislation, in which the rules of law to be specifically applied by the courts are set forth in systematic form; a compilation of laws by public authority; a digest. Note: The collection of laws made by the order of Justinian is sometimes called, by way of eminence. "The Code" Wharton. 2. Any system of rules or regulations relating to one subject; as, the medical code, a system of rules for the regulation of the professional conduct of physicians; the naval code, a system of rules for making communications at sea means of signals. Code civil or Code Napoleon, a code enacted in France in 1803 and 1804, embodying the law of rights of persons and of property generally. Abbot.",
    valid:true
}

Code Examples

1 2 curl -X GET "https://api.api-ninjas.com/v1/dictionary?word=example" \ -H "X-Api-Key: YOUR_API_KEY"

If your programming language is not listed in the Code Example above, you can still make API calls by using a HTTP request library written in your programming language and following the above documentation.

Frequently Asked Questions

  • Yes, but you must have a premium subscription. Commercial use of the Dictionary API is not permitted on the free tier. See our pricing page to choose a plan that fits your needs.
  • Sign up for a free account to instantly get your API key, then pass it in the X-Api-Key header on every request. The documentation above includes ready-to-run examples in cURL, Python, JavaScript, Node.js, and more.
  • Your API requests will simply be denied once you hit your monthly quota — you will never be charged more than the plan you signed up for. To increase your quota, you can upgrade your plan any time on our pricing page.
  • The API responds with a standard HTTP status code and a JSON error message describing the problem. See our error codes reference for the full list of codes and how to resolve each one, or contact support if you need help.
  • Send a GET request to the /v1/dictionary endpoint with the required word parameter set to the term you want to define, for example word=code. You will need an API key in the X-Api-Key header, which you can get by registering for an account.
  • The response is a JSON object containing word (the word that was looked up), definition (the definition text, only present when the word exists), and valid (a boolean indicating whether the word was found). If valid is false, no definition field is returned. See the error codes page for unsuccessful requests.
  • The Dictionary API is useful for building vocabulary tools, language-learning apps, writing assistants, and word games that need definitions for any English word. It pairs well with related Text APIs such as the Thesaurus API for synonyms, the Spell Check API for corrections, and the Random Word API for generating prompts.
  • Check the valid field in the response: it returns true when the word exists in the dictionary and false when it does not, in which case no definition is included. To suggest a correct spelling for an invalid word, combine it with the Spell Check API.