rand.api

rand.api endpoints

Deterministic names and surnames sourced from Wikidata. Apply filters via query parameters and reuse the same cache-friendly responses.

The Playground auto-detects your API host (env override → current origin → https://rand.api), and you can override it via the “API base URL” input for per-preview Workers.

/v1/names

Return localized first names.

/v1/surnames

Return localized surnames.

Query parameters

KeyTypeRequiredDescription
countrystringNoISO 3166-1 alpha-2 code. Example: GR.
langstringNoBCP-47 language tag. Example: el or ru.
genderstringNomale | female | any. Use any to disable filtering.
countnumberNoNumber of results to return (1-50). Defaults to 10.
seedstringNoOptional deterministic seed (<=64 chars, A-Z, a-z, 0-9, - or _).
debugbooleanNoSet to true or 1 to include executed SPARQL queries in the response.

Examples

curl "https://rand.api/v1/names?country=GR&lang=el&gender=male&count=5&seed=almis"

Rate limits

Free tier: 60 requests per minute, shared across endpoints. Deterministic seeds ensure repeated calls hit the cache and respond in under 400ms on average.

Provide a seed to reproduce the exact same list across sessions.