API Documentation
The HICS data API is fully public and requires no authentication for read access. All readings include an automatic quality flag.
The HICS API is public and authentication-free. No API key required. Rate limit: 120 requests/minute. All responses are JSON. Timestamps are UTC ISO 8601. All read-only endpoints return Access-Control-Allow-Origin: * — safe to call from browser JavaScript on any domain.
/api/v1/stations/
List all active and maintenance stations with status and latest reading summary. Add ?output=geojson to receive a GeoJSON FeatureCollection (RFC 7946) suitable for QGIS, Leaflet, and PANGAEA submission.
| Field | Type | Description |
|---|---|---|
| station_id | string | Unique station identifier |
| name | string | Human-readable station name |
| latitude / longitude | float | Decimal degrees |
| altitude_m | float | Metres above sea level |
| status | string | active / maintenance |
| last_seen | datetime | Last telemetry timestamp (UTC) |
| latest.temperature_c | float | Most recent temperature (°C) |
/api/v1/data/compare/?stations=IESH-KMC-001,DLP-001
Aligned timeseries for multiple stations in a single request — designed for altitude-gradient comparison charts and multi-station analysis without N separate API calls.
| Param | Values | Default |
|---|---|---|
| stations | comma-separated station IDs (max 10) | required |
| param | temperature_c · humidity_rh · pressure_hpa · pm2_5 · pm10 · co2_ppm | temperature_c |
| hours | 1–720 | 24 |
| quality | ok | all flags |
/api/v1/data/latest/?station=IESH-KMC-001
The single most-recent reading for a station, including all sensor values and the auto-assigned quality flag.
quality_flag — ok | suspect | invalid.
Automatically assigned on ingestion. suspect = value outside physical plausibility bounds. invalid = manually flagged by an operator.
/api/v1/data/historical/?station=IESH-KMC-001&hours=24
Time series for the requested station. Returns an array of readings ordered by timestamp ascending. Maximum window: 720 hours (30 days).
| Param | Default | Description |
|---|---|---|
| station | IESH-KMC-001 | Station ID |
| hours | 24 | Lookback window in hours. Clamped to [1, 720]. |
/api/v1/data/download/?station=IESH-KMC-001
Full station history as a streaming CSV download. Includes attribution comment header with CC BY 4.0 licence and citation template. Multi-station: use ?stations=IESH-KMC-001,DLP-001 to download multiple stations as a single CSV (adds station_id as first column).
timestamp_utc, temperature_c, humidity_rh, pressure_hpa, pm2_5_ugm3, pm10_ugm3, co2_ppm, quality_flag
| Param | Example | Description |
|---|---|---|
| from_date | 2026-01-01 | Start date, inclusive. ISO format YYYY-MM-DD. |
| to_date | 2026-06-30 | End date, inclusive. ISO format YYYY-MM-DD. |
| quality | ok | Set to ok to exclude suspect and invalid readings. |
Example: ?station=IESH-KMC-001&from_date=2026-01-01&to_date=2026-03-31&quality=ok
/api/v1/stats/
Platform-level aggregate statistics: station counts, total readings, quality percentage, and data date range. Suitable for status pages and external dashboards.
| Field | Type | Description |
|---|---|---|
| stations.total | int | Total station count (all statuses) |
| stations.active | int | Stations with status=active |
| readings.total | int | All readings ever recorded |
| readings.ok | int | Readings with quality_flag=ok |
| readings.ok_pct | float|null | Percentage of ok readings. null if no readings yet. |
| readings.earliest | datetime | Timestamp of first ever reading (UTC) |
| readings.latest | datetime | Timestamp of most recent reading (UTC) |
| generated_at | datetime | Response generation timestamp (UTC) |
/api/v1/data/aggregate/?station=IESH-KMC-001&period=month
Statistical aggregates (mean/min/max) grouped by time period. Designed for research publications, PANGAEA submissions, and long-term trend analysis. Supports streaming CSV output for direct import into analysis tools.
| Param | Values | Default |
|---|---|---|
| station | station_id | IESH-KMC-001 |
| period | hour · day · week · month | day |
| from_date | YYYY-MM-DD | all |
| to_date | YYYY-MM-DD | all |
| quality | ok | all flags |
| output | csv | json |
/api/v1/health/
Station health check endpoint. Returns ok: true plus station status and most-recent-reading age for each station. Suitable for uptime monitors. Human-readable service status page: /status/
/api/v1/notes/
Paginated JSON list of all published lab notes (title, type, date, location, GPS coordinates, summary, tags, linked programmes). Filters: ?type= (field/build/observation/analysis/experiment), ?programme=<slug>, ?from_date=YYYY-MM-DD. 20 per page.
/api/v1/publications/
Paginated JSON list of all HICS publications (title, authors, journal, year, pub_type, doi, open_access_url, abstract, plain_language_summary, linked HICS team members with ORCID). Filters: ?pub_type=peer-reviewed|preprint|report|data-paper, ?year=. 20 per page.
/publications/<id>/cite.ris
RIS citation file download for citation managers (Zotero, Mendeley, RefWorks, EndNote). Returns application/x-research-info-systems with correct TY type (JOUR/RPRT/DATA) per publication type.
/embed/station/IESH-KMC-001/
Self-contained iframe widget for embedding live station data on any website. Renders a Chart.js chart that auto-refreshes every 60 seconds. No JavaScript dependencies required on the host page.
| Param | Values | Default |
|---|---|---|
| param | temperature_c · humidity_rh · pressure_hpa · pm2_5 · co2_ppm | temperature_c |
| theme | dark · light | dark |
| hours | 1–168 | 24 |
/api/v1/activity/
Unified chronological feed of lab notes and publications, newest first. Use ?limit=N (max 50) to control the number of items returned.
/api/v1/search/?q=<query>
Full-text search across all HICS content — research programmes, lab notes, team, instruments, and publications. Returns at most 20 results with type, title, URL, and summary.
/api/v1/changelog/
Machine-readable API version history — lists changes made in each release. Useful for client developers tracking breaking and additive changes.
Every reading carries a quality_flag field assigned automatically at ingestion time.
| Flag | Meaning |
|---|---|
| ok | All values within physical plausibility bounds. |
| suspect | One or more values outside physical bounds. Bounds: temp −50..60°C, RH 0..100%, pressure 300..1100 hPa, PM2.5 0..1000 µg/m³. |
| invalid | Manually flagged as invalid by a station operator. Exclude from analysis. |