Address autocomplete
Address
Address autocomplete
Search UK addresses (flat-level, via the Royal Mail PAF file) for an address-entry autocomplete.
GET
Address autocomplete
Overview
Returns UK address suggestions for an address-entry autocomplete as the user types. Pass the partial term asq; the server proxies the Ideal Postcodes UK PAF (Postcode Address File) API and returns a list of one-line suggestions covering flat-level addresses (individual flats, not just buildings).
Each item carries an opaque id — a UK PAF UDPRN — which you pass to GET /api/v1/address/details to resolve the full address plus latitude/longitude once the user picks a suggestion.
The API key lives server-side; clients never see it. An all-whitespace q yields an empty list rather than an error.
Authentication
Bearer <accessToken> required. Scope: user.
Path parameters
None.Query parameters
| Param | Type | Required | Notes | Example |
|---|---|---|---|---|
q | string | yes | The partial address term the user is typing. Min length 1. | NW3 |
Request body
None.Response — 200 OK
| Field | Type | Notes | Example |
|---|---|---|---|
items | array | Address suggestions matching q. Empty when nothing matches or q is blank. | see below |
items[].id | string | Opaque UK PAF UDPRN. Send back as id to /details. | 17683155 |
items[].description | string | Human-readable one-line address suggestion. | Flat 118, Waxham, Mansfield Road, London, NW3 |
Example response
Error responses
| Status | Code | Meaning |
|---|---|---|
| 400 | VALIDATION_FAILED | q is missing or empty. |
| 401 | UNAUTHENTICATED | Missing, malformed, or expired access token. |
| 502 | UPSTREAM_FAILURE | The address provider failed or returned an unexpected response. |
| 503 | ADDRESS_LOOKUP_NOT_CONFIGURED | The server has no API key configured for the selected ADDRESS_PROVIDER (LOQATE_API_KEY by default, or IDEAL_POSTCODES_API_KEY). |
Side effects
None — this is a pure read that proxies a third-party lookup.See also
- Address details — resolve a selected
idto coordinates + full address.