Full Names

Smart full name autocomplete that combines first names and last names — like "John Smith" or "Sarah Jones" — without a title. This is a client-side SDK feature: there is no /v1/full-name endpoint on the server. The SDK calls the first-name and last-name endpoints in parallel and pairs each first name with a different surname. Use this for a single "Full name" field as recommended by the GOV.UK Design System.

Try it

—

Endpoint

GETSDK only (client-side)
Base URL: https://autocomplete.namedone.com

SDK Usage

fullNames()
1import { createClient } from "@namedone/autocomplete"
2​
3const nd = createClient("nd_...")
4const { results } = await nd.fullNames("jo")

curl

1# Exchange your API key for a token
2curl -X POST https://token.namedone.com/v1 \
3 -H "Content-Type: application/json" \
4 -d '{"apiKey":"nd_..."}'
5​
6# Query the full names endpoint
7curl "https://autocomplete.namedone.comSDK only (client-side)?token=<jwt>"

Response Format

JSON
{
"results": [
{
"id": "full-name-0",
"text": "John Smith",
}
],
"query": "jo",
"confidence": "low"
}

API Query Parameters

Sent as query string parameters on the HTTP request to the API.

ParameterTypeDefaultDescription
tokenstring—JWT obtained from the token API. Required for authentication.

SDK Options

Passed to the SDK methods (e.g. firstNames(query, opts)). These are processed client-side and never sent to the API.

OptionTypeDefaultDescription
limitnumber10Maximum number of results (1–50). Applied client-side by the SDK.
simplebooleanfalseSimplify response: deduplicate by text and strip to {text, type}.

Examples

Query: jo

{
"results": [
{
"id": "full-name-0",
"text": "John Smith"
},
{
"id": "full-name-1",
"text": "Joseph Jones"
},
{
"id": "full-name-2",
"text": "Jonathan Taylor"
},
{
"id": "full-name-3",
"text": "Jordan Brown"
},
{
"id": "full-name-4",
"text": "Joshua Williams"
}
],
"query": "jo",
"confidence": "low"
}

Query: john s

{
"results": [
{
"id": "full-name-0",
"text": "John Smith"
},
{
"id": "full-name-1",
"text": "John Stevens"
},
{
"id": "full-name-2",
"text": "John Saunders"
},
{
"id": "full-name-3",
"text": "John Scott"
},
{
"id": "full-name-4",
"text": "John Simpson"
}
],
"query": "john s",
"confidence": "low"
}

Query: sarah j

{
"results": [
{
"id": "full-name-0",
"text": "Sarah Jones"
},
{
"id": "full-name-1",
"text": "Sarah Johnson"
},
{
"id": "full-name-2",
"text": "Sarah Jenkins"
},
{
"id": "full-name-3",
"text": "Sarah Jordan"
}
],
"query": "sarah j",
"confidence": "low"
}

Notes

  • This is a client-side feature — there is no /v1/full-name endpoint on the server. The SDK calls /v1/first-name/ and /v1/last-name/ in parallel and combines the results.
  • Each keystroke, and the empty-query prefill, is two API requests. Usage is counted per request, so a full-name field costs two requests where a single name field costs one.
  • Single word (e.g. "jo"): searches first names matching the prefix and pairs each with a different top surname. For example, "jo" returns "John Smith", "Joseph Jones", "Jonathan Taylor".
  • Empty query: returns the top first names each paired with a different top surname — pre-fill the dropdown on form load for instant results.
  • Two words (e.g. "john s"): treats the first word as a first-name prefix and the second as a last-name prefix, then combines them into "John Smith", "John Stevens", etc.
  • Two-word combinations are capped at 5 first names × 10 last names (50 results) to avoid combinatorial explosion. The limit option then trims to the requested number.
  • Use this for a single "Full name" field as recommended by the GOV.UK Design System — it lets the user type their name naturally without separate first/last inputs.
  • For formal names with titles (e.g. "Mr Jones", "Sir Paul"), use formalNames() instead.