Technical Specification

API Reference

OS NGD API - Features Technical Specification provides an overview of the endpoints available, as well as the parameters that can be used with each endpoint. The Technical Specification is intended to be used by customers who want to integrate with the API. Click into each endpoint to learn more.

OS NGD API – Features landing page

GEThttps://api.os.uk/features/ngd/ofa/v1/
Response

Ordnance Survey National Geographic Database API – Features landing page.

Body
titlestring
descriptionstring
linksarray of Link (object)
Request
const response = await fetch('https://api.os.uk/features/ngd/ofa/v1/', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "title": "text",
  "description": "text",
  "links": [
    {
      "href": "text",
      "rel": "text",
      "type": "text",
      "title": "text"
    }
  ]
}

OS NGD API – Features conformance page

GEThttps://api.os.uk/features/ngd/ofa/v1/conformance
Response

Ordnance Survey National Geographic Database API – Features conformance page.

Body
conformsToarray of string
Request
const response = await fetch('https://api.os.uk/features/ngd/ofa/v1/conformance', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "conformsTo": [
    "text"
  ]
}

Get list of all OS NGD feature collections

Get a list of all the available OS NGD feature collections

GEThttps://api.os.uk/features/ngd/ofa/v1/collections
Response

All Ordnance Survey National Geographic Database feature collections.

Body
linksarray of Link (object)
crsarray of enum
collectionsarray of CollectionResponse (object)
Request
const response = await fetch('https://api.os.uk/features/ngd/ofa/v1/collections', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "links": [
    {
      "href": "text",
      "rel": "text",
      "type": "text",
      "title": "text"
    }
  ],
  "crs": [
    "http://www.opengis.net/def/crs/OGC/1.3/CRS84"
  ],
  "collections": [
    {
      "id": "text",
      "title": "text",
      "description": "text",
      "crs": [
        "http://www.opengis.net/def/crs/OGC/1.3/CRS84"
      ],
      "storageCrs": "http://www.opengis.net/def/crs/OGC/1.3/CRS84",
      "itemType": "text",
      "extent": {
        "spatial": {
          "bbox": [
            [
              0
            ]
          ],
          "crs": "text"
        },
        "temporal": {
          "interval": [
            [
              "text"
            ]
          ],
          "trs": "text"
        }
      },
      "links": [
        {
          "href": "text",
          "rel": "text",
          "type": "text",
          "title": "text"
        }
      ]
    }
  ]
}

Get a single OS NGD feature collection

Get information about an OS NGD feature collection

GEThttps://api.os.uk/features/ngd/ofa/v1/collections/{collectionId}
Path parameters
collectionId*enum

A known collection ID.

bld-fts-building-1bld-fts-building-2bld-fts-buildingline-1bld-fts-buildingpart-1gnm-fts-namedarea-1gnm-fts-namedpoint-1gnm-fts-namedroadjunction-1lnd-fts-land-1lnd-fts-land-2lnd-fts-landform-1lnd-fts-landformline-1lnd-fts-landformpoint-1lnd-fts-landpoint-1lus-fts-site-1lus-fts-siteaccesslocation-1lus-fts-siteroutingpoint-1str-fts-compoundstructure-1str-fts-fieldboundary-1str-fts-structure-1str-fts-structure-2str-fts-structureline-1str-fts-structurepoint-1trn-fts-cartographicraildetail-1trn-fts-rail-1trn-fts-rail-2trn-fts-roadline-1trn-fts-roadtrackorpath-1trn-fts-roadtrackorpath-2trn-ntwk-connectinglink-1trn-ntwk-connectingnode-1trn-ntwk-ferrylink-1trn-ntwk-ferrynode-1trn-ntwk-ferryterminal-1trn-ntwk-path-1trn-ntwk-pathlink-1trn-ntwk-pathnode-1trn-ntwk-pavementlink-1trn-ntwk-railwaylink-1trn-ntwk-railwaylinkset-1trn-ntwk-railwaynode-1trn-ntwk-road-1trn-ntwk-roadjunction-1trn-ntwk-roadlink-1trn-ntwk-roadlink-2trn-ntwk-roadlink-3trn-ntwk-roadnode-1trn-ntwk-street-1trn-ntwk-tramonroad-1trn-rami-averageandindicativespeed-1trn-rami-highwaydedication-1trn-rami-maintenancearea-1trn-rami-maintenanceline-1trn-rami-maintenancepoint-1trn-rami-reinstatementarea-1trn-rami-reinstatementline-1trn-rami-reinstatementpoint-1trn-rami-restriction-1trn-rami-routinghazard-1trn-rami-routingstructure-1trn-rami-specialdesignationarea-1trn-rami-specialdesignationline-1trn-rami-specialdesignationpoint-1wtr-fts-intertidalline-1wtr-fts-tidalboundary-1wtr-fts-water-1wtr-fts-water-2wtr-fts-waterpoint-1wtr-ntwk-waterlink-1wtr-ntwk-waterlinkset-1wtr-ntwk-waternode-1
Response

A single Ordnance Survey National Geographic Database feature collection.

Body
idstring
titlestring
descriptionstring
crsarray of enum
storageCrsenum
http://www.opengis.net/def/crs/OGC/1.3/CRS84http://www.opengis.net/def/crs/EPSG/0/27700http://www.opengis.net/def/crs/EPSG/0/7405http://www.opengis.net/def/crs/EPSG/0/4326http://www.opengis.net/def/crs/EPSG/0/3857
itemTypestring
extentExtent (object)
linksarray of Link (object)
Request
const response = await fetch('https://api.os.uk/features/ngd/ofa/v1/collections/{collectionId}', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "id": "text",
  "title": "text",
  "description": "text",
  "crs": [
    "http://www.opengis.net/def/crs/OGC/1.3/CRS84"
  ],
  "storageCrs": "http://www.opengis.net/def/crs/OGC/1.3/CRS84",
  "itemType": "text",
  "extent": {
    "spatial": {
      "bbox": [
        [
          0
        ]
      ],
      "crs": "text"
    },
    "temporal": {
      "interval": [
        [
          "text"
        ]
      ],
      "trs": "text"
    }
  },
  "links": [
    {
      "href": "text",
      "rel": "text",
      "type": "text",
      "title": "text"
    }
  ]
}

Get schema for a single OS NGD feature collection

GEThttps://api.os.uk/features/ngd/ofa/v1/collections/{collectionId}/schema
Path parameters
collectionId*enum

A known collection ID.

bld-fts-building-1bld-fts-building-2bld-fts-buildingline-1bld-fts-buildingpart-1gnm-fts-namedarea-1gnm-fts-namedpoint-1gnm-fts-namedroadjunction-1lnd-fts-land-1lnd-fts-land-2lnd-fts-landform-1lnd-fts-landformline-1lnd-fts-landformpoint-1lnd-fts-landpoint-1lus-fts-site-1lus-fts-siteaccesslocation-1lus-fts-siteroutingpoint-1str-fts-compoundstructure-1str-fts-fieldboundary-1str-fts-structure-1str-fts-structure-2str-fts-structureline-1str-fts-structurepoint-1trn-fts-cartographicraildetail-1trn-fts-rail-1trn-fts-rail-2trn-fts-roadline-1trn-fts-roadtrackorpath-1trn-fts-roadtrackorpath-2trn-ntwk-connectinglink-1trn-ntwk-connectingnode-1trn-ntwk-ferrylink-1trn-ntwk-ferrynode-1trn-ntwk-ferryterminal-1trn-ntwk-path-1trn-ntwk-pathlink-1trn-ntwk-pathnode-1trn-ntwk-pavementlink-1trn-ntwk-railwaylink-1trn-ntwk-railwaylinkset-1trn-ntwk-railwaynode-1trn-ntwk-road-1trn-ntwk-roadjunction-1trn-ntwk-roadlink-1trn-ntwk-roadlink-2trn-ntwk-roadlink-3trn-ntwk-roadnode-1trn-ntwk-street-1trn-ntwk-tramonroad-1trn-rami-averageandindicativespeed-1trn-rami-highwaydedication-1trn-rami-maintenancearea-1trn-rami-maintenanceline-1trn-rami-maintenancepoint-1trn-rami-reinstatementarea-1trn-rami-reinstatementline-1trn-rami-reinstatementpoint-1trn-rami-restriction-1trn-rami-routinghazard-1trn-rami-routingstructure-1trn-rami-specialdesignationarea-1trn-rami-specialdesignationline-1trn-rami-specialdesignationpoint-1wtr-fts-intertidalline-1wtr-fts-tidalboundary-1wtr-fts-water-1wtr-fts-water-2wtr-fts-waterpoint-1wtr-ntwk-waterlink-1wtr-ntwk-waterlinkset-1wtr-ntwk-waternode-1
Response

Schema for an Ordnance Survey National Geographic Database feature collection.

Body
Other propertiesobject
Request
const response = await fetch('https://api.os.uk/features/ngd/ofa/v1/collections/{collectionId}/schema', {
    method: 'GET',
    headers: {},
});
const data = await response.json();

Get a list of queryable attributes for this feature collection

GEThttps://api.os.uk/features/ngd/ofa/v1/collections/{collectionId}/queryables
Path parameters
collectionId*enum

A known collection ID.

bld-fts-building-1bld-fts-building-2bld-fts-buildingline-1bld-fts-buildingpart-1gnm-fts-namedarea-1gnm-fts-namedpoint-1gnm-fts-namedroadjunction-1lnd-fts-land-1lnd-fts-land-2lnd-fts-landform-1lnd-fts-landformline-1lnd-fts-landformpoint-1lnd-fts-landpoint-1lus-fts-site-1lus-fts-siteaccesslocation-1lus-fts-siteroutingpoint-1str-fts-compoundstructure-1str-fts-fieldboundary-1str-fts-structure-1str-fts-structure-2str-fts-structureline-1str-fts-structurepoint-1trn-fts-cartographicraildetail-1trn-fts-rail-1trn-fts-rail-2trn-fts-roadline-1trn-fts-roadtrackorpath-1trn-fts-roadtrackorpath-2trn-ntwk-connectinglink-1trn-ntwk-connectingnode-1trn-ntwk-ferrylink-1trn-ntwk-ferrynode-1trn-ntwk-ferryterminal-1trn-ntwk-path-1trn-ntwk-pathlink-1trn-ntwk-pathnode-1trn-ntwk-pavementlink-1trn-ntwk-railwaylink-1trn-ntwk-railwaylinkset-1trn-ntwk-railwaynode-1trn-ntwk-road-1trn-ntwk-roadjunction-1trn-ntwk-roadlink-1trn-ntwk-roadlink-2trn-ntwk-roadlink-3trn-ntwk-roadnode-1trn-ntwk-street-1trn-ntwk-tramonroad-1trn-rami-averageandindicativespeed-1trn-rami-highwaydedication-1trn-rami-maintenancearea-1trn-rami-maintenanceline-1trn-rami-maintenancepoint-1trn-rami-reinstatementarea-1trn-rami-reinstatementline-1trn-rami-reinstatementpoint-1trn-rami-restriction-1trn-rami-routinghazard-1trn-rami-routingstructure-1trn-rami-specialdesignationarea-1trn-rami-specialdesignationline-1trn-rami-specialdesignationpoint-1wtr-fts-intertidalline-1wtr-fts-tidalboundary-1wtr-fts-water-1wtr-fts-water-2wtr-fts-waterpoint-1wtr-ntwk-waterlink-1wtr-ntwk-waterlinkset-1wtr-ntwk-waternode-1
Response

A list of queryable attributes and their types for this feature collection.

Body
$schemastring
$idstring
typestring
titlestring
descriptionstring
propertiesobject
Request
const response = await fetch('https://api.os.uk/features/ngd/ofa/v1/collections/{collectionId}/queryables', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "$schema": "text",
  "$id": "text",
  "type": "text",
  "title": "text",
  "description": "text"
}

Retrieve features in the feature collection

GEThttps://api.os.uk/features/ngd/ofa/v1/collections/{collectionId}/items
Authorization
Path parameters
collectionId*enum

A known collection ID.

bld-fts-building-1bld-fts-building-2bld-fts-buildingline-1bld-fts-buildingpart-1gnm-fts-namedarea-1gnm-fts-namedpoint-1gnm-fts-namedroadjunction-1lnd-fts-land-1lnd-fts-land-2lnd-fts-landform-1lnd-fts-landformline-1lnd-fts-landformpoint-1lnd-fts-landpoint-1lus-fts-site-1lus-fts-siteaccesslocation-1lus-fts-siteroutingpoint-1str-fts-compoundstructure-1str-fts-fieldboundary-1str-fts-structure-1str-fts-structure-2str-fts-structureline-1str-fts-structurepoint-1trn-fts-cartographicraildetail-1trn-fts-rail-1trn-fts-rail-2trn-fts-roadline-1trn-fts-roadtrackorpath-1trn-fts-roadtrackorpath-2trn-ntwk-connectinglink-1trn-ntwk-connectingnode-1trn-ntwk-ferrylink-1trn-ntwk-ferrynode-1trn-ntwk-ferryterminal-1trn-ntwk-path-1trn-ntwk-pathlink-1trn-ntwk-pathnode-1trn-ntwk-pavementlink-1trn-ntwk-railwaylink-1trn-ntwk-railwaylinkset-1trn-ntwk-railwaynode-1trn-ntwk-road-1trn-ntwk-roadjunction-1trn-ntwk-roadlink-1trn-ntwk-roadlink-2trn-ntwk-roadlink-3trn-ntwk-roadnode-1trn-ntwk-street-1trn-ntwk-tramonroad-1trn-rami-averageandindicativespeed-1trn-rami-highwaydedication-1trn-rami-maintenancearea-1trn-rami-maintenanceline-1trn-rami-maintenancepoint-1trn-rami-reinstatementarea-1trn-rami-reinstatementline-1trn-rami-reinstatementpoint-1trn-rami-restriction-1trn-rami-routinghazard-1trn-rami-routingstructure-1trn-rami-specialdesignationarea-1trn-rami-specialdesignationline-1trn-rami-specialdesignationpoint-1wtr-fts-intertidalline-1wtr-fts-tidalboundary-1wtr-fts-water-1wtr-fts-water-2wtr-fts-waterpoint-1wtr-ntwk-waterlink-1wtr-ntwk-waterlinkset-1wtr-ntwk-waternode-1
Query parameters
Response

A list of features in a feature collection.

Body
typestring
linksarray of Link (object)
timeStampstring (date-time)
featuresarray of Feature (object)
Request
const response = await fetch('https://api.os.uk/features/ngd/ofa/v1/collections/{collectionId}/items', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "type": "text",
  "links": [
    {
      "href": "text",
      "rel": "text",
      "type": "text",
      "title": "text"
    }
  ],
  "timeStamp": "2024-05-20T06:39:59.448Z",
  "features": [
    {
      "id": "text",
      "type": "text",
      "geometry": {
        "type": "text",
        "coordinates": [
          {
            "x": 0,
            "y": 0
          }
        ]
      }
    }
  ]
}

Retrieve a feature from the feature collection

GEThttps://api.os.uk/features/ngd/ofa/v1/collections/{collectionId}/items/{featureId}
Authorization
Path parameters
collectionId*enum

A known collection ID.

bld-fts-building-1bld-fts-building-2bld-fts-buildingline-1bld-fts-buildingpart-1gnm-fts-namedarea-1gnm-fts-namedpoint-1gnm-fts-namedroadjunction-1lnd-fts-land-1lnd-fts-land-2lnd-fts-landform-1lnd-fts-landformline-1lnd-fts-landformpoint-1lnd-fts-landpoint-1lus-fts-site-1lus-fts-siteaccesslocation-1lus-fts-siteroutingpoint-1str-fts-compoundstructure-1str-fts-fieldboundary-1str-fts-structure-1str-fts-structure-2str-fts-structureline-1str-fts-structurepoint-1trn-fts-cartographicraildetail-1trn-fts-rail-1trn-fts-rail-2trn-fts-roadline-1trn-fts-roadtrackorpath-1trn-fts-roadtrackorpath-2trn-ntwk-connectinglink-1trn-ntwk-connectingnode-1trn-ntwk-ferrylink-1trn-ntwk-ferrynode-1trn-ntwk-ferryterminal-1trn-ntwk-path-1trn-ntwk-pathlink-1trn-ntwk-pathnode-1trn-ntwk-pavementlink-1trn-ntwk-railwaylink-1trn-ntwk-railwaylinkset-1trn-ntwk-railwaynode-1trn-ntwk-road-1trn-ntwk-roadjunction-1trn-ntwk-roadlink-1trn-ntwk-roadlink-2trn-ntwk-roadlink-3trn-ntwk-roadnode-1trn-ntwk-street-1trn-ntwk-tramonroad-1trn-rami-averageandindicativespeed-1trn-rami-highwaydedication-1trn-rami-maintenancearea-1trn-rami-maintenanceline-1trn-rami-maintenancepoint-1trn-rami-reinstatementarea-1trn-rami-reinstatementline-1trn-rami-reinstatementpoint-1trn-rami-restriction-1trn-rami-routinghazard-1trn-rami-routingstructure-1trn-rami-specialdesignationarea-1trn-rami-specialdesignationline-1trn-rami-specialdesignationpoint-1wtr-fts-intertidalline-1wtr-fts-tidalboundary-1wtr-fts-water-1wtr-fts-water-2wtr-fts-waterpoint-1wtr-ntwk-waterlink-1wtr-ntwk-waterlinkset-1wtr-ntwk-waternode-1
featureId*string

A feature ID which is the identifier(id) for the feature.

Query parameters
Response

A single feature in the feature collection.

Body
idstring
typestring
geometryGeometry (object)
propertiesobject
Request
const response = await fetch('https://api.os.uk/features/ngd/ofa/v1/collections/{collectionId}/items/{featureId}', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "id": "text",
  "type": "text",
  "geometry": {
    "type": "text",
    "coordinates": [
      {
        "x": 0,
        "y": 0
      }
    ]
  }
}

Use of CQL Operators

The OS NGD API – Features supports a generic filter grammar called Common Query Language (CQL) for specifying enhanced filter criteria to return a subset of features. CQL is written using a familiar text-based syntax, making it more readable and better-suited for creating complex filters.

The following table documents the supported operators:

Operator TypeSupported Operators

Comparison

EQUAL TO [ = ], LESS THAN [ < ], LESS THAN OR EQUAL TO [ <= ], GREATER THAN [ > ], GREATER THAN OR EQUAL TO [ >= ], ISNULL, LIKE, IN, BETWEEN

Logical

AND, OR, NOT [ <> ]

Array

AEQUALS, ACONTAINS, ACONTAINEDBY, AOVERLAPS

Spatial

INTERSECTS

Last updated