LogoLogo
OS Docs HomeOS NGDOS APIsOS Download ProductsMore than MapsOS Data Hub
  • Introduction to OS APIs
  • Core Concepts
    • Getting started with an API project
    • Authentication
    • Error codes
    • Rate-limiting policy
    • OS API branding
    • Service level agreements
    • Service availability dashboard
  • Accessing OS APIs
    • OS Maps API
      • Layers and styles
      • Getting started
        • ESRI ArcGIS Online
        • ESRI ArcGIS Pro
        • ESRI ArcMap
        • Cadcorp SIS
        • MapInfo Pro
        • QGIS
      • Technical specification
        • ZXY
        • WMTS
      • Code examples
    • OS Vector Tile API
      • What data is available?
      • Getting started
        • ESRI ArcGIS Pro
        • Cadcorp SIS
        • QGIS
        • Create a web application using the OS Vector Tile API
      • Technical specification
        • Service Metadata
        • Stylesheet
        • Tile request
      • Code examples
      • Stylesheets
    • OS NGD API – Tiles
    • OS NGD API – Features
    • OS Features API
      • OS Product Archive
      • What data is available?
      • Getting started
        • ArcGIS Online
        • ArcGIS Pro
        • ArcMap
        • Cadcorp SIS
        • MapInfo Pro
        • QGIS
      • Technical specification
        • getCapabilities
        • describeFeatureType
        • getFeature
        • Filtering
        • Paging
        • Empty values
      • Code examples
    • OS Names API
      • Getting started with example queries using Node.js
      • Technical specification
        • Find
        • Nearest
      • Code list
      • Code examples
    • OS Linked Identifiers API
      • What data is available?
      • Getting started with implementing a look-up application
      • Technical specification
        • Identifier
        • Identifier Types
        • Feature Types
        • Product Version Information
      • Code examples
    • OS Places API
      • Getting started with example queries using Node.js
      • Technical specification
        • Find
        • Postcode
        • UPRN
        • Nearest
        • BBOX
        • Radius
        • Polygon
      • Datasets
      • Code lists
      • Code examples
    • OS Match & Cleanse API
      • End of Life Information
      • Getting started with an example match query using Node.js
      • Technical specification
      • Datasets
      • Code lists
    • OS Downloads API
      • Getting started
        • Automating OS OpenData downloads
        • Automating OS Premium data downloads
      • Technical specification
        • OpenData products
        • OpenData product details
        • Download an OpenData product
        • OpenData product image
        • Data packages
        • Data package ID
        • Data package version
        • Data package version ID
        • Download a data package
    • OAuth 2 API
      • Getting started
      • Technical specification
  • Additional resources
    • OS API Wrappers
      • JavaScript
      • Python
      • R
  • Extra Links
    • Accessibility
    • Contact us
    • PSGA Product Summary
    • Terms and conditions
Powered by GitBook
On this page

Was this helpful?

  1. Accessing OS APIs
  2. OS Names API
  3. Technical specification

Nearest

PreviousFindNextCode list

Last updated 26 days ago

Was this helpful?

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"
    }
  ]
}