Jump to the following:

Ordnance Survey logo

Discover Ordnance Survey

Site Search

OS OpenSpace API code playground

Our code playground is an interactive way for you to explore our API examples and experiment with your own code. You can edit these examples and then download your bespoke code.

Have a play with OS OpenSpace API now

1. Click on one of the example links below, it will show the end result of the example code.

2. Click on ‘Edit in Code Playground’ to see the HTML and JavaScript codes. You can also click on ‘Real-time preview’ to see the map change as you change the code.

3. Click ‘Render’ to go back to the full view of the map.

4. Click ‘Download’ to download the full code merged into one HTML file, ready for you to use.

Button to click to sign up for the OS openSpace API

Want to commercialise your applications?

You are free to use OS OpenSpace API for any freely accessible application you would like to build. If you are planning on commercialising this application, then you will need to sign up for our OS OpenSpace Pro service which would give you even more great mapping and technical and account management support.

Working with other OS API services

If you wish to use these code samples for OS OpenSpace Pro or OS OnDemand, you will need to make some small changes, as they use product codes rather than resolutions. You will aslo need to change the API URL (provided to you in your welcome pack) to the relevant service. Please see Getting started with OS OpenSpace Pro and OS OnDemand Web Map Tile Service (WMTS-like) for more information.

For general enquiries, complaints, feedback or suggestions, email: customerservices@ordnancesurvey.co.uk or call us on 08456 05 05 05