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

Thesaurus API

The Thesaurus API allows you to look up synonyms (similar words) and antonyms (opposite-meaning words) for any English word.

(4.7)

From 5,075 users

800+

Applications using this API

API Status

Online - All Systems Operational

API Response Times

Average
P50
P75
P90
P95
282ms301ms334ms667ms1106ms

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


/v1/thesaurus GET

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

Returns a list of synonyms and a list of antonyms 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.

  • synonyms

    Array of synonym strings (words with similar meanings).

  • antonyms

    Array of antonym strings (words with opposite meanings).

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/thesaurus?word=elegant

Headers

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

Sample Response

JSON
{
    word:"elegant",
    synonyms:[
      "graceful",
      "handsome",
      "fine",
      "luxurious",
      "majestic",
      "magnificent",
      "classy",
      "stylish",
      "simple",
      "tasteful",
      "glorious",
      "proud",
      "royal",
      "superb",
      "regal",
      "refined",
      "rich",
      "sophisticated",
      "aristocratic",
      "noble",
      "gallant",
      "courtly",
      "stately",
      "fashionable",
      "exquisite",
      "grand",
      "quiet",
      "lavish",
      "ornate",
      "sleek",
      "polished",
      "heroic",
      "splendid",
      "classic",
      "monumental",
      "heroical",
      "imposing",
      "artful",
      "chic",
      "conservative",
      "restrained",
      "understated",
      "baronial",
      "genteel",
      "posh",
      "swanky",
      "smart",
      "patrician",
      "august",
      "swank",
      "grandiose",
      "ostentatious",
      "pretentious",
      "modish",
      "in",
      "sharp",
      "snappy",
      "a la mode",
      "affected",
      "recherché",
      "swagger",
      "à la mode"
    ],
    antonyms:[
      "inelegant",
      "unfashionable",
      "tasteless",
      "unhandsome",
      "dowdy",
      "graceless",
      "loud",
      "grotesque",
      "flamboyant",
      "flashy",
      "gaudy",
      "unstylish",
      "crude",
      "coarse",
      "tawdry",
      "glitzy",
      "tacky",
      "garish",
      "cheesy",
      "raffish",
      "splashy",
      "styleless",
      "vulgar",
      "unpolished",
      "uncouth",
      "trashy",
      "unrefined",
      "rude",
      "uncultivated",
      "rough-hewn",
      "uncultured",
      "ticky-tacky",
      "ticky-tack",
      "rough-edged"
    ]
}

Code Examples

1 2 curl -X GET "https://api.api-ninjas.com/v1/thesaurus?word=happy" \ -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 Thesaurus 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/thesaurus endpoint with the required word parameter set to the English word you want to look up, for example word=elegant. You will need an API key in the X-Api-Key header, which you can get by registering for a free account.
  • Each response is a JSON object containing the word that was looked up, a synonyms array of strings with similar meanings, and an antonyms array of strings with opposite meanings. See the error codes page for the responses returned when a request is unsuccessful.
  • The Thesaurus API is useful for building writing assistants, word games, vocabulary-builder apps, and content tools that suggest alternative or opposite words on the fly. It pairs well with the Dictionary API for definitions, the Rhyme API for rhyming words, and the Random Word API for generating prompts.
  • No, the word parameter is intended for English words only, returning English synonyms and antonyms. If you need word data for other use cases, browse the full API catalog to find a better fit.