# Datamuse — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Find words by meaning, sound, or rhyme, get autocomplete suggestions, and access word metadata to power your writing apps and tools. Perfect for building spell checkers, word games, and intelligent search features.

**Category:** Developer Tools | **Website:** [datamuse.com/](https://datamuse.com/) | **Docs:** [parse.bot/marketplace/6564655a-7305-496b-9378-f3cb697ca07f/datamuse-com-api](https://parse.bot/marketplace/6564655a-7305-496b-9378-f3cb697ca07f/datamuse-com-api)

Pay-per-use API proxy for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/credits/datamuse/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## Endpoints

### Get autocomplete suggestions

Get autocomplete suggestions for a prefix string. Returns words ordered by frequency that begin with the given prefix. Useful for implementing search-as-you-type interfaces.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `max` | integer | No | Maximum number of results to return |
| `s` | string | Yes | Prefix hint string to autocomplete |
| `v` | string | No | Vocabulary identifier (e.g. es for Spanish) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/datamuse/get-autocomplete-suggestions \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"max":"<integer>","s":"<string>","v":"<string>"}'
```

### Get rhyming words

Find perfect rhymes for a given word. Returns words that rhyme with the input, ordered by score, with syllable counts. Includes both single-word rhymes and multi-word phrases.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `max` | integer | No | Maximum number of results to return |
| `word` | string | Yes | Word to find rhymes for |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/datamuse/get-rhyming-words \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"max":"<integer>","word":"<string>"}'
```

### Get word metadata

Retrieve comprehensive metadata for a specific word including definitions, parts of speech, syllable count, pronunciation, and frequency. Returns the exact word match with all available metadata fields populated.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `word` | string | Yes | The word to lookup |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/datamuse/get-word-metadata \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"word":"<string>"}'
```

### Word search

General word search with multiple constraints. Supports meanings like, sounds like, spelled like, and various lexical relations (synonyms, antonyms, rhymes, triggers, etc.). At least one search parameter should be provided to get meaningful results. Returns up to 1000 words ordered by relevance score.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `ipa` | integer | No | Set to 1 to include IPA pronunciation in results (requires md=r) |
| `lc` | string | No | Left context: a word that precedes the target word |
| `max` | integer | No | Maximum number of results to return (up to 1000) |
| `md` | string | No | Metadata flags: d (definitions), p (parts of speech), s (syllable count), r (pronunciation), f (frequency) |
| `ml` | string | No | Means like: find words with a similar meaning |
| `qe` | string | No | Query echo: prepend a result that describes the query string |
| `rc` | string | No | Right context: a word that follows the target word |
| `rel_ant` | string | No | Antonyms (semantic opposites) |
| `rel_bga` | string | No | Frequent followers (words that frequently follow the given word) |
| `rel_bgb` | string | No | Frequent predecessors (words that frequently precede the given word) |
| `rel_com` | string | No | Holonyms (words that the given word is a part of) |
| `rel_gen` | string | No | Hyponyms (more specific terms) |
| `rel_hom` | string | No | Homophones (sound-alike words) |
| `rel_jja` | string | No | Nouns that the given adjective describes |
| `rel_jjb` | string | No | Adjectives that describe the given noun |
| `rel_nry` | string | No | Near rhymes (approximate rhymes) |
| `rel_par` | string | No | Meronyms (words that are parts of the given word) |
| `rel_rhy` | string | No | Perfect rhymes |
| `rel_spc` | string | No | Hypernyms (more general terms) |
| `rel_syn` | string | No | Synonyms (words with the same meaning) |
| `rel_trg` | string | No | Triggers (statistically associated words) |
| `sl` | string | No | Sounds like: find words with a similar pronunciation |
| `sp` | string | No | Spelled like: find words with a similar spelling (supports * and ? wildcards) |
| `topics` | string | No | Topic hints: one or more comma-separated words to bias results |
| `v` | string | No | Vocabulary identifier (e.g. es for Spanish) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/datamuse/word-search \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"ipa":"<integer>","lc":"<string>","max":"<integer>","md":"<string>","ml":"<string>","qe":"<string>","rc":"<string>","rel_ant":"<string>","rel_bga":"<string>","rel_bgb":"<string>","rel_com":"<string>","rel_gen":"<string>","rel_hom":"<string>","rel_jja":"<string>","rel_jjb":"<string>","rel_nry":"<string>","rel_par":"<string>","rel_rhy":"<string>","rel_spc":"<string>","rel_syn":"<string>","rel_trg":"<string>","sl":"<string>","sp":"<string>","topics":"<string>","v":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://paywithlocus.com/agent/index.md): every Locus agent page.