This is a beta service. If you would like to provide feedback or suggestions, please contact enquiries@bgs.ac.uk

BGS Sensor API

This service provides an application programming interface (API) for data scientists, software developers and software applications to query and download BGS-hosted sensor data in machine-readable JSON format.

The API is powered by FROST Server and conforms to the OGC SensorThings API specification. See the documentation below for details.

Access the API
Arrow Down Icon

The API is powered by the FROST server and conforms to the OGC SensorThings API specification.

OGC logo
The OGC SensorThings API is an OGC standard specification for providing an open and unified way to interconnect IoT devices, data, and applications over the Web. The SensorThings API is an open standard, builds on Web protocols and the OGC Sensor Web Enablement standards, and applies an easy-to-use REST-like style.

Getting started

SensorThings API provides access to up-to-date measurement information that is:

  • RESTful
  • (Geo)JSON encoded
  • Available via OASIS Odata URL patterns and query options

You can navigate through the API using the links provided within it, but the real power lies in the ability to write specific URLs to select, filter, link and format the information you require.

The OpenAPI specification documents the types of data that are available. The “Schemas” section describes the fields associated with each type of data. Most fields are as defined by the SensorThings standard, but within the JSON there is a ‘properties’ tag (‘parameters’ for observations) that contains the supplementary customised data required within BGS.

An overview of how to write url queries is available here.

API Documentation

frost server screenshost

FROST Server Documentation

The FROST Server documentation describes the SensorThings API data model and provides example requests for querying data. FROST Server is open source (GPLv3) and the code is available on GitHub.

frost server screenshost

API documentation

The British Geological Survey (BGS) Sensor API uses Version v1.1 of the OGC SensorThings API. Explore the paths/endpoints and preview the API responses in this documentation.

Using the Sensor API

how to video screenshot

How-to video

This video tutorial (10 mins) explains how to use the API to query and plot data in Python.

frost server screenshot

Example code

Jupyter Notebook with the Python code used to query and plot data in the video.

Contact us

If you have any questions or would like to provide feedback or suggestions, please contact enquiries@bgs.ac.uk