API Reference/

Dictionary API

Prefix Search

Search for words by prefix using the same Word Lookup endpoint with exact=false. Returns a lightweight list of matching words with part of speech and first definition — ideal for autocomplete, typeahead, and browse-style interfaces.

GET/api/v1/dictionary/:word?exact=false

Requires API key

Returns a lightweight list of words matching the given prefix. Each result includes the word, part of speech, and the first definition gloss. Results are sorted alphabetically and capped at the limit parameter.

Path Parameters

NameDescription
:wordreq
stringThe prefix to search for (1–100 characters).

Query Parameters

NameDescription
exactreq
booleanMust be false for prefix search. Defaults to true.
limit
integerMaximum number of results to return (1–20). Defaults to 20.
lang
stringISO 639 language code. Works with any supported language. Defaults to en.
pos
stringFilter by part of speech (e.g. noun, verb, adj). Only returns words matching the given part of speech. Defaults to (all).

Request

bash
curl "https://api.playanagrama.com/api/v1/dictionary/bon?exact=false&limit=5" \
  -H "Authorization: Bearer ak_your_key_here"

Response Fields

NameDescription
query
stringThe prefix that was searched.
lang
stringThe language code used.
exact
booleanAlways false for prefix search responses.
results
object[]Array of matching words.
results[].word
stringThe matched word.
results[].pos
stringPart of speech.
results[].gloss
string | nullFirst definition gloss (short summary). May be null if no definition is available.
count
integerNumber of results returned.

Response 200

JSON
{
  "query": "bon",
  "lang": "en",
  "exact": false,
  "results": [
    {
      "word": "BON",
      "pos": "noun",
      "gloss": "Initialism of business object notation..."
    },
    {
      "word": "Bon",
      "pos": "name",
      "gloss": "A diminutive of the male given name Bonnie."
    },
    {
      "word": "BoN",
      "pos": "noun",
      "gloss": "Alternative letter-case form of BON..."
    },
    {
      "word": "Bon Accord",
      "pos": "name",
      "gloss": "A village in Trinidad and Tobago."
    },
    {
      "word": "bon appetit",
      "pos": "intj",
      "gloss": "Used to wish someone enjoyment of the meal..."
    }
  ],
  "count": 5
}
Prefix search returns a lightweight response compared to exact match — only the word, part of speech, and first gloss are included. The pos filter also works here — add ?pos=noun to only return nouns matching the prefix. For full definitions, etymology, and word forms, use the exact match endpoint with the selected word.

Prefix Search in Other Languages

Combine exact=false with the lang parameter to search by prefix in any supported language.

GET/api/v1/dictionary/:word?exact=false&lang=es

Requires API key

Prefix search in a specific language.

Request

bash
# Prefix search in Spanish
curl "https://api.playanagrama.com/api/v1/dictionary/hol?exact=false&lang=es&limit=5" \
  -H "Authorization: Bearer ak_your_key_here"

Response 200 — Spanish prefix

JSON
{
  "query": "hol",
  "lang": "es",
  "exact": false,
  "results": [
    {
      "word": "hola",
      "pos": "intj",
      "gloss": "hello, hi, hey"
    },
    {
      "word": "holgazán",
      "pos": "noun",
      "gloss": "A lazy person, an idler."
    },
    {
      "word": "holístico",
      "pos": "adj",
      "gloss": "holistic"
    }
  ],
  "count": 3
}
Was this page helpful?
Anagrama API Docs | Developer Reference