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.
Full lexical relationships for any word — synonyms, antonyms, related terms, substring search, and batch lookups up to 100 words. One clean REST call.
Pick a word or type your own to see synonyms, antonyms, and related terms in real time. No API key needed.
Type any word or pick from the presets below.
Try a word
Synonyms, antonyms, related terms, and raw JSON.
Synonyms
Antonyms
Related
/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
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
Start with /lookup/:word for the full picture, or use focused routes for synonyms, antonyms, or related terms separately.
Full lookup
Returns synonyms, antonyms, related terms, and relationship counts in a single response. Start here.
Synonyms only
Returns just the synonym list for a word — lighter response when you only need substitutions.
Antonyms only
Returns the antonym list for a word. Useful for contrast highlighting and opposite-word features.
Related terms
Returns semantically connected words — derivatives, conceptual neighbours, and thematic associations.
Substring search
Match words containing a query substring. Returns up to 50 results. Useful for autocomplete and word pickers.
Batch lookup (GET)
Look up up to 100 comma-separated words in one request. Each result includes full relationship data.
Batch lookup (POST)
Submit up to 100 words as a JSON array. Failed lookups include a machine-readable error code per word.
Health check
Returns service status, version, uptime, environment, and dataset size.
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
| word | URL path | string | yes* | Word to look up. Required on /lookup, /synonyms, /antonyms, /related. |
| q | query | string | yes** | Substring to search for. Required on /search. |
| limit | query | integer | no | Max search results (default 10, max 50). Used with /search. |
| words | query / body | string / array | yes*** | Comma-separated words (GET batch) or JSON array (POST batch). Max 100. |
| api_key | query | string | yes | API key via query param, or pass as x-api-key header. |
All routes accept api_key as a query param or x-api-key as a header.
/lookup returns everything; /synonyms, /antonyms, /related return one relationship type.
GET https://datpaq.com/api/v1/thesaurus/lookup/happy?api_key=YOUR_API_KEY
Substring search with /search, bulk lookup with POST /batch.
GET https://datpaq.com/api/v1/thesaurus/search?q=hap&limit=5&api_key=YOUR_API_KEY
https://datpaq.com/health
https://datpaq.com/metrics
Error reference
Every error includes a machine-readable code, a correlationId, and a clear error message.
Word Required
Empty or missing word path param on /lookup, /synonyms, /antonyms, or /related.
Query Required
The q parameter is missing or empty on the /search route.
Words Array Required
Batch request has a missing or empty words array.
Batch Size Limit
More than 100 words in a batch request. Split into smaller batches of ≤100.
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.
Unauthorized
API key missing or invalid. Pass api_key as a query param or x-api-key as a header.
Rate Limited
100 requests per 15 minutes per IP exceeded. Check the retryAfter field in the response.
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
Create an API key in your Datpaq dashboard and send it with each request as a bearer token in the Authorization header.
Yes. Datpaq APIs include a free tier for building, testing, and small production workloads before you move to a paid plan.
Datpaq APIs use REST over HTTPS and return JSON by default. Endpoint docs show the supported methods, query parameters, request bodies, and response fields.
Each API documents rate limits, validation rules, and error responses in the landing page and API docs so integrations can retry and fail cleanly.
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.