KK-OZEC data API: guide

Contract version 1.1.0 (API v1). Read-only access to the measurements stored on the KK-OZEC server: ozone, temperature, humidity, pressure, air quality and the atmospheric electric field of the KK-OZEC monitors. The API reads stored data only; it cannot reach or change a monitor.

1. Getting access

  1. Fill in the form at /api/register: organisation, contact, e-mail, what you want the data for, and which monitors, measurements, how often and how far back. Accept the licence (CC BY 4.0) and terms. You do not need, and do not get, a login to the KK-OZEC website.
  2. Confirm your e-mail address with the link we send (valid 24 hours). Unconfirmed requests are deleted after 7 days.
  3. The administrator reviews the request and decides your scope (monitors, parameters, resolutions, earliest date), your tier (limits) and an expiry date (normally 12 months).
  4. If approved, you get an e-mail with a one-time link (valid 48 hours). Opening it shows your key once: copy it into your software. Nobody can show it again, the administrator included. If you lose it, ask for a new one.
  5. About 30 days before expiry you get a reminder; renewal is a new approval by the administrator.

2. Authentication

Send the key in the Authorization header of every request, over HTTPS only:

curl -H "Authorization: Bearer ozec_1a2b3c4d_..." https://api.ozec.org/v1/monitors

The API's address is https://api.ozec.org/v1/. The paths in the reference (/api/v1/…) also work in full, at https://api.ozec.org/api/v1/… or https://www.ozec.org/api/v1/…: the same API, the same key.

A key in a URL is refused (key_in_query), and plain HTTP is refused before it reaches us: a key that travelled that way should be treated as exposed. When the administrator gives you a new key, the old one keeps working for 7 days so you can switch without a gap. Keep keys on servers, not in web pages (the API sends no CORS headers).

3. Endpoints

PathReturns
GET /api/v1/Version, links, licence
GET /api/v1/healthLiveness (no key)
GET /api/v1/parametersParameters in your scope: unit, sensor, accuracy, description (EN/DE)
GET /api/v1/monitorsMonitors in your scope: name, approximate location (a point rounded to 3 decimals and the radius within which the monitor lies), height, latest record
GET /api/v1/monitors/{id}/latestLatest value of each parameter
GET /api/v1/monitors/{id}/seriesMeasurements over a span: raw, hourly or daily; JSON or CSV; paginated
GET /api/v1/monitors/{id}/calibrationsCalibration periods
GET /api/v1/usageYour limits and today's usage (free)

Every field and parameter is in the reference, generated from the server's code.

Parameters

KeyUnitSensorAccuracy and notes
temp_c°CBME688±1 °C typical; can read high in sun or from self-heating. sht_temp_c is the more accurate air temperature.
rh_pct%BME688±3 %RH typical.
pressure_hpahPaBME688±0.6 hPa typical; station pressure, not reduced to sea level.
o3_ppbppbSPEC ULPSM-O3Electrochemical cell. Single readings scatter about ±26 ppb (white noise of the cell); use resolution=1h for trends (ozone is reported as hourly means officially). Zero and span change only at calibration events (see /calibrations).
pg_vmV/mfield millAtmospheric potential gradient (field mill). Fair-weather values are about 100-150 V/m.
iaqIAQBME688 + Bosch BSEC2Bosch indoor-air-quality index 0-500, relative to the sensor's own history; not an absolute gas level. Single readings scatter about ±0.7 (white noise, station 1, Nov 2026); use resolution=1h for trends.
sht_temp_c°CSHT40±0.2 °C typical.
sht_rh_pct%SHT40±1.8 %RH typical.
pg_sigma_vmV/mfield millSpread of the potential gradient within a burst.
gas_ohmΩBME688Heated metal-oxide gas sensor resistance (raw). Single readings scatter about ±550 Ω (white noise, station 1, Nov 2026); use resolution=1h for trends.
siaqIAQBME688 + Bosch BSEC2Bosch static IAQ index. Single readings scatter about ±2.7 (white noise, station 1, Nov 2026); use resolution=1h for trends.
eco2_ppmppmBME688 + Bosch BSEC2Bosch CO2-equivalent estimate (not a CO2 sensor). Single readings scatter about ±26 ppm (white noise, station 1, Nov 2026); use resolution=1h for trends.
bvoc_ppmppmBME688 + Bosch BSEC2Bosch breath-VOC-equivalent estimate. Single readings scatter about ±0.04 ppm (white noise, station 1, Nov 2026); use resolution=1h for trends.
gas_pct%BME688 + Bosch BSEC2Bosch gas percentage (relative). Single readings scatter about ±0.4 % (white noise, station 1, Nov 2026); use resolution=1h for trends.

Parameter keys are permanent: never renamed, never reused for something else.

4. Series: times, resolutions, pages

curl -H "Authorization: Bearer $KEY" \
  "https://api.ozec.org/v1/monitors/1/series?parameters=o3_ppb,temp_c&start=2026-11-01&end=2026-11-08&resolution=1h"
import requests
S = requests.Session(); S.headers["Authorization"] = "Bearer " + KEY
url, q, rows = "https://api.ozec.org/v1/monitors/1/series", {"parameters": "o3_ppb", "start": "2026-11-01",
    "end": "2026-11-08", "resolution": "raw"}, []
while True:
    r = S.get(url, params=q, timeout=60)
    if r.status_code in (429, 503):
        time.sleep(int(r.headers.get("Retry-After", "60"))); continue
    r.raise_for_status(); page = r.json(); rows += page["data"]
    if not page["meta"]["next_cursor"]: break
    q["cursor"] = page["meta"]["next_cursor"]

5. Data quality

The data is given out as measured: no smoothing, no adjustment to other stations. Use these to judge it:

6. Limits

Your key belongs to a tier; the administrator can change tiers and give a key its own values. The server is a Raspberry Pi on a home connection: the limits are sized to it, and one monitor records about 105,000 raw values per parameter a year, so even the smallest tier can fetch about three months of raw data, or several years of hourly means, per day.

TierRequests/min (burst)Requests/dayRows/dayAt a time Max span raw / 1h / 1d
standard4 (8)1,00030,000131 d / 366 d / 7305 d
research12 (24)5,000200,000192 d / 1827 d / 7305 d
partner20 (40)10,000600,0001366 d / 7305 d / 7305 d

Every response carries RateLimit-Policy and RateLimit headers (IETF draft) for the minute, day and rows limits. A limit of your key gives 429 with Retry-After (seconds); the server-wide limit, which protects the monitors' radio link and a small home server, gives 503 with Retry-After. Days are UTC days. /api/v1/usage shows your counters and is free. Fetch only what changed: data arrives every 5 minutes, so polling latest more often than that gains nothing.

7. Errors

Errors are RFC 9457 problem details (application/problem+json) with a stable code. New codes may be added; treat unknown ones by their HTTP status.

codeHTTPMeaningWhat to do
missing_key401No Authorization: Bearer header.Send your key in that header.
invalid_key401The key is not one of ours (typo, truncated).Check the copy of your key. Ten invalid keys from one address within 15 minutes block that address for the rest of the 15 minutes.
key_revoked401The key was revoked, or replaced and its 7-day overlap ended.Use your newest key.
key_expired401Your access reached its expiry date.Ask the administrator to renew it.
client_suspended403The administrator suspended your access.Contact the administrator.
key_in_query400A key was sent in the URL (e.g. ?api_key=).Never put the key in a URL: it ends up in logs. Ask the administrator for a new key.
too_many_bad_keys429Too many invalid keys from your address.Wait for Retry-After.
unknown_query_parameter400A query parameter this endpoint does not know.Check the spelling; the detail lists the allowed ones.
out_of_scope403A monitor, parameter or resolution outside your key's scope.Ask the administrator to widen the scope, or stay within it (see /api/v1/usage).
unknown_monitor404The monitor has no stored data.See /api/v1/monitors.
unknown_parameter400No parameter with that key.See /api/v1/parameters.
bad_request400A value could not be read (time format, limit range, ...).See the detail.
bad_time400start is not before end.Swap or fix the times.
span_too_long400The span is longer than your tier allows at that resolution.Split it into several requests, or use a coarser resolution.
bad_cursor400The cursor is not from this API or not from this span.Pass the cursor unchanged, with the same start and end.
rate_limited429A limit of your key: per minute, per day, rows per day, or requests at a time (limit names it).Wait for Retry-After.
server_busy503The server-wide limit was reached (all clients together).Wait for Retry-After.
service_paused503The administrator paused the API (maintenance).Try again later.
data_unavailable503The data store did not answer.Try again later.
not_found404No such endpoint.See the reference.
method_not_allowed405Anything but GET.The API is read-only.

8. Licence and attribution

The data is licensed CC BY 4.0: you may share and adapt it, commercially too, if you give credit. Use: "Data: KK-OZEC monitoring network (https://www.ozec.org), CC BY 4.0". It is low-cost research instrumentation, provided as is, without warranty: not an official air-quality service.

9. Compatibility promise

10. Changelog

VersionDateChange
1.1.02026-11-26Added: location.radius_m in /monitors. The operator publishes an approximate point near each monitor and the distance within which the monitor lies; the exact position is never published.
1.0.22026-11-26Documentation only: the notes of iaq, siaq, eco2_ppm, bvoc_ppm, gas_pct and gas_ohm now give their reading-to-reading scatter and recommend resolution=1h for trends, as for ozone.
1.0.12026-11-24Documentation only: the reference now lists every refusal each endpoint can send (400/403/503 on the index, 404 unknown_monitor on the monitor endpoints) and no longer lists 422, which the API never sends (bad values get 400 bad_request).
1.0.02026-11-23First release: parameters, monitors, latest, series (raw / 1h / 1d, JSON / CSV, pagination), calibrations, usage.