Local Authorities

Autocomplete UK local authorities (councils and districts) by prefix.

Try it

Endpoint

GET/v1/local-authority/<query>
Base URL: https://autocomplete.namedone.com

SDK Usage

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

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 local authorities endpoint
7curl "https://autocomplete.namedone.com/v1/local-authority/west?token=<jwt>"

Response Format

JSON
{
"results": [
{
"id": "local-authority-0",
"text": "Westminster",
"type": "local-authority"
}
],
"query": "west"
}

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: west

{
"results": [
{
"id": "local-authority-0",
"text": "Westminster",
"type": "local-authority"
},
{
"id": "local-authority-1",
"text": "Wandsworth",
"type": "local-authority"
},
{
"id": "local-authority-2",
"text": "Waltham Forest",
"type": "local-authority"
}
],
"query": "west"
}

Notes

  • Data is sourced from ONS administrative boundaries.
  • Source: Office for National Statistics, OGL v3.0.