Skip to main content

Random Name Generator API

MOCK DATA

Random person names — first, last and full — with a strict gender filter, locale-aware name pools in 8 languages and seed-reproducible output.

Generated test data for fixtures and development

Base URL
/api/names
Category
People
Capabilities
1 route Seedable 8 locales
Last updated
July 29, 2026

GET /api/names

Live requestRuns against the public API
No key required
GET/api/names?count=5&seed=42

Request parameters

Only generate names of this gender — constrains both the first-name pool and the gender field of every record. Omit for a random per-record mix.

Advanced response options8 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).

Locale for the generated data (names, addresses, …).

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

data = requests.get("https://randomapi.dev/api/names?count=5&seed=42").json()["data"]
$json = json_decode(file_get_contents(
  "https://randomapi.dev/api/names?count=5&seed=42"
), true);
$data = $json["data"];
Parameters Route-specific request inputs 1
gender enum

Only generate names of this gender — constrains both the first-name pool and the gender field of every record. Omit for a random per-record mix.

allowed: male | female
example: gender=female
Universal parameters Shared response and formatting options 8
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
locale enum

Locale for the generated data (names, addresses, …).

default: en
allowed: en | da | de | fr | es | it | pt | ja
example: locale=da
fields list

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

example: fields=firstName,lastName
exclude list

Return all fields except these (comma-separated).

example: exclude=gender
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 4
firstName string

Given name, drawn strictly from the locale's pool for the record's gender.

example: Emily

lastName string

Family name from the locale's surname pool.

example: Carter

fullName string

firstName + " " + lastName (Western order in every locale).

example: Emily Carter

gender string

male | female — the pool the first name was drawn from; equals the gender param when one is set.

example: female

Documented examples

Build-generated requests and complete responses
3
Five reproducible names
GET /api/names?count=5&seed=42
{
  "data": [
    {
      "firstName": "Marlon",
      "lastName": "MacGyver",
      "fullName": "Marlon MacGyver",
      "gender": "male"
    },
    {
      "firstName": "Sam",
      "lastName": "Wisozk",
      "fullName": "Sam Wisozk",
      "gender": "male"
    },
    {
      "firstName": "Sheila",
      "lastName": "Jakubowski",
      "fullName": "Sheila Jakubowski",
      "gender": "female"
    },
    {
      "firstName": "Neil",
      "lastName": "Renner",
      "fullName": "Neil Renner",
      "gender": "male"
    },
    {
      "firstName": "Patsy",
      "lastName": "Rau",
      "fullName": "Patsy Rau",
      "gender": "female"
    }
  ],
  "meta": {
    "endpoint": "names",
    "count": 5,
    "seed": 42,
    "locale": "en",
    "params": {},
    "generatedAt": "2026-07-29T08:13:22.000Z"
  }
}
Female names only
GET /api/names?gender=female&count=10
{
  "data": [
    {
      "firstName": "Marilyn",
      "lastName": "MacGyver",
      "fullName": "Marilyn MacGyver",
      "gender": "female"
    },
    {
      "firstName": "Sandy",
      "lastName": "Wisozk",
      "fullName": "Sandy Wisozk",
      "gender": "female"
    },
    {
      "firstName": "Sheila",
      "lastName": "Jakubowski",
      "fullName": "Sheila Jakubowski",
      "gender": "female"
    },
    {
      "firstName": "Mindy",
      "lastName": "Renner",
      "fullName": "Mindy Renner",
      "gender": "female"
    },
    {
      "firstName": "Patsy",
      "lastName": "Rau",
      "fullName": "Patsy Rau",
      "gender": "female"
    },
    {
      "firstName": "Joan",
      "lastName": "Lynch",
      "fullName": "Joan Lynch",
      "gender": "female"
    },
    {
      "firstName": "Beatrice",
    …
    "generatedAt": "2026-07-29T08:13:22.000Z"
  }
}
Japanese male names
GET /api/names?locale=ja&gender=male&count=5
{
  "data": [
    {
      "firstName": "清",
      "lastName": "柳沢",
      "fullName": "清 柳沢",
      "gender": "male"
    },
    {
      "firstName": "輝",
      "lastName": "馬場",
      "fullName": "輝 馬場",
      "gender": "male"
    },
    {
      "firstName": "辰男",
      "lastName": "島田",
      "fullName": "辰男 島田",
      "gender": "male"
    },
    {
      "firstName": "秀雄",
      "lastName": "石原",
      "fullName": "秀雄 石原",
      "gender": "male"
    },
    {
      "firstName": "翔平",
      "lastName": "畠山",
      "fullName": "翔平 畠山",
      "gender": "male"
    }
  ],
  "meta": {
    "endpoint": "names",
    "count": 5,
    "seed": 42,
    "locale": "ja",
    "params": {
      "gender": "male"
    },
    "generatedAt": "2026-07-29T08:13:22.000Z"
  }
}

About this API

Coverage & behavior

Generates person names from each locale's curated name pools (mock data — any resemblance to real people is coincidental). Every record carries firstName, lastName, fullName and the gender its first name was drawn for.

The gender filter is strict: ?gender=female draws every first name from the locale's female pool and stamps gender: "female" on every record — unlike raw faker, it never mixes in names from the unisex "any" pool. When omitted, each record independently picks male or female, and the gender field always tells you which pool the first name came from — name and gender never contradict each other.

locale swaps the pools wholesale: ?locale=ja returns Japanese names in kanji/kana, ?locale=de German ones, and so on. fullName is always firstName + " " + lastName (Western order in every locale). With a seed, the same query returns byte-identical names forever.

Use it for

  • Fill UI lists, tables and select menus with realistic display names
  • Seed databases and fixtures with gender- and locale-consistent person names
  • Test Unicode handling, sorting and layout with non-Latin names (locale=ja)

Frequently asked questions

Is the gender filter strict?

Yes — gender=female returns only names from the female pool. It's a strict filter, not a probability bias.

Which languages are supported?

locale switches the name pools among 8 languages (en, da, de, fr, es, it, pt, ja), so demo data can match your market.

How do I get consistent names across services?

Share a seed — every service requesting the same seed and params receives the same names, keeping cross-service fixtures aligned.