Changed
- GET /v1/search/suggest now serves a candidate set when a query narrows to 100 or fewer strict matches. Rows carry a compact discovery projection (
id,title,main_text,type,source,score,relevanceScore,uprnand the matched-substring arrays) plus a server-issuedsearch_idand aset_completeflag. On candidate-set rowsdescription,secondary_text,location,postcode,metadataandhighlightsare not returned: take the chosen suggestion'suprnto the retrieve step for the full record, or adopt@vepler/sdk/address-search, which implements the whole flow. Queries above 100 matches keep the previous full rows withset_complete: false. - Suggest itself is now free, and the charge moves to selection. The new retrieve step at
/v1/search/retrievetakes a requireduprnand an optionalsearch_id, returns the full address record (line_1toline_3,post_town,county,postcode,formatted,coordinatesandclassification_code), and charges per retrieved record at the standard address rate. Repeat retrievals of the same UPRN inside a billing window are charged once. Passingsearch_idfrom a suggest response narrows within the cached set server-side; sets stay live for ten minutes. - Charged responses carry billing transparency headers:
X-Credits-Charged,X-Credits-BalanceandX-Already-Chargedwhen charge-once deduplication applied. An optionalX-Search-Sessionrequest header (UUID) attributes requests to your own end-user sessions in the request logs. - Per-tenant limits protect spend. Suggest is limited to 600 requests per minute per tenant and billable routes to 50,000 credits per UTC day by default; both are adjustable per account. Over a limit the API returns
429with aRetry-Afterheader and error coderate_limit_exceeded. Requests with no spendable credit are refused up front with402and error codeinsufficient_credits, before any billable work runs. - The SDK gains
@vepler/sdk/address-search:createAddressSearch()is a framework-agnostic, headless autocomplete controller with a 250 ms debounce, local narrowing of complete candidate sets on extending keystrokes, one charged retrieve per selection, and parsed billing headers on every result. building._provenanceon POST /v1/property/query is licence-gated: raw per-source building values return only when explicitly requested through theattributesparameter by a caller holding the source-data licence.
Fixed
- Address strings across GET /v1/address/uprn/{uprn}, the property endpoints and search come from one canonical composer, so the same UPRN formats identically everywhere. Lookups return the full building number and suffix, for example
55A, and premises identified by an organisation or building name render that name rather than a bare street line. granularity=streetqueries on GET /v1/search/suggest resolve without a comma:west street sheffieldfinds West Street in Sheffield. Queries that already resolved are unchanged.- Licensed callers who opt into
sourcesor_provenanceon POST /v1/property/query receive those fields on every path.