Nearest

Find the features closest to a given point

get
Authorizations
Query parameters
pointstringRequired

A set of British National Grid coordinates to which the nearest record in a straight line should be found.

radiusnumber · min: 0.01 · max: 1000Optional

The radius in metres to search within. Minimum = 0.01, Maximum = 1,000 . Default = 100

formatstring · enumOptional

The format the response will be returned in.

Possible values:
fqstring · enumOptional

Filters the results by bounding box or local_type.

Possible values:
Responses
200
Retrieves addresses based on a free text search.
get
GET /search/names/v1/nearest HTTP/1.1
Host: api.os.uk
Accept: */*
200

Retrieves addresses based on a free text search.

{
  "header": {
    "uri": "text",
    "query": "text",
    "format": "text",
    "maxresults": 1,
    "offset": 1,
    "totalresults": 1
  },
  "results": [
    {
      "ID": 1,
      "NAMES_URI": "text",
      "NAME1": "text",
      "TYPE": "text",
      "LOCAL_TYPE": "text",
      "GEOMETRY_X": 1,
      "GEOMETRY_Y": 1,
      "MOST_DETAIL_VIEW_RES": 1,
      "LEAST_DETAIL_VIEW_RES": 1,
      "MBR_XMIN": 1,
      "MBR_YMIN": 1,
      "MBR_XMAX": 1,
      "MBR_YMAX": 1,
      "POSTCODE_DISTRICT": "text",
      "POSTCODE_DISTRICT_URI": "text",
      "POPULATED_PLACE": "text",
      "POPULATED_PLACE_URI": "text",
      "POPULATED_PLACE_TYPE": "text",
      "COUNTY_UNITARY": "text",
      "COUNTY_UNITARY_URI": "text",
      "COUNTY_UNITARY_TYPE": "text",
      "REGION": "text",
      "REGION_URI": "text",
      "COUNTRY": "text",
      "COUNTRY_URI": "text"
    }
  ]
}

Last updated

Was this helpful?