History Air Quality Data API Request

BreezoMeter history air quality data API requests are just as easy and friendly to use as our real-time requests. History API calls can be made to return both:

  • Air Quality data for a specific date/time in a specific location
  • Air Quality data for a range of dates in a specific location

We use ISO 8601 standard for our timestamp. The standard is built as such:
YYYY-MM-DDTHH:mm:SS {{now}}.

History API queries are equivalent and priced as several API calls, depending on the length of the time interval queried which affects the number of data objects returned. Each returned data object (maximum one per 1 hour) is priced as one API call. e.g. The maximum price for historical api call will be: 14 days * 24 hour * API call price.

History Air Quality Data for a Specific Date

You can get history air quality data for a specific date/time in a specific location (Latitude and Longitude) by concatenating the following API request:

https://api.breezometer.com/baqi/?datetime={the_required_date}&lat={latitude}&lon={longitude}&key=YOUR_API_KEY

Required parameters:

  • datetime – The specific time you wish to get air quality data for.
  • Location
    • lat – Latitude is a geographic coordinate that specifies the north-south position of a point on the Earth’s surface. Range between -90 to 90 (WGS84 standard)
    • lon – Longitude is a geographic coordinate that specifies the east-west position of a point on the Earth’s surface. Range between -180 to 180 (WGS84 standard)

  • key – Your BreezoMeter API key. This key identifies your account for purposes of quota management and features access.

optional:

  • lang – Response language. We support English(“en”) and Hebrew(“he”).

Responses:

The responses are returned in JSON format. In this example, the BreezoMeter History Air Quality Data for A Specific Date response for the query on “DateTime=2015-10-26T16:18:34” and “Latitude=40.7324296, Longitude=-73.9977264”.

This request demonstrates:

https://api.breezometer.com/baqi/?datetime=2015-10-26T16:18:34&lat=40.7324296&lon=-73.9977264&key=YOUR_API_KEY

The response

{
  "datetime": "2015-10-26T16:00:00",
  "country_name": "United States",
  "breezometer_aqi": 82,
  "breezometer_color": "#4FBB35",
  "breezometer_description": "Excellent Air Quality",
  "country_aqi": 22,
  "country_aqi_prefix": "",
  "country_color": "#00E400",
  "country_description": "Good air quality",
  "data_valid": true,
  "key_valid": true,
  "random_recommendations": {
    "children": "Let the children enjoy the fresh outdoor air - You should play with them too!",
    "sport": "This is an excellent opportunity to enjoy your favorite outdoor activity without any worries",
    "health": "This air quality is excellent for people with respiratory sensitivities",
    "inside": "Open the windows, let that fresh air come in & go outside!",
    "outside": "It is a great time for outdoor activities. The air outside is superb!"
  },
  "dominant_pollutant_canonical_name": "pm2.5",
  "dominant_pollutant_description": "Fine particulate matter (<2.5µm)",
  "dominant_pollutant_text": {
    "main": "The dominant pollutant is fine particulate matter (PM2.5).",
    "effects": "Particles enter the lungs and cause local and systemic inflammation in the respiratory system & heart, thus cause cardiovascular and respiratory diseases such as asthma and bronchitis.",
    "causes": "Main sources are fuel burning processes in industry, transportation and indoor heating."
  },
  "pollutants": {
    "co": {
      "pollutant_description": "Carbon monoxide",
      "units": "ppb",
      "concentration": 101.24
    },
    "no2": {
      "pollutant_description": "Nitrogen dioxide",
      "units": "ppb",
      "concentration": 9.49
    },
    "o3": {
      "pollutant_description": "Ozone",
      "units": "ppb",
      "concentration": 31.4
    },
    "pm10": {
      "pollutant_description": "Inhalable particulate matter (<10µm)",
      "units": "ug/m3",
      "concentration": 3
    },
    "pm25": {
      "pollutant_description": "Fine particulate matter (<2.5µm)",
      "units": "ug/m3",
      "concentration": 5.22
    },
    "so2": {
      "pollutant_description": "Sulfur dioxide",
      "units": "ppb",
      "concentration": null
    }
  }
}
For Example try yesterday data: {{vm.yesterday}}

Or select another date:

{{vm.baseUrl}}?lat={{vm.form.lat}}&lon={{vm.form.lon}}&datetime={{vm.form.datetime}}&key={{vm.form.key}}

Air Quality History Data for a range of dates

You can get history air quality data for a range of dates in a specific location (Latitude and Longitude) with a start and end timestamps that will provide an array of results.

To get air quality data for a range of dates at a given location you need to concatenating the following API request:

https://api.breezometer.com/baqi/?start_datetime={the_required_start_date}&end_datetime={the_required_end_date}&lat={latitude}&lon={longitude}&key=YOUR_API_KEY

Required parameters:

  • start_datetime – The specific start time you wish to get air quality data for.
  • end_datetime – The specific end time you wish to get air quality data for.
  • Location
    • lat – Latitude is a geographic coordinate that specifies the north-south position of a point on the Earth’s surface. Range between -90 to 90 (WGS84 standard)
    • lon – Longitude is a geographic coordinate that specifies the east-west position of a point on the Earth’s surface. Range between -180 to 180 (WGS84 standard)

  • key – Your BreezoMeter API key. This key identifies your account for purposes of quota management and features access.

optional:

  • interval – A time interval represents a period of time (hours) between two BAQI objects. You can choose an interval value (Integer) between 1-24 hours.
  • lang – Response language. We support English(“en”) and Hebrew(“he”).

Responses:

The responses are returned in JSON format. In this example, the BreezoMeter History Air Quality Data for Range of Dates response for the query on “Start_DateTime=2015-10-25T16:00:00” and “End_DateTime=2015-10-26T16:00:00” with “Interval=1” and “Latitude=40.7324296, Longitude=-73.9977264”.

This request demonstrates:

https://api.breezometer.com/baqi/?start_datetime=2015-10-25T16:00:00&end_datetime=2015-10-26T16:00:00&interval=1&lat=40.7324296&lon=-73.9977264&key=YOUR_API_KEY

Try a range dates call

The past 24 hours for example

Start Date {{vm.yesterday}} - End Date {{vm.now}}

Start Date

End Date

{{vm.baseUrl}}?lat={{vm.form.lat}}&lon={{vm.form.lon}}&interval={{vm.form.interval}}&start_datetime={{vm.form.start_datetime}}&end_datetime={{vm.form.end_datetime}}&key={{vm.form.key}}