Autocomplete first names by prefix. Returns the most popular names matching the query, sorted by frequency.
/v1/first-name/<query>https://autocomplete.namedone.com1import { createClient } from "@namedone/autocomplete"23const nd = createClient("nd_...")4const { results } = await nd.firstNames("jo")1# Exchange your API key for a token2curl -X POST https://token.namedone.com/v1 \3 -H "Content-Type: application/json" \4 -d '{"apiKey":"nd_..."}'56# Query the first names endpoint7curl "https://autocomplete.namedone.com/v1/first-name/jo?token=<jwt>"{ "results": [ { "id": "first-name-0", "text": "John", "type": "first-name" } ], "query": "jo"}Sent as query string parameters on the HTTP request to the API.
| Parameter | Type | Default | Description |
|---|---|---|---|
| token | string | — | JWT obtained from the token API. Required for authentication. |
Passed to the SDK methods (e.g. firstNames(query, opts)). These are processed client-side and never sent to the API.
| Option | Type | Default | Description |
|---|---|---|---|
| limit | number | 10 | Maximum number of results (1–50). Applied client-side by the SDK. |
| simple | boolean | false | Simplify response: deduplicate by text and strip to {text, type}. |
Query: jo
{ "results": [ { "id": "first-name-0", "text": "John", "type": "first-name" }, { "id": "first-name-1", "text": "Joseph", "type": "first-name" }, { "id": "first-name-2", "text": "Jonathan", "type": "first-name" }, { "id": "first-name-3", "text": "Joshua", "type": "first-name" }, { "id": "first-name-4", "text": "Jordan", "type": "first-name" } ], "query": "jo"}Query: ab
{ "results": [ { "id": "first-name-0", "text": "Abdul", "type": "first-name" }, { "id": "first-name-1", "text": "Abigail", "type": "first-name" }, { "id": "first-name-2", "text": "Abraham", "type": "first-name" }, { "id": "first-name-3", "text": "Abbie", "type": "first-name" }, { "id": "first-name-4", "text": "Abdullah", "type": "first-name" } ], "query": "ab"}