Introducing our new location APIs

Update: 1 July 2020, OS APIs now live and available via our OS Data Hub, sign up here

This summer, we’ll be introducing a new range of location APIs that you can access via our Data Hub. They all give you access to OS OpenData, and the option to upgrade to premium data, and you can get started for free on the Data Hub.

There are different options for accessing and using OS data and which one you choose will depend on your use case. You may want to download datasets and have access to all the features locally or offline. Or you may prefer direct access to the maps or data you need, as and when you need them, via the internet – and this is where APIs are useful.

This is a short guide focusing on our new APIs, helping you choose the right one for your use case.

What is an API?

Application Programming Interfaces aka APIs – what are they?

Essentially APIs are a set of rules that lets programs talk to each other, exposing data and functionality across the internet in a consistent format. APIs allow access to data and content, Web APIs focus on exposing data as a web service, often requested from a web page or web application.

Laptop talking to server image

Even if we’re not familiar with the terminology, we all use APIs whether we’re aware of it or not. Location APIs provide direct access to geospatial data in various ways. Every time you interact with a map on the web, you’re using an API. This includes loading the map content, zooming in on a map, changing the map style, searching for an address, routing from A to B or clicking on a feature for more information.

APIs are the building blocks for all web-based mapping applications. They can remove the overhead of managing and storing the data yourself, helping you save time and money.

Our API history

Our OS API journey started in 2007 when we launched OS OpenSpace, offering free access to our Leisure maps over the web. This was a popular product and since then we have developed a suite of offerings with differing functionality. Our APIs have continued to support a wide variety of use cases, from environmental research to mapping detailed underground infrastructure.

In the last 12 months alone, we have served over 10 billion map tiles via our APIs.

A single map tile is 256×256 pixels in size.

Sample of a map tile showing an area of Barnstaple

As well as APIs serving maps, we offer the ability to search for accurate locations, match and cleanse addresses and even automate your open data downloads.

Our new range of APIs

The APIs are launching this July, but you can sign-up now to trial them. Through the APIs you will have free unlimited access to OS OpenData to use for personal, or commercial reasons; and free access to OS premium data, including OS MasterMap, up to a value of £1,000 a month for developing apps, products and services for use by third parties.

If you’re a developer working in the public sector and the organisation is a member of the Public Sector Geospatial Agreement (PSGA), you will have free access to all of the APIs under the PSGA terms from early 2021.

See the APIs available:

OS Maps API – a raster tile service

Integrate our up-to-date, detailed maps in your apps, including OS MasterMap Topography Layer.  You can connect to OS Maps API using GIS software, web or mobile applications and the maps are available in two different projections (British National Grid and Web Mercator).

Choose from our four styles or use them all depending on your use case. Our Leisure stack gives you access to 1:25 000 Scale Colour Raster whilst is available in our three house styles – Road, Outdoor and Light.

> Check out the documentation for more information

OS MasterMap Topography Layer sample

OS Vector Tile API – a vector tile service

With the OS Vector Tile API designers and developers can create slick, quick vector maps that are fully customisable.  Vector Tiles give you the ability to tailor the style and/or content to make your perfect map, specific to your needs. Again, these maps are available in the same two projections.

With a Vector Tile Service, you can also tilt the map and display extruded features in three dimensions.

> Check out the documentation for more information

OS Features API – a web feature service

This exciting new API is the first time we’ve offered this type of direct access to OS MasterMap data.

OS Features API gives you direct access to detailed geographic data of Great Britain for your analysis, taking full advantage of precise geometries and rich attributes to generate new insight. This API removes the need to download, store and manage large and complex datasets. Instead, users can access the data they need when they need it. There are many data layers available from which you can filter and select based on location or attribution. Buildings, roads, greenspaces and much more.

> Check out the documentation for more information

OS Downloads API – machine-to-machine open data downloads

The OS Downloads API is a service that lets you automate the discovery and download of OS OpenData. This improves the accessibility of the products.

> Check out the documentation for more information

We recently created a data science tutorial which uses a combination of these new APIs and 3rd party data to analyse price paid data at LSOA level, presented as a Jupyter Notebook.

Data extract including Points of Interest product

We also have the following APIs.

OS Places – an address look-up service offering various ways to search, match and cleanse based on AddressBase Premium.

OS Names – an accurate location look-up service including place names, postcodes, roads and much more.

Try our APIs now

The OS Data Hub is currently in beta – you can sign-up now and start trialing these new APIs – we would love to hear your feedback.

To help you get started with your web map projects we are also introducing a new set of code examples. From adding a basic map to locating the nearest greenspaces, check out our Examples and start building now.

Visit our Developer site to see more examples of using APIs and how we can help you: os.uk/developers

If you work in the public sector and are a member of the Public Sector Geospatial Agreement (PSGA), you will have free access to all of the APIs under the PSGA terms from early 2021.

Stay up to date with our #OSDeveloper content by signing up for our newsletter.

You may also like

OS Data Hub to canvas: bring your favourite GB locations to life
Space, maps and the vulnerable – how integrated spatial data can help society
Meet the team: Alina Piotrowska
Building Passport – the story so far

Leave a Reply

Your email address will not be published. Required fields are marked *

Name* :

Email* :