Introducing our new location APIs
Updated: 11 January 2021
We’ve introduced a new range of location APIs that you can access via our OS Data Hub. They all give you access to OS OpenData, and the option to upgrade to premium data (unless you’re a public sector member, as you’ll be using the Public Sector Plan), and you can get started for free on the OS Data Hub.
There are different options for accessing and using OS data and which API 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.
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.
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
Through the APIs you 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 11 January 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.
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.
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.
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.
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.
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
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 visit our new page to find out about the Public Sector Plan and how to sign up.