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 combines the results. 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",
"type": "full-name"
}
],
"query": "jo"
}

API Query Parameters

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

ParameterTypeDefaultDescription
tokenstringJWT 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",
"type": "full-name"
},
{
"id": "full-name-1",
"text": "Jones",
"type": "full-name"
},
{
"id": "full-name-2",
"text": "Joseph",
"type": "full-name"
},
{
"id": "full-name-3",
"text": "Jordan",
"type": "full-name"
},
{
"id": "full-name-4",
"text": "Jonathan",
"type": "full-name"
}
],
"query": "jo"
}

Query: john s

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

Query: sarah j

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

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.
  • Single word (e.g. "jo"): searches both first and last names in parallel and interleaves the results. The user picks whether they meant "John" or "Jones".
  • 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.