</API>

laptop-guy.png

All Breathe London data is accessible via our API.

Register below for access.

Breathe London API signup

Register below to receive your API key. By signing up, you agree to our Terms of Use, as set out below

API Guide

The Breathe London API currently consists of three main calls:

  1. /ListSensors

    This call returns the meta-data for all Breathe London Nodes on the network as an array of JSON objects. An example object is shown below.

https://api.breathelondon.org/api/ListSensors?key=yourAPIkey

  • {

    "SiteCode": "CLDP0001",

    "SiteName": "Royal London University Hospital",

    "Latitude": 51.518775939941406,

    "Longitude": -0.059463899582624435,

    "LocalAuthorityID": null,

    "SiteClassification": "Urban Background",

    "HeadHeight": 2.4000000953674316,

    "ToRoad": 30,

    "SiteLocationType": "Hospital",

    "Indoor": 0,

    "SitePhotoURL": "https://api.breathelondon.org/assets/images/CLDP0001.jpg",

    "SiteDescription": "The Royal London Hospital is home to one of the largest children’s hospitals in the UK with one of London's busiest paediatric accident and emergency departments.\r\n\r\nIt is also home to London’s Air Ambulance service and one of the capital's leading trauma and emergency care centres and hyper-acute stroke centres.\r\n\r\nThe Breathe London Node is located near the entrance to A&E to assess the exposure of visitors, patients and staff at the hospital.",

    "SleepTime": 300,

    "BatteryStatus": "charging",

    "BatteryPercentage": 99,

    "SignalStrength": "excellent",

    "SensorsHealthStatus": "nominal",

    "OverallStatus": "healthy",

    "DeviceCode": "A7Y9WHYD",

    "StartDate": "2021-01-22T08:59:25.167Z",

    "EndDate": null,

    "LastCommunication": "2022-04-11T12:16:51.703Z",

    "InputPowerError": 0,

    "InputPowerCurrent": 69,

    "InputPowerVoltage": 4.532680034637451,

    "InputBatteryError": 0,

    "InputBatteryVoltage": 4.089559555053711,

    "ChargingStatus": 2,

    "SignalQuality": 31,

    "BatterySleepMultiplier": 1,

    "WeatherError": 0,

    "PMError": 0,

    "NO2Error": 0,

    "LatestINO2Value": 15,

    "LatestINO2Index": 1,

    "LatestINO2IndexSource": "Measurement",

    "LatestIPM10Value": 15,

    "LatestIPM10NUMValue": 11,

    "LatestIPM1Value": 5,

    "LatestIPM1NUMValue": 10,

    "LatestIPM25Value": 3,

    "LatestIPM25Index": 1,

    "LatestIPM25IndexSource": "Measurement",

    "LatestIPM25NUMValue": 11,

    "LatestRELHUMValue": null,

    "LatestTEMPERATValue": null,

    "SiteActive": 1,

    "SiteGroup": "GLA",

    "PowerTag": "Solar",

    "Enabled": "Y",

    "OtherTags": "Deployed, GLA, Solar300, Tower Hamlets, V1",

    "OrganisationName": "Mayor of London",

    "SponsorName": "Mayor of London",

    "HourlyBulletinEnd": "Apr 11 2022 1:00PM"

    },

    {

    "SiteCode": "CLDP0002",

    "SiteName": "North Middlesex University Hospital",

    "Latitude": 51.452064514160156,

    "Longitude": -0.046845998615026474,

    "LocalAuthorityID": null,

    "SiteClassification": "Roadside",

    "HeadHeight": 2.0999999046325684,

    "ToRoad": 4.800000190734863,

    "SiteLocationType": "Hospital",

    "Indoor": 0,

    "SitePhotoURL": "https://api.breathelondon.org/assets/images/CLDP0002.jpg",

    "SiteDescription": "North Middlesex University Hospital has been serving the community for over a century. The first hospital buildings on the present site were built in 1909.\r\n\r\nThe hospital has expanded and modernised over the years, improving the medical, surgical, stroke and children’s services including a brand new maternity and neonatal unit. The new maternity unit is equipped with with state-of-the-art facilities and is among the best NHS maternity units in the country.\r\n\r\nThe Breathe London Node is located by the front entrance and serves to assess the exposure of visitors, patients and staff at the hospital.",

    "SleepTime": 1,

    "BatteryStatus": "normal",

    "BatteryPercentage": 99,

    "SignalStrength": "excellent",

    "SensorsHealthStatus": "nominal",

    "OverallStatus": "healthy",

    "DeviceCode": "ABZ4Z89V",

    "StartDate": "2021-10-08T12:01:00.000Z",

    "EndDate": null,

    "LastCommunication": "2022-04-11T12:24:48.943Z",

    "InputPowerError": 0,

    "InputPowerCurrent": 95,

    "InputPowerVoltage": 5.201050281524658,

    "InputBatteryError": 0,

    "InputBatteryVoltage": 4.172635555267334,

    "ChargingStatus": 4,

    "SignalQuality": 31,

    "BatterySleepMultiplier": 1,

    "WeatherError": 0,

    "PMError": 0,

    "NO2Error": 0,

    "LatestINO2Value": 42,

    "LatestINO2Index": 1,

    "LatestINO2IndexSource": "Measurement",

    "LatestIPM10Value": 7,

    "LatestIPM10NUMValue": 7,

    "LatestIPM1Value": 2,

    "LatestIPM1NUMValue": 7,

    "LatestIPM25Value": 2,

    "LatestIPM25Index": 1,

    "LatestIPM25IndexSource": "Measurement",

    "LatestIPM25NUMValue": 7,

    "LatestRELHUMValue": null,

    "LatestTEMPERATValue": null,

    "SiteActive": 1,

    "SiteGroup": "GLA",

    "PowerTag": "Mains",

    "Enabled": "Y",

    "OtherTags": "Deployed, GLA, Haringey, V1",

    "OrganisationName": "Mayor of London",

    "SponsorName": "Mayor of London",

    "HourlyBulletinEnd": "Apr 11 2022 1:00PM"

    },

2. /Sensor

This call returns the meta-data for a single Breathe London Node as a JSON object. The call takes in SiteCode as a parameter which can be obtained from the /ListSensors call. Below is an example call and example return.

https://api.breathelondon.org/api/Sensor/SiteCode?key=yourAPIkey

  • {

    "SiteCode": "CLDP0002",

    "SiteName": "North Middlesex University Hospital",

    "Latitude": 51.61304473876953,

    "Longitude": -0.07539220154285431,

    "LocalAuthorityID": null,

    "SiteClassification": "Roadside",

    "HeadHeight": 2.0999999046325684,

    "ToRoad": 4.800000190734863,

    "SiteLocationType": "Hospital",

    "Indoor": 0,

    "SitePhotoURL": "https://api.breathelondon.org/assets/images/CLDP0002.jpg",

    "SiteDescription": "North Middlesex University Hospital has been serving the community for over a century. The first hospital buildings on the present site were built in 1909.\r\n\r\nThe hospital has expanded and modernised over the years, improving the medical, surgical, stroke and children’s services including a brand new maternity and neonatal unit. The new maternity unit is equipped with with state-of-the-art facilities and is among the best NHS maternity units in the country.\r\n\r\nThe Breathe London Node is located by the front entrance and serves to assess the exposure of visitors, patients and staff at the hospital.",

    "SleepTime": 1,

    "BatteryStatus": "normal",

    "BatteryPercentage": 99,

    "SignalStrength": "excellent",

    "SensorsHealthStatus": "nominal",

    "OverallStatus": "healthy",

    "DeviceCode": "ABZ4Z89V",

    "StartDate": "2021-10-08T12:01:00.000Z",

    "EndDate": null,

    "LastCommunication": "2023-02-01T11:29:28.677Z",

    "InputPowerError": 0,

    "InputPowerCurrent": 113,

    "InputPowerVoltage": 5.18910026550293,

    "InputBatteryError": 0,

    "InputBatteryVoltage": 4.177066326141357,

    "ChargingStatus": 4,

    "SignalQuality": 31,

    "BatterySleepMultiplier": 1,

    "WeatherError": 0,

    "PMError": 0,

    "NO2Error": 0,

    "LatestINO2Value": 12,

    "LatestINO2Index": 1,

    "LatestINO2IndexSource": "Measurement",

    "LatestIPM10Value": null,

    "LatestIPM10NUMValue": null,

    "LatestIPM1Value": null,

    "LatestIPM1NUMValue": null,

    "LatestIPM25Value": 9,

    "LatestIPM25Index": 1,

    "LatestIPM25IndexSource": "Measurement",

    "LatestIPM25NUMValue": null,

    "LatestRELHUMValue": null,

    "LatestTEMPERATValue": null,

    "SiteActive": 1,

    "SiteGroup": "GLA",

    "PowerTag": "Mains",

    "Enabled": "Y",

    "OtherTags": "Deployed, GLA, Haringey, V1",

    "OrganisationName": "Mayor of London",

    "SponsorName": "Mayor of London"

    }

3. /getClarityData

This call retrieves data from Breathe London nodes. The call takes in SiteCode as a parameter which can be obtained from the /ListSensors call. The call also takes in a species parameter - currently this is either IPM25 for PM2.5 or INO2 for NO2 data. Please note the spaces in-between the startTime and endTime parameters. These spaces can also be send as %20 encoded. Lastly, the call takes averaging as a parameter. Currently this is Hourly. Below is an example call and example return.

https://api.breathelondon.org/api/getClarityData/CLDP001/IPM25/Mon 11 Apr 2022 11:00:00 GMT/Mon 11 Apr 2022 13:00:00 GMT/Hourly?key=yourAPIkey

  • {

    "SiteCode": "CLDP0006",

    "DateTime": "2022-04-11T11:00:00.000Z",

    "DurationNS": 3600000000,

    "ScaledValue": 1.093583695186221

    },

    {

    "SiteCode": "CLDP0006",

    "DateTime": "2022-04-11T12:00:00.000Z",

    "DurationNS": 3600000000,

    "ScaledValue": 1.3252130004286768

    }

API Terms of Use

By signing up for the Breathe London API you agree to the service’s terms of use.

Imperial Projects (IPROJ) grants permission to retrieve information to authorised users (Users) requiring data from the Breathe London network (Information). Users are required to register for an API key, which is required for each request for identification purposes.

  1. Licence to use

    All Users shall be subject to the following Terms.

    IPROJ hereby grants a User a worldwide, royalty free, non-exclusive licence (‘Licence’) to retrieve, copy and use Information subject to the conditions below (as varied from time to time).

    This Licence does not affect User’s freedom under fair dealing or fair use or any other copyright or database right exceptions and limitations.

    This Licence shall apply from the date of registration and shall continue for the period the Information is provided to the User or if User is in breach the Licence. IPROJ reserves the right to revoke access to the Information at its convenience with no liability to any User.

  2. Rights

    User is free to:

    • Copy, publish, distribute and transmit the Information as provided and

    • Exploit the Information for non-commercial purposes; and with prior written approval from IPROJ, exploit the Information for commercial purposes for certain use for example, by combining it with other Information, or by including it in User’s own product or application.

  3. Requirements

    User must

    • Acknowledge the Breathe London Network as the source of the Information by including the following attribution statement 'Powered by Breathe London' hyperlinked to https://breathelondon.org

    • Ensure all intellectual property rights of and owned by GLA and IPROJ or collaborating Parties including but not limited to Bloomberg Philanthropies, Clarity, Imperial College London and Mayor of London are protected including all logos, design rights, patents and trademarks.

    • Ensure IPROJ and or any of the collaborators do not come into any disrepute through any inappropriate Use or actions including but not limited to User providing inaccurate data on registration.

    • Use the API in a fair and reasonable manner. IPROJ reserves the right to limit access to Information when it is believes the overall service is being degraded by excessive use.

  4. Exemptions

    This licence does not:

    • Transfer any intellectual property rights in the Information to the User or any third party.

    • Include personal data in the Information.

    • Provide any rights to use the Information after this Licence has ended.

    • Provide any rights to use any other intellectual property rights, including patents, trade marks, and/or design rights.

    • Permit the User to use any automated system, software or process to extract content and/or data, including trawling,

      or data mining except as expressly permitted under this licence.

  5. Non-endorsement

    This Licence does not grant User any right to use the Information in a way that suggests any official status or that IPROJ endorses User or User’s use of the Information.

  6. Termination for breach

    The above clauses 1 to 5 are important conditions of this Licence and if User fails to comply with them the rights granted to the User under this Licence will end automatically.

  7. Non warranty

    The Information is licensed 'as is' and IPROJ excludes all representations, warranties, obligations and liabilities in relation to the Information to the maximum extent permitted by law.

    IPROJ is not liable for any errors or omissions in the Information and shall not be liable for any loss, injury or damage of any kind caused by its use or any inability to use the service. IPROJ does not guarantee the continued supply of the Information.

    Nothing in this Licence shall limit either IPROJs or User liability for death or personal injury caused by negligence, and/or the negligence of either IPROJs or User’s respective employees or agents or for fraud.

  8. Law and jurisdiction

    The validity, interpretation and performance of this licence agreement shall be governed by English law and shall be subject to the exclusive jurisdiction of the English courts, to which the parties hereby submit.

IPROJ’s Privacy Policy will apply to all personal information collected in connection with User’s use of the service provided. Further information can be found on our privacy policy page.

IPROJ retains the right to modify these Terms at any time. Your continued use of the Website will signify your acceptance of any amended Terms.

Updated 16/06/2022