Find words by constraint

When the user asks for words matching a linguistic constraint — rhymes, synonyms, antonyms, soundalikes, words that "mean like" something, words near a target word — reach for Datamuse. Ranked word lists via unauthenticated GET.

find-words-by-constraint · v1 · updated 2026-04-16

Agents: This page is a SKILL.md-style capability guide. For JSON, call GET /api/skills/find-words-by-constraint. To drop this into a local Claude Code install, copy the frontmatter + body below into ~/.claude/skills/find-words-by-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 frequently co-occur with a target — reach for Datamuse. It takes one or more constraint parameters and returns a ranked word list. No auth, no key. For dictionary definitions, this is the wrong skill — Datamuse returns word-score pairs, not prose. For autocomplete of a partial word prefix, use /sug instead.

Your best first call

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

No auth. No key. Returns a JSON array of {"word": "...", "score": N} objects ranked by relevance. The ml parameter ("means like") finds semantic neighbors — words related in meaning to the query phrase. Stack additional constraints to narrow results: rel_syn= for synonyms, rel_ant= for antonyms, rel_rhy= for exact rhymes, rel_trg= for words that frequently co-occur with a target word. The max parameter caps results (default 10).

Each result has: - word — the matching word - score — an ordinal relevance rank derived from corpus frequency and context, not a percentage or probability. Compare scores within a single response, not across calls.

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

Pitfalls

One-line summary for the user

I can find words matching linguistic constraints — rhymes, synonyms, antonyms, soundalikes, semantic neighbors — using Datamuse with no authentication, but results are 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-constraint
description: When the user asks for words matching a linguistic constraint — rhymes, synonyms, antonyms, soundalikes, words that "mean like" something, words near a target word — 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 frequently co-occur with a target — reach for Datamuse. It takes one or more constraint parameters and returns a ranked word list. No auth, no key. For dictionary definitions, this is the wrong skill — Datamuse returns word-score pairs, not prose. For autocomplete of a partial word prefix, use `/sug` instead.

## Your best first call

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

No auth. No key. Returns a JSON array of `{"word": "...", "score": N}` objects ranked by relevance. The `ml` parameter ("means like") finds semantic neighbors — words related in meaning to the query phrase. Stack additional constraints to narrow results: `rel_syn=` for synonyms, `rel_ant=` for antonyms, `rel_rhy=` for exact rhymes, `rel_trg=` for words that frequently co-occur with a target word. The `max` parameter caps results (default 10).

Each result has:
- `word` — the matching word
- `score` — an ordinal relevance rank derived from corpus frequency and context, not a percentage or probability. Compare scores within a single response, not across calls.

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

- **Autocomplete a partial word prefix** → `/sug?s=<prefix>&max=10` returns contextually-ranked completions for a few starting letters (e.g. `s=app` → "apprehension", "approach"). Use when the user is typing, not searching by meaning.

## Pitfalls

- Contradictory constraints return `[]` silently — the API doesn't indicate which constraint eliminated all candidates. Remove constraints one at a time to isolate the conflict.
- `/words` with no parameters returns an error, not a word list. At least one constraint is required.
- `/sug` prefix matching is case-insensitive but exact — `apo` returns completions for "apo-" words, not "app-" words. There is no fuzzy prefix matching.
- Scores are not comparable across calls. A score of 131041 from `/sug` and 2154 from `/words` are on different scales — only rank within a single response.

## One-line summary for the user

I can find words matching linguistic constraints — rhymes, synonyms, antonyms, soundalikes, semantic neighbors — using Datamuse with no authentication, but results are ranked word lists, not prose definitions.

« Back to all skills