Quickstart

Make your first request to the CompostIQ research API in about five minutes. You need a researcher account and an API key, both free.

Base URL
https://api.compostiq.win
Format
JSON or CSV, times in UTC
Key
In the x-research-key header
1

Get a key

Create an account and choose Researcher as the account type. On the API keys page, name a key and press Create key. Copy it straight away: it is shown only once. You can hold up to five keys, and deleting one stops it working at once.

The examples below read the key from an environment variable:

Terminal
$ export COMPOSTIQ_KEY=your-key-here
2

See which countries have data

If this works, your key works.

Terminal
$ curl -H "x-research-key: $COMPOSTIQ_KEY" \
    https://api.compostiq.win/research/countries
Response · 200
[
  {
    "country_code": "ID",
    "bin_count": 3,
    "reading_count": 25920,
    "first_reading": "2026-09-19T00:00:12+00:00",
    "last_reading": "2026-10-19T08:41:30+00:00"
  }
]
3

Fetch daily figures

One row per country per UTC day, with each sensor's average, minimum, maximum and standard deviation. These parameters work on /research/daily, /research/overview and /research/alerts.

Terminal
$ curl -G https://api.compostiq.win/research/daily \
    -H "x-research-key: $COMPOSTIQ_KEY" \
    -d country_code=ID \
    -d start=2026-09-01T00:00:00Z
country_codeTwo-letter country code, for example ID. Leave it out for every country
start, endISO 8601 with a timezone. Up to 366 days apart; the last 30 days if you leave them out
formatjson or csv

Every parameter and error is in the API reference.

4

Load them into pandas

The data array drops straight into a DataFrame.

Python
import os
import pandas as pd
import requests

resp = requests.get(
    "https://api.compostiq.win/research/daily",
    headers={"x-research-key": os.environ["COMPOSTIQ_KEY"]},
    params={"country_code": "ID"},
    timeout=30,
)
resp.raise_for_status()

df = pd.DataFrame(resp.json()["data"])
df["day"] = pd.to_datetime(df["day"])
print(df[["day", "bin_count", "temperature_c"]].head())
5

Or ask for CSV

Add format=csv to get the same rows as a CSV file, ready for a spreadsheet or R.

Terminal
$ curl -G https://api.compostiq.win/research/daily \
    -H "x-research-key: $COMPOSTIQ_KEY" \
    -d format=csv -o compostiq-daily.csv
6

Cite the data

If you use the figures, cite them with the date you fetched them. The open data page has a ready-made citation.

Next steps