Skip to main content

Random Word API

MOCK DATA

Random English words by part of speech — nouns, verbs, adjectives or adverbs — with working length filters, seedable output and honest 400s when nothing fits.

Generated test data for fixtures and development

Base URL
/api/words
Capabilities
1 route Seedable
Last updated
July 29, 2026

GET /api/words

Live requestRuns against the public API
No key required
GET/api/words?type=noun&count=5

Request parameters

Part of speech to generate. 'any' picks one at random per word — see the partOfSpeech field for what you got.

Minimum word length in characters (inclusive). Must be ≤ maxLength.

Maximum word length in characters (inclusive). If no word of the chosen type fits the range, the request fails with a 400 — never a near-miss word.

Advanced response options7 options

How many records to generate (1–100).

Deterministic output: the same seed always returns the same records. Omit for random (the used seed is echoed in meta.seed).

Return only these fields (comma-separated). Mutually exclusive with 'exclude'.

Return all fields except these (comma-separated).

Response format: json envelope, ndjson (one record per line) or csv.

Pretty-print the JSON response.

Drop the envelope: return the raw array/object without data/meta wrapper.

Response

Example parameters are ready. Send the request to inspect the live response.

Route reference

Code samples Ready-to-copy requests in 4 languages
Choose a code sample language
curl "https://randomapi.dev/api/words?type=noun&count=5"
const res = await fetch("https://randomapi.dev/api/words?type=noun&count=5");
const { data, meta } = await res.json();
import requests

data = requests.get("https://randomapi.dev/api/words?type=noun&count=5").json()["data"]
$json = json_decode(file_get_contents(
  "https://randomapi.dev/api/words?type=noun&count=5"
), true);
$data = $json["data"];
Parameters Route-specific request inputs 3
type enum

Part of speech to generate. 'any' picks one at random per word — see the partOfSpeech field for what you got.

default: any
allowed: noun | verb | adjective | adverb | any
example: type=noun
minLength int

Minimum word length in characters (inclusive). Must be ≤ maxLength.

default: 1
allowed: 1 – 30
example: minLength=3
maxLength int

Maximum word length in characters (inclusive). If no word of the chosen type fits the range, the request fails with a 400 — never a near-miss word.

default: 30
allowed: 1 – 30
example: maxLength=8
Universal parameters Shared response and formatting options 7
count int

How many records to generate (1–100).

default: 10
allowed: 1 – 100
example: count=3
seed int

Deterministic output: the same seed always returns the same records. Omit for random (the used seed is echoed in meta.seed).

example: seed=42
fields list

Return only these fields (comma-separated). Mutually exclusive with 'exclude'.

example: fields=word,partOfSpeech
exclude list

Return all fields except these (comma-separated).

example: exclude=partOfSpeech
format enum

Response format: json envelope, ndjson (one record per line) or csv.

default: json
allowed: json | ndjson | csv
example: format=csv
pretty boolean

Pretty-print the JSON response.

default: false
example: pretty=true
unwrap boolean

Drop the envelope: return the raw array/object without data/meta wrapper.

default: false
example: unwrap=true
Response schema Fields returned in each record 2
word string

The word, within minLength..maxLength characters (a few entries contain a hyphen).

example: harvest

partOfSpeech string

The part of speech actually generated: noun | verb | adjective | adverb. Varies per word when type=any.

example: noun

Documented examples

Build-generated requests and complete responses
3
Five random nouns
GET /api/words?type=noun&count=5
{
  "data": [
    {
      "word": "pearl",
      "partOfSpeech": "noun"
    },
    {
      "word": "step-mother",
      "partOfSpeech": "noun"
    },
    {
      "word": "submitter",
      "partOfSpeech": "noun"
    },
    {
      "word": "premium",
      "partOfSpeech": "noun"
    },
    {
      "word": "sailor",
      "partOfSpeech": "noun"
    }
  ],
  "meta": {
    "endpoint": "words",
    "count": 5,
    "seed": 42,
    "params": {
      "type": "noun",
      "minLength": 1,
      "maxLength": 30
    },
    "generatedAt": "2026-07-29T08:13:22.000Z"
  }
}
Short adjectives (4–6 letters), reproducible
GET /api/words?type=adjective&minLength=4&maxLength=6&count=10&seed=7
{
  "data": [
    {
      "word": "sudden",
      "partOfSpeech": "adjective"
    },
    {
      "word": "soft",
      "partOfSpeech": "adjective"
    },
    {
      "word": "tame",
      "partOfSpeech": "adjective"
    },
    {
      "word": "dental",
      "partOfSpeech": "adjective"
    },
    {
      "word": "afraid",
      "partOfSpeech": "adjective"
    },
    {
      "word": "total",
      "partOfSpeech": "adjective"
    },
    {
      "word": "blind",
      "partOfSpeech": "adjective"
    },
    {
      "word": "right",
      "partOfSpeech": "adjective"
    },
    {
      "word": "unripe",
      "partOfSpeech": "adjective"
    },
    {
      "word": "next",
    …
    "generatedAt": "2026-07-29T08:13:22.000Z"
  }
}
Any part of speech, 8+ letters
GET /api/words?minLength=8&count=20
{
  "data": [
    {
      "word": "overstay",
      "partOfSpeech": "verb"
    },
    {
      "word": "solution",
      "partOfSpeech": "noun"
    },
    {
      "word": "unexpectedly",
      "partOfSpeech": "adverb"
    },
    {
      "word": "pleasure",
      "partOfSpeech": "noun"
    },
    {
      "word": "suddenly",
      "partOfSpeech": "adverb"
    },
    {
      "word": "handover",
      "partOfSpeech": "noun"
    },
    {
      "word": "babushka",
      "partOfSpeech": "noun"
    },
    {
      "word": "verbally",
      "partOfSpeech": "adverb"
    },
    {
      "word": "emphasize",
      "partOfSpeech": "verb"
    },
    {
      "word": "famously",
    …
    "generatedAt": "2026-07-29T08:13:22.000Z"
  }
}

About this API

Coverage & behavior

Draws random words from curated English word lists, one record per word, each labelled with the part of speech it actually came from.

  • type picks the part of speech (noun, verb, adjective, adverb). The default any picks a part of speech at random per word, and the partOfSpeech field always tells you which one you got.
  • minLength/maxLength genuinely constrain word length (counted in characters — a few entries like cross-contamination contain a hyphen). Every returned word is inside the range, never approximately.

Honest failure, no silent fallback: when no word of the requested type exists in the length range (the lists roughly cover 2–19 characters), the request fails with a 400 explaining the problem — it never quietly substitutes a word of a different length or type. Note that type=any picks the part of speech before generating, so a tight range that only some parts of speech can satisfy may still 400 depending on the pick — pass an explicit type for tight ranges.

With a seed the same query returns the identical word list forever.

Use it for

  • Build readable slugs, room codes and usernames from adjective + noun pairs
  • Feed word games, hangman or typing trainers with words of an exact length
  • Fill UI mockups with realistic single-word tags, labels and category names

Frequently asked questions

Can I request only one part of speech?

Yes — type restricts to one class (nouns, verbs, adjectives…), and every record is tagged with partOfSpeech.

Can I bound word length?

minLength/maxLength filter by character count — handy for word games and placeholder labels.

Where do the words come from?

A curated English wordlist shipped with the API — no external calls, so responses are fast and deterministic with seed.