OS NGD API - Features
Last updated
Website
Ordnance SurveyData
OS Data HubLast updated
OS NGD API – Features gives you simple access to the OS National Geographic Database (OS NGD)
OS NGD API – Features allows you to
Request specific feature types and their attributes using spatial or attribute queries.
Interrogate highly detailed feature information.
Freely discover what data collection are available.
Explore the data schemas.
Request data in GeoJSON format.
Visualise Ordnance Survey data and apply your own styling.
The API uses the same naming convention as OS NGD to allow you to explore themes and collections easily.
The on the OS Data Hub goes into detail about the different themes that are accessible.
The API is compliant with OGC API standards.
Your API key can be found in the API Dashboard by clicking ‘Add to Project’ under the OS NGD API – Features section
You will now be able to find the API EndPoint address with your API key under your projects
With your API key you can access the API through GIS Software (such as QGIS and Cadcorp) and through programming languages such as Python and R.
Example scripts for getting started with the API can be found online:
Plug and play – easily set up in QGIS to explore NGD data
More flexible – pull in exactly the data you want
No ordering or waiting – less time processing and storing data
Easy Testing – great for quick and easy analysis of features
The table below shows the attributes that are available to query against on top of the options available in OS Select+Build.
The main difference between the new OS NGD API – Features and the OS Features API is the OS NGD API – Features is for accessing OS NGD data.
OS NGD attribution can be explored through the OS NGD layers found in the OS NGD API – Features API
There are a number of considerations to keep in mind when using the API.
Limits- the API can return 100 features in a single call. Most GIS software will keep calling the API to bring in the requested features so it is important to set a feature limit when setting up the API. Pagination will be required when using a scripting language, this is explained in the next side.
Scale- the API is not designed to create a scalable map of Great Britain across zoom levels. It is designed to interrogate specific features and small areas.
Access- the API does not have the ability to access OS NGD Address Theme, the Administrative & Statistical Theme data or Water Catchments
CQL errors- the API currently (as of May 2023) does not allow CQL querying with apostrophe (e.g. description = ‘Children’s Centre’)
The API returns 100 features per page and the JSON response will include the URL for the following page
Most GIS already understand how to page as its part of the OGC standard. So remember to set limits to avoid calling back the entire country.
However, when using a scripting language you will need to page through the results by utilising the offset attribute.
There are a number of resources available for the OS Features API:
Get access to the API through the OS Data Hub. The getting started guide can be accessed .
The has a walk through on getting the API in QGIS.
R script for calling the API and outputting a Shiny web app
Code examples for on OS labs
The Data Hub contains an of the API, a and a
There are a series of to help you get started with the API
More resources, including style sheets and example scripts, are available on