Daily figures
One row per country per UTC day: how many bins and readings it covers, and the average, minimum, maximum and standard deviation of each sensor.
Authentication
Send your research key in the x-research-key header. Create one on the API keys page of a researcher account; you can hold up to five. A key is shown once, and deleting it stops it working at once.
Query parameters
All optional.
startdate-timeEarliest reading to include, inclusive. Must include a timezone, for example 2026-09-01T00:00:00Z. Defaults to 30 days before end.enddate-timeLatest reading to include, exclusive. Must include a timezone. Defaults to now.country_codestringISO 3166-1 alpha-2 code, for example ID. Upper or lower case.formatenumjson (the default) or csv.The window from start to end can be up to 366 days long.
Response
start, enddate-timeThe window the figures cover.country_codestring | nullThe country you asked for, or null for every country.dataarrayOne row per country per day, ordered by country, then day. Each field is described in the data dictionary.With format=csv the response is just the rows, with a header line.
Errors
Errors come back as JSON with a detail field.
| Status | When |
|---|---|
| 401 | No x-research-key header, or the key is wrong, deleted, or belongs to an account that isn't a researcher's. |
| 422 | start or end has no timezone, start isn't before end, the window is longer than 366 days, or country_code or format isn't a value listed above. |
curl -G https://api.compostiq.win/research/daily \ -H "x-research-key: $COMPOSTIQ_KEY" \ -d country_code=ID \ -d start=2026-10-01T00:00:00Z \ -d end=2026-10-03T00:00:00Z
import os import requests resp = requests.get( "https://api.compostiq.win/research/daily", headers={"x-research-key": os.environ["COMPOSTIQ_KEY"]}, params={ "country_code": "ID", "start": "2026-10-01T00:00:00Z", "end": "2026-10-03T00:00:00Z", }, timeout=30, ) resp.raise_for_status() for row in resp.json()["data"]: print(row["day"], row["temperature_c"])
library(httr2) resp <- request("https://api.compostiq.win/research/daily") |> req_headers("x-research-key" = Sys.getenv("COMPOSTIQ_KEY")) |> req_url_query( country_code = "ID", start = "2026-10-01T00:00:00Z", end = "2026-10-03T00:00:00Z" ) |> req_perform() daily <- resp_body_json(resp, simplifyVector = TRUE)$data head(daily[, c("day", "temperature_c")])
{
"start": "2026-10-01T00:00:00+00:00",
"end": "2026-10-03T00:00:00+00:00",
"country_code": "ID",
"data": [
{
"country_code": "ID",
"day": "2026-10-01T00:00:00",
"bin_count": 3,
"reading_count": 8640,
"temperature_c": 52.418,
"temperature_c_min": 31.204,
"temperature_c_max": 63.87,
"temperature_c_sd": 9.312,
… the same four for moisture_percent, o2_percent,
co2_percent and nh3_ratio
},
{ … }
]
}
Other endpoints
The research endpoints take the same key. /research/overview and /research/alerts take the same parameters and return the same envelope. The public endpoints need no key.
null while none has).Public figures
The three /public endpoints feed the figures on this website. They need no key, count only bins that have sent at least one reading, and give nothing finer than a country. Each answer is reused for up to a minute.
/public/statsobjectbins and countries reporting; active_devices, the devices in a bin heard from in the last 10 minutes; readings_total and readings_24h; first_reading_at and last_reading_at; and updated_at, when the figures were worked out./public/bins-by-countryarrayOne {country_code, bins} per country, most bins first. Bins without a country aren't listed./public/trendsobjectdays: one {date, temperature_c, moisture_percent} per UTC day for the last 30 days, today included. A day without readings has null values.Changelog
/public/stats, /public/bins-by-country and /public/trends./research/alerts, /research/countries, each sensor's minimum, maximum and standard deviation, and format=csv./research/daily and /research/overview, read with a research key.