Find words by linguistic constraint

When the user asks for words matching a linguistic constraint — rhymes, synonyms, antonyms, soundalikes, semantic neighbors, or word autocomplete — reach for Datamuse. Ranked word lists via unauthenticated GET.

find-words-by-linguistic-constraint · v2 · updated 2026-04-16

Agents: This page is a SKILL.md-style capability guide. For JSON, call GET /api/skills/find-words-by-linguistic-constraint. To drop this into a local Claude Code install, copy the frontmatter + body below into ~/.claude/skills/find-words-by-linguistic-constraint/SKILL.md.

When to use this skill

When the user asks for words matching a linguistic constraint — rhymes, synonyms, antonyms, soundalikes, words that "mean like" something, or words that often co-occur with a given word. This is a word-finding engine: you supply constraints, it returns a ranked word list. Datamuse does not return prose definitions — for "what does X mean?", use a dictionary API instead. For autocomplete by typed prefix, /sug handles that; for everything else, use /words.

Your best first call

curl "https://api.datamuse.com/words?ml=uncanny+feeling&max=8"

No auth. No key. The ml ("means like") parameter is the broadest constraint — it finds semantic neighbors. Stack additional constraints to narrow: rel_syn= for synonyms, rel_ant= for antonyms, rel_rhy= for rhymes, rel_trg= for words that frequently co-occur with the target. The max parameter caps results (default 10).

Returns a JSON array of {"word": "...", "score": N} objects. The score is an ordinal relevance rank within this response only — not comparable across different calls.

[
  {"word": "unease", "score": 2154},
  {"word": "disquiet", "score": 1893},
  {"word": "dread", "score": 1774}
]

Fallbacks (when the best call isn't enough)

Pitfalls

One-line summary for the user

I can find words by linguistic constraints — rhymes, synonyms, antonyms, soundalikes, semantic neighbors — via Datamuse with no authentication, but I return ranked word lists, not prose definitions.

APIs this skill uses

Datamuse API · primary · verified

A word-finding query engine for developers. Find words that match constraints like meaning, sound, spelling, and lexical relationships.

Generated from

Datamuse API tutorial Getting Started with Datamuse

SKILL.md source (frontmatter + body)
---
name: find-words-by-linguistic-constraint
description: When the user asks for words matching a linguistic constraint — rhymes, synonyms, antonyms, soundalikes, semantic neighbors, or word autocomplete — reach for Datamuse. Ranked word lists via unauthenticated GET.
---

## When to use this skill

When the user asks for words matching a linguistic constraint — rhymes, synonyms, antonyms, soundalikes, words that "mean like" something, or words that often co-occur with a given word. This is a word-finding engine: you supply constraints, it returns a ranked word list. Datamuse does not return prose definitions — for "what does X mean?", use a dictionary API instead. For autocomplete by typed prefix, `/sug` handles that; for everything else, use `/words`.

## Your best first call

```bash
curl "https://api.datamuse.com/words?ml=uncanny+feeling&max=8"
```

No auth. No key. The `ml` ("means like") parameter is the broadest constraint — it finds semantic neighbors. Stack additional constraints to narrow: `rel_syn=` for synonyms, `rel_ant=` for antonyms, `rel_rhy=` for rhymes, `rel_trg=` for words that frequently co-occur with the target. The `max` parameter caps results (default 10).

Returns a JSON array of `{"word": "...", "score": N}` objects. The `score` is an ordinal relevance rank within this response only — not comparable across different calls.

```json
[
  {"word": "unease", "score": 2154},
  {"word": "disquiet", "score": 1893},
  {"word": "dread", "score": 1774}
]
```

## Fallbacks (when the best call isn't enough)

- **Word autocomplete by typed prefix** → `/sug?s=app&max=10` returns completions ranked by contextual frequency. Use when the user is typing a partial word, not searching by meaning or rhyme.

## Pitfalls

- Contradictory constraints return `[]` silently. The API does not indicate which constraint eliminated all candidates. Remove constraints one at a time to find the conflict — stacking `ml`, `sl`, `sp`, and multiple `rel_*` parameters at once often produces an impossible combination.
- `/words` with no parameters returns an error or empty result. At least one constraint is required.
- `/sug` prefix matching is case-insensitive but exact — a typo like `apo` returns completions for "apo-" words, not "app-" words. No fuzzy prefix matching.

## One-line summary for the user

I can find words by linguistic constraints — rhymes, synonyms, antonyms, soundalikes, semantic neighbors — via Datamuse with no authentication, but I return ranked word lists, not prose definitions.

« Back to all skills