# OS Features API Archive

A lot of the detail of accessing the OS Features API Archive is the same as accessing the main OS Features API. This detail is covered in [Using the OS Features API](https://github.com/OrdnanceSurvey/more-than-maps-reorg/blob/main/os-mastermap-generation-data-demonstrators/os-mastermap-generation-apis/broken-reference/README.md). This page is primarily focused on the things that are different when wanting to specifically use the Archive.

## What is the OS Features API Archive?

OS Features API Archive gives you simple access to previously released non-OS NGD OS Data such as:

* OS MasterMap Topography Layer
* OS MasterMap Highways Network
* OS MasterMap Integrated Transport Network-Roads
* OS MasterMap Integrated Transport Network-Urban Paths
* OS Open UPRN

The OS Features API Archive allows you to

* Request specific feature types and their attributes using spatial or layer queries, although if using the bbox option care must be taken not to choose too big an area otherwise API throttle limits will be reached very quickly
* Visualise and style the returned OS MasterMap data
* Interrogate the highly detailed feature information of OS MasterMap Topography Layer, Highways and historic Integrated Transport Network data
* Create and apply your own styling preferences or use the existing style sheets that can be found in the OS Repositories on GitHub can be used to style the data

<figure><img src="/files/INSB7vy5VCGXKzTcfelx" alt=""><figcaption></figcaption></figure>

## What products are in the OS Features API Archive?

The [technical specification ](https://osdatahub.os.uk/docs/wfs/technicalSpecification)on the OS Data Hub goes into detail about the products accessible through the API

The archive will go back as far as the dates shown below for each product, which is important when setting the year in the API request as there is no Highways data for pre-2016 for example.

The archive data is the last full release of the product in the given year, so this is not an archive of ALL data releases, only a snapshot from the end of the year ,although this can vary between November and December depending when product releases fell in a particular year.

<figure><img src="/files/8H3CQy0osu38Q7x9Piqe" alt=""><figcaption></figcaption></figure>

## How do I access the OS Features API Archive?

You can get access to the API through the OS Data Hub. The on the api documentation platform has a [walkthrough of how to get your API key](https://docs.os.uk/os-apis/core-concepts/getting-started-with-an-api-project) and a [getting started guide](https://docs.os.uk/os-apis/accessing-os-apis/os-features-api/getting-started) with a walkthrough of how to set up the API in a range of GIS software.

Example scripts for getting started with the API can be found online with code examples for various functions (for example showing features, finding the nearest feature) on [OS labs](https://labs.os.uk/public/os-data-hub-examples/os-features-api/wfs-example-topo-toid-search#maplibre-gl-js)

Once you have your API key, to access the archive you need to adjust the OS Features API endpoint by adding a year as shown here:

*<https://api.os.uk/features/v1/wfs/archive/**2017**/?key=YourAPIKeyGoesHere>*

With your API endpoint adjusted for the Archive you can access the API through GIS Software (such as QGIS and Cadcorp) and through programming languages such as Python and R.

## What are the main benefits of the OS Features API Archive?

Over and above the benefits of the OS Features API generally, you can quickly and easily identify what your area of interest looked like historically using the same familiar data specification and styles as existing in life products. This is useful to understand previous land use for planning or for historical research for example.

<figure><img src="/files/1vX9iaKM7PQycOFg1dHB" alt=""><figcaption></figcaption></figure>

## How to view multiple years in one GIS session

There are a couple of options to enable you to view multiple years in one GIS session.

* Set up the API endpoint, bring in the data for, say 2017, then edit the end point to 2010 and bring in the data again. The issue here is needing to constantly edit the end point string
* Set up an endpoint for each year with the year set in the API string and bring in each endpoint as needed to see that year. Given there is only one cut of data for each year this works quite well, and easily allows you to swap between data epochs to quickly identify changes in the landscape

<figure><img src="/files/LXWTqlf5L7fYieFslLAA" alt=""><figcaption><p>2004 OS MasterMap Topography data with 2021 Topographic Lines over the top</p></figcaption></figure>

## Limitations

* 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.
* Support – the API is not currently supported by all GIS software.

## Resources

There are a number of resources available for the OS Features API:

* The Data Hub contains an [overview](https://osdatahub.os.uk/docs/wfs/overview) of the API, a [getting started guide ](https://osdatahub.os.uk/docs/wfs/gettingStarted)and a [technical specification](https://osdatahub.os.uk/docs/wfs/technicalSpecification)
* There are a series of [code examples ](https://labs.os.uk/public/os-data-hub-examples/os-features-api/wfs-example-topo-toid-search)to help you get started with the API
* More resources, including style sheets and example scripts, are available on [GitHub](https://github.com/OrdnanceSurvey/os-data-hub-tutorials)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.os.uk/more-than-maps/data-demonstrators/api-demonstrators/using-the-os-features-api-archive.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
