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 Features API
  3. Technical specification

getFeature

PreviousdescribeFeatureTypeNextFiltering

Last updated 1 month ago

Was this helpful?

Access to features matching a given query

get
Authorizations
Query parameters
requeststring · enumRequired

The type of request being made.

Default: GetFeaturePossible values:
servicestring · enumRequired

The type of service being requested.

Possible values:
versionstring · enumRequired

The type of service being requested.

Default: 2.0.0Possible values:
typeNamesstring · enumRequired

The Feature Type being requested.

Possible values:
bboxstringOptional

A set of valid WFS BBOX coordinates, in the order <bottom-left y, bottom-left x, top-right y, top-right x> (Dependent on CRS)

filterstringOptional

A valid OGC XML filter object

countinteger · min: 1 · max: 100Optional

An integer stating the maximum number of features to be returned in a single response. In version 1.0.0 and 1.1.0 this is known as maxFeatures

Default: 100
maxFeaturesinteger · min: 1 · max: 100Optional

An integer stating the maximum number of features to be returned in a single response. In version 2.0.0 this is known as count

Default: 100
sortBystringOptional

Allows the user to order their response based on search attribute.

propertyNamestringOptional

A list of valid feature attribute names, for example, ChangeDate, TOID, PhysicalLevel

startIndexintegerOptional

An integer stating which result to start from, when returning a response

Default: 0
outputFormatstring · enumOptional

The format the response will be returned in. Default: XML.

Default: GML32Possible values:
resultTypestring · enumOptional

Type of the results. Default: results.

Default: resultsPossible values:
srsNamestring · enumOptional

Allows the user to reproject the selected features into another CRS. Default: EPSG:27700

Default: EPSG:27700Possible values:
Responses
200
Returns a description of the attributes for each feature type supported by the WFS service.
get
GET /features/v1/wfs HTTP/1.1
Host: api.os.uk
Accept: */*
200

Returns a description of the attributes for each feature type supported by the WFS service.

<?xml version="1.0"?>
<object>
	<type>FeatureCollection</type>
	<features>
		<type>text</type>
		<geometry>
			<type>text</type>
			<coordinates>
				<x>1</x>
				<y>1</y>
			</coordinates>
		</geometry>
		<properties>
			<ANY_ADDITIONAL_PROPERTY/>
		</properties>
	</features>
</object>

Access to features matching a given query for a particular year (as an annual snapshot - taking the last full release in the calendar year)

get
Authorizations
Path parameters
yearstringRequired

The year being requested.

Query parameters
requeststring · enumRequired

The type of request being made.

Default: GetFeaturePossible values:
servicestring · enumRequired

The type of service being requested.

Possible values:
versionstring · enumRequired

The type of service being requested.

Default: 2.0.0Possible values:
typeNamesstring · enumRequired

The Feature Type being requested.

Possible values:
bboxstringOptional

A set of valid WFS BBOX coordinates, in the order <bottom-left y, bottom-left x, top-right y, top-right x> (Dependent on CRS)

filterstringOptional

A valid OGC XML filter object

countinteger · min: 1 · max: 100Optional

An integer stating the maximum number of features to be returned in a single response. In version 1.0.0 and 1.1.0 this is known as maxFeatures

Default: 100
maxFeaturesinteger · min: 1 · max: 100Optional

An integer stating the maximum number of features to be returned in a single response. In version 2.0.0 this is known as count

Default: 100
sortBystringOptional

Allows the user to order their response based on search attribute.

propertyNamestringOptional

A list of valid feature attribute names, for example, ChangeDate, TOID, PhysicalLevel

startIndexintegerOptional

An integer stating which result to start from, when returning a response

Default: 0
outputFormatstring · enumOptional

The format the response will be returned in. Default: XML.

Default: GML32Possible values:
resultTypestring · enumOptional

Type of the results. Default: results.

Default: resultsPossible values:
srsNamestring · enumOptional

Allows the user to reproject the selected features into another CRS. Default: EPSG:27700

Default: EPSG:27700Possible values:
Responses
200
Returns a description of the attributes for each feature type supported by the WFS service.
get
GET /features/v1/wfs/archive/{year} HTTP/1.1
Host: api.os.uk
Accept: */*
200

Returns a description of the attributes for each feature type supported by the WFS service.

<?xml version="1.0"?>
<object>
	<type>FeatureCollection</type>
	<features>
		<type>text</type>
		<geometry>
			<type>text</type>
			<coordinates>
				<x>1</x>
				<y>1</y>
			</coordinates>
		</geometry>
		<properties>
			<ANY_ADDITIONAL_PROPERTY/>
		</properties>
	</features>
</object>
  • GETAccess to features matching a given query
  • GETAccess to features matching a given query for a particular year (as an annual snapshot - taking the last full release in the calendar year)