Thesaurus API
Synonyms & Antonyms
Related terms
Batch: 100

Synonyms, antonyms,and everything between.

Full lexical relationships for any word — synonyms, antonyms, related terms, substring search, and batch lookups up to 100 words. One clean REST call.

lookup · full relationshipssynonyms · antonyms · relatedsearch · substring match100 · per batch

Try the thesaurus live.

Pick a word or type your own to see synonyms, antonyms, and related terms in real time. No API key needed.

Word lookup

Type any word or pick from the presets below.

GET /lookup/:word

Try a word

endpoint/lookup/:word
returnssynonyms · antonyms · related · counts
Output preview

Synonyms, antonyms, related terms, and raw JSON.

happy
8 synonyms
6 antonyms
5 related

Synonyms

joyfulcheerfulcontentpleaseddelighted

Antonyms

sadunhappymiserabledepressed

Related

happinessjoycontentmentbliss

/lookup returns everything

Synonyms, antonyms, related terms, and counts in a single call — or use focused routes to fetch just one relationship type.

Batch up to 100 words

POST an array of words to /batch for bulk enrichment. Per-word errors don't fail the whole request.

Substring search included

Use /search?q= to find words matching a substring — great for autocomplete and word-picker UIs.

Why Thesaurus API

Every word relationship, one API.

Synonyms & Antonyms

Dedicated routes for synonyms and antonyms, or use /lookup to get both plus related terms in a single response.

Related Terms

Beyond direct synonyms — the /related route surfaces semantically connected words, derivatives, and conceptual neighbours.

Substring Search

The /search route matches words containing your query substring. Useful for autocomplete, word pickers, and exploratory lookups.

Batch Up to 100

Look up 100 words in a single request via GET or POST. Each result includes full relationship data and per-word error detail for misses.

Relationship Counts

Every /lookup response includes a counts object showing how many synonyms, antonyms, and related terms exist — before you expand them.

Structured Output

Consistent response shape with correlationId and timestamp on every response. Machine-readable error codes on every failure.

/api/v1/thesaurus

Endpoints, at a glance.

Start with /lookup/:word for the full picture, or use focused routes for synonyms, antonyms, or related terms separately.

GET/lookup/:word

Full lookup

Returns synonyms, antonyms, related terms, and relationship counts in a single response. Start here.

PRIMARY
GET/synonyms/:word

Synonyms only

Returns just the synonym list for a word — lighter response when you only need substitutions.

GET/antonyms/:word

Antonyms only

Returns the antonym list for a word. Useful for contrast highlighting and opposite-word features.

GET/related/:word

Related terms

Returns semantically connected words — derivatives, conceptual neighbours, and thematic associations.

GET/search

Substring search

Match words containing a query substring. Returns up to 50 results. Useful for autocomplete and word pickers.

GET/batch

Batch lookup (GET)

Look up up to 100 comma-separated words in one request. Each result includes full relationship data.

POST/batch

Batch lookup (POST)

Submit up to 100 words as a JSON array. Failed lookups include a machine-readable error code per word.

GET/health

Health check

Returns service status, version, uptime, environment, and dataset size.

ParameterLocationTypeRequiredDescription
wordURL pathstringyes*Word to look up. Required on /lookup, /synonyms, /antonyms, /related.
qquerystringyes**Substring to search for. Required on /search.
limitqueryintegernoMax search results (default 10, max 50). Used with /search.
wordsquery / bodystring / arrayyes***Comma-separated words (GET batch) or JSON array (POST batch). Max 100.
api_keyquerystringyesAPI key via query param, or pass as x-api-key header.

Requests & responses.

All routes accept api_key as a query param or x-api-key as a header.

Lookup & focused routes

/lookup returns everything; /synonyms, /antonyms, /related return one relationship type.

GET https://datpaq.com/api/v1/thesaurus/lookup/happy?api_key=YOUR_API_KEY
Search & batch

Substring search with /search, bulk lookup with POST /batch.

Health

https://datpaq.com/health

Metrics

https://datpaq.com/metrics

Error reference

Predictable errors, always structured.

Every error includes a machine-readable code, a correlationId, and a clear error message.

400WORD_REQUIRED

Word Required

Empty or missing word path param on /lookup, /synonyms, /antonyms, or /related.

400QUERY_REQUIRED

Query Required

The q parameter is missing or empty on the /search route.

400WORDS_ARRAY_REQUIRED

Words Array Required

Batch request has a missing or empty words array.

400BATCH_SIZE_LIMIT

Batch Size Limit

More than 100 words in a batch request. Split into smaller batches of ≤100.

404WORD_NOT_FOUND

Word Not Found

The requested word is not in the thesaurus dataset. In batch requests, this is per-word and does not fail the whole request.

401UNAUTHORIZED

Unauthorized

API key missing or invalid. Pass api_key as a query param or x-api-key as a header.

429RATE_LIMIT

Rate Limited

100 requests per 15 minutes per IP exceeded. Check the retryAfter field in the response.

500INTERNAL_ERROR

Internal Error

Unexpected runtime error. The correlationId in the response helps with debugging.

Example error response

{
  "error": "Word not found in thesaurus",
  "code": "WORD_NOT_FOUND",
  "correlationId": "1780090219049-l51qbzecm",
  "timestamp": "2026-06-09T00:00:00.000Z"
}

FAQ

API questions developers ask first.

How do I authenticate with this API?

Create an API key in your Datpaq dashboard and send it with each request as a bearer token in the Authorization header.

Is there a free tier?

Yes. Datpaq APIs include a free tier for building, testing, and small production workloads before you move to a paid plan.

What format do requests and responses use?

Datpaq APIs use REST over HTTPS and return JSON by default. Endpoint docs show the supported methods, query parameters, request bodies, and response fields.

Where can I see limits and errors?

Each API documents rate limits, validation rules, and error responses in the landing page and API docs so integrations can retry and fail cleanly.

Start enriching your vocabulary in minutes.

One GET request returns synonyms, antonyms, and related terms for any word. No request body needed — just a word in the path and your API key.