Accessing OS NGD APIs
OS NGD API – Features and OS NGD API – Tiles are APIs that give you simple, direct access to the OS National Geographic Database (NGD). You can use them to get started quickly with the OS NGD and request the data you need, as and when you need it, using the latest in API standards (the APIs are based on the OGC API – Features specification and OGC API – Tiles specification, respectively).
The APIs are self-documenting and allow you to easily discover what OS NGD data is available before using it. You can explore the various data collections for free to decide what best suits your needs. The data is ready to use in numerous applications (desktop, web, and mobile), enabling you to power your applications with rich, consistent and current information about the real world.
With OS NGD API – Features, you can filter by attribute, location and / or time to create your own customised data selections. This API can help accelerate your time-to-value by making it easier to build awesome things with our trusted geospatial data. You can use it to reduce your data management overheads, automate your workflows, and innovate at pace.
You can:
- Request specific features using spatial, attribute, and / or time queries.
- Interrogate highly detailed feature information.
- Freely discover what OS NGD data collections are available.
- Explore the OS NGD data schemas and queryables.
- Request data in GeoJSON format.
- Visualise Ordnance Survey data and apply your own styling.
You can't:
- Create a scalable map of Great Britain across zoom levels.
- Request more than 100 features in a single transaction.
- Access data from the OS NGD Address and OS NGD Administrative and Statistical Units Themes.
- Access data from the Waterbody Catchment and River Basin District Catchment Feature Types (of the Water Features Collection in the OS NGD Water Theme).
OS NGD API – Tiles offers you a vector tile service powered by the OS NGD. It provides a detailed and customisable basemap that's based on the latest OGC API – Tiles standard to help you create stunning and interactive web maps. It can be used with most web mapping libraries, including OpenLayers, MapLibre GL JS and Leaflet. The major benefit of vector tiles is that they are optimised for use across the internet and are therefore great for building interactive web maps that allow users to zoom, pan, rotate, tilt and more.
You have a choice between using Ordnance Survey styles or creating your own. You can customise the content and style to create a professional-looking map that perfectly meets your needs, matches your branding, and pleases your customers.
OS NGD API – Tiles is available in two projections: British National Grid for Great Britain (GB) data and Web Mercator, a global coordinate system.
The following table details the OS NGD datasets that were used to create the OS NGD API – Tiles basemap. The result is a detailed OS basemap that combines OS Open Zoomstack and OS NGD data.
Theme | Collection | Feature Type(s) |
---|---|---|
Building Features | Building Part | |
Named Features | Named Point | |
Land Features | Land, Land Point, Landform, Landform Line | |
Land Use Features | Site | |
Structure Features | Compound Structure, Structure, Structure Line | |
Transport Features | Cartographic Rail Detail, Rail, Road Line, Road Track or Path | |
| Transport Network | Path, Path Link, Road |
Water Features | Inter Tidal Line, Tidal Boundary, Water, Water Point | |
| Water Network | Water Link, Water Link Set, Water Node |
OS NGD data included in the ngd-base collection will be updated on a weekly basis.
Although OS NGD API – Tiles will be updated weekly, the data updates are based on the set currency of the OS NGD collections (for example, the Structure Features Collection currency is daily, whereas the Water Network Collection currency is monthly).
The following table details the OS NGD datasets that can be used as overlays to the basemap to add additional information:
Theme | Collection | Collection ID | Feature Type(s) |
---|---|---|---|
Administrative and Statistical Units | Boundaries | asu-bdy | Boundary High Water Mark, Ceremonial County, Country, Devolved Parliament Constituency, Devolved Parliament Electoral Region, Electoral Division, GLA Assembly Constituency, Historic County, Historic European Region, Lower Tier Local Authority, Parish Or Community, Polling District, Region, Regional Authority, Upper Tier Local Authority, Ward, Westminster Constituency |
Water | Water Features | wtr-ctch | River Basin District Catchment, Waterbody Catchment |
The data overlays included as part of OS NGD API – Tiles are updated when the two OS NGD data collections are updated:
- asu-bdy: Biannually
- wtr-ctch: Updated as and when updates are received from third-party data from the authoritative bodies
The following attribution is available as part of OS NGD API – Tiles:
- OSID
- Description
- Version Available From Date
- Name 1 Text
- Designated Name 1 Text (only applicable to the Road Feature Type)
- Waterbody Name Text (only applicable to the Waterbody Catchment Feature Type)
- River Basin District Name (only applicable to the River Basin District Catchment Feature Type)
The map features do not contain every OS NGD feature type, nor the complete list of attribution available within the feature types that are included; we have purposefully only selected feature types and a subset of attribution from them that are useful for visualisation as this keeps the tiles lightweight and quick to render.
The inclusion of unique identifiers (IDs), where available, allows you to cross-reference with the full product, for example, with OS NGD API – Features.
You can:
- Use it as a basemap in GIS, web or mobile applications.
- View the whole of Great Britain in unrivalled detail.
- Seamlessly pan, zoom, pitch and tilt the map.
- Overlay your own data on the basemap to give geographic context to your data.
- Trace over OS NGD (Premium Data) detailed geometries.
- Customise the map style and content to create the map you need.
- Access maps in different projections: British National Grid and Web Mercator.
You can't:
- Retrieve all the detailed attribution from OS NGD data.
- Access data from the OS NGD Address Theme.
- Access data from the Routing and Asset Management Information (RAMI) Collection (of the OS NGD Transport Theme).
Before you can access the OS NGD APIs, you will need to add one of them to a new or an existing project in the OS Data Hub and generate an API key.
YouTube video showing how to add OS NGD API – Features to a new project on the OS Data Hub and generate an API key.
YouTube video showing how to add OS NGD API – Tiles to a new project on the OS Data Hub and generate an API key.
To do this:
- 1.
- 2.Select API Dashboard from the main menu (you must be signed into the OS Data Hub to view the contents of this tab).
- 3.Select APIs from the secondary navigation menu.
- 4.Select the Add to API project button of the API you want to add.
- 5.If you already have a project, you may want to add OS NGD API – Features or OS NGD API – Tiles into that existing project. Alternatively, if you want to add one of the NGD APIs to a new project, you should select Add to NEW PROJECT from the drop-down menu. If creating a new project, enter the project name.
- 6.The next screen will contain the project API key and the API endpoint address (API URL).
You can return to this screen by clicking My projects from the secondary navigation menu at any point in the future if you need to copy your API key or the API endpoint address, or if you need to regenerate your API key.
%20.png?alt=media&token=af802333-be87-4649-a382-e66b4174652e)
Example screenshot of the API Dashboard section of OS Data Hub showing details about a project, including the project's name, API key and API endpoint address.
You can freely explore OS NGD data without having an API key.
To find an API endpoint address:
- 1.
- 2.Select API Dashboard from the main menu (you must be signed into the OS Data Hub to view the contents of this tab).
- 3.Select My projects from the secondary navigation menu.
- 4.Select the project you're interested in.
- 5.Your API endpoint address will be displayed in the project information under the OS NGD API that has been added to the project.
- Technical documentation: Overviews, Technical Specifications, and Getting Started Guides for the OS NGD APIs are available on the 'API Documentation, Examples & Demos' page of OS Data Hub.
- Code examples: Information on code examples for the OS NGD APIs is available on the 'Using Code Examples' page.
- Tutorials: Technical articles provided on the 'OS NGD Tutorials' page cover a variety of topics to provide more in-depth examinations of using OS NGD data via OS Select+Build and the OS NGD APIs.
- FAQs for OS APIs: General FAQs and answers for OS APIs are available on the 'OS Data Hub FAQs: Plans' page and 'OS Data Hub FAQs: Account and API' page, for example, 'What's a Project?', 'What throttling is applied to the APIs?'
Last modified 4mo ago