Skip to main content

Random Username Generator API

MOCK DATA

Random usernames in four distinct styles — handle, gamer, professional, anonymous — with a maxLength that is honored by construction, never by truncation.

Generated test data for fixtures and development

Base URL
/api/usernames
Capabilities
1 route Seedable
Last updated
July 30, 2026

GET /api/usernames

Live requestRuns against the public API
No key required
GET/api/usernames?count=8&seed=7

Request parameters

Username style: 'handle' (word.word42), 'gamer' (XxCamelLeetxX), 'professional' (first.last), 'anonymous' (adjectivenoun8317). Omit for a mix.

Hard upper bound on username length, honored by building shorter combos (never truncating). 'anonymous' needs ≥ 8.

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/usernames?count=8&seed=7"
const res = await fetch("https://randomapi.dev/api/usernames?count=8&seed=7");
const { data, meta } = await res.json();
import requests

data = requests.get("https://randomapi.dev/api/usernames?count=8&seed=7").json()["data"]
$json = json_decode(file_get_contents(
  "https://randomapi.dev/api/usernames?count=8&seed=7"
), true);
$data = $json["data"];
Parameters Route-specific request inputs 2
style enum

Username style: 'handle' (word.word42), 'gamer' (XxCamelLeetxX), 'professional' (first.last), 'anonymous' (adjectivenoun8317). Omit for a mix.

allowed: handle | gamer | professional | anonymous
example: style=gamer
maxLength int

Hard upper bound on username length, honored by building shorter combos (never truncating). 'anonymous' needs ≥ 8.

default: 20
allowed: 6 – 30
example: maxLength=12
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=username,style
exclude list

Return all fields except these (comma-separated).

example: exclude=style
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
username string

The generated username, always ≤ maxLength.

example: pixel.fox42

style string

The style this username was built with (useful when mixing).

example: handle

Documented examples

Build-generated requests and complete responses
3
A mix of all four styles
GET /api/usernames?count=8&seed=7
{
  "data": [
    {
      "username": "priya.carter",
      "style": "professional"
    },
    {
      "username": "lars.penn",
      "style": "professional"
    },
    {
      "username": "T1t4nDr4g0n78",
      "style": "gamer"
    },
    {
      "username": "foggypanda32",
      "style": "anonymous"
    },
    {
      "username": "eagerkoala87",
      "style": "anonymous"
    },
    {
      "username": "otto.day",
      "style": "professional"
    },
    {
      "username": "rapidlemur3081",
      "style": "anonymous"
    },
    {
      "username": "politecomet565",
      "style": "anonymous"
    }
  ],
  "meta": {
    "endpoint": "usernames",
    "count": 8,
    "seed": 7,
    "params": {
    …
    "generatedAt": "2026-07-30T15:14:08.000Z"
  }
}
Gamer tags
GET /api/usernames?style=gamer&count=5
{
  "data": [
    {
      "username": "Turb0St33l",
      "style": "gamer"
    },
    {
      "username": "XxAceRoguexX",
      "style": "gamer"
    },
    {
      "username": "BoltFrost",
      "style": "gamer"
    },
    {
      "username": "XxSteelFirexX",
      "style": "gamer"
    },
    {
      "username": "C1ph3rN1nj472",
      "style": "gamer"
    }
  ],
  "meta": {
    "endpoint": "usernames",
    "count": 5,
    "seed": 42,
    "params": {
      "style": "gamer",
      "maxLength": 20
    },
    "generatedAt": "2026-07-30T15:14:08.000Z"
  }
}
Short professional handles
GET /api/usernames?style=professional&maxLength=12&count=5
{
  "data": [
    {
      "username": "ian.hayes",
      "style": "professional"
    },
    {
      "username": "bo.day",
      "style": "professional"
    },
    {
      "username": "priya.cole",
      "style": "professional"
    },
    {
      "username": "mia.dalton",
      "style": "professional"
    },
    {
      "username": "paul.keller",
      "style": "professional"
    }
  ],
  "meta": {
    "endpoint": "usernames",
    "count": 5,
    "seed": 42,
    "params": {
      "style": "professional",
      "maxLength": 12
    },
    "generatedAt": "2026-07-30T15:14:08.000Z"
  }
}

About this API

Coverage & behavior

Generates usernames with a guaranteed format per style, assembled from curated word pools:

  • handle — lowercase words joined by . or _, optional 2-digit suffix: pixel.fox42
  • gamer — CamelCase words, sometimes leetspeak digits or an Xx…xX wrap: XxShadowWolfxX, Fr0stV1per, NovaTitan99
  • professionalfirst.last, all lowercase: nina.parker
  • anonymous — adjective + noun + 2–4 digits, no separators: sneakyotter8317

Omit style for a mix. maxLength is honored by picking shorter word combinations, never by chopping a word mid-way — every result is a clean, pronounceable username. The anonymous style needs maxLength ≥ 8 (explicitly requesting it below that is a 400; in a mix it is simply left out, with a warning).

Use it for

  • Seed user tables with believable, varied account names
  • Suggest available usernames in a sign-up flow (pick a style that fits your product)
  • Generate anonymous display names for reviews, comments or leaderboards

Frequently asked questions

What username styles exist?

style=handle|gamer|professional|anonymous — four distinct patterns — and maxLength hard-caps length for schema constraints.

Are usernames unique?

No guarantee — draws are independent, so rare collisions are possible even within one response, and global uniqueness across calls is definitely not promised. Treat them as fixtures, not identity.

How do I keep them stable in tests?

seed — the same seed returns the same usernames, forever.