開発者向け

API リファレンス

測定値

1 つのセンサーの履歴(生データ、5 分、1 時間、日単位)と、センサー群の平均。

センサーの測定値

GEThttps://api.atmy.ai/v1/sensors/{id}/readings

直近 31 日の生データまたは 5 分平均(interval=5min、1 回 7 日まで)、または直近 366 日の時間平均(interval=hour、1 回 92 日まで)、または日ごとの品質チェック付きの日平均(interval=day、1 回 1 年まで)

パスパラメーター

id string 必須

センサー一覧にあるセンサー id。

クエリパラメーター

interval string 任意

raw、5min、hour、day のいずれか。

既定値: raw

from string 任意

開始。ISO 8601 または Unix 秒、UTC。

to string 任意

終了。ISO 8601 または Unix 秒、UTC。既定は現在。

GET/sensors/41504/readings?interval=day
curl "https://api.atmy.ai/v1/sensors/41504/readings?interval=day"
200レスポンス
{
  "api_version": "2.0",
  "sensor_id": 41504,
  "interval": "day",
  "from": "2026-10-24T00:00:00+00:00",
  "to": "2026-10-26T00:00:00+00:00",
  "readings": [
    {
      "time": "2026-10-24T00:00:00+00:00",
      "readings": 96,
      "pm1": 21.26,
      "pm25": 32.51,
      "pm10": 36.47,
      "temperature_c": 17.01,
      "humidity_percent": 44.66,
      "quality": {
        "status": "good",
        "pm_eligible": true,
        "rating": 10
      }
    },
    {
      "time": "2026-10-25T00:00:00+00:00",
      "readings": 96,
      "pm1": 35.5,
      "pm25": 59.98,
      "pm10": 71.05,
      "temperature_c": 14.87,
      "humidity_percent": 55.7,
      "quality": {
        "status": "good",
        "pm_eligible": true,
        "rating": 10
      }
    }
  ],
  "attribution": "Sensor data: Atmy (atmy.ai), from the networks named in each sensor's \"network\", under that network's license.",
  "terms": "https://atmy.ai/legal/data/"
}

センサー群の平均

GEThttps://api.atmy.ai/v1/sensors/readings

最大 100 センサー(ids=1,2,3)の 5 分ごとまたは 1 時間ごとの平均、各センサーは 1 回ずつ数えます、日ごと(interval=day)は 1 回 92 日まで

クエリパラメーター

ids string 必須

カンマ区切りのセンサー id、1〜100 個。

interval string 任意

5min、hour、day のいずれか。

既定値: hour

from string 任意

開始。ISO 8601 または Unix 秒、UTC。

to string 任意

終了。ISO 8601 または Unix 秒、UTC。既定は現在。

GET/sensors/readings?ids=41504,41752,43057&interval=hour
curl "https://api.atmy.ai/v1/sensors/readings?ids=41504,41752,43057&interval=hour"
200レスポンス
{
  "api_version": "2.0",
  "sensor_ids": [
    41504,
    41752,
    43057
  ],
  "interval": "hour",
  "from": "2026-10-26T00:00:00+00:00",
  "to": "2026-10-26T02:00:00+00:00",
  "readings": [
    {
      "time": "2026-10-26T00:00:00+00:00",
      "sensors": 3,
      "readings": 12,
      "pm1": 41.04,
      "pm25": 68.88,
      "pm10": 81.14,
      "temperature_c": 15.53,
      "humidity_percent": 54.33,
      "tvoc": 279.55
    },
    {
      "time": "2026-10-26T01:00:00+00:00",
      "sensors": 3,
      "readings": 12,
      "pm1": 37.93,
      "pm25": 62.65,
      "pm10": 76.3,
      "temperature_c": 15.55,
      "humidity_percent": 55.33,
      "tvoc": 178.2
    }
  ],
  "attribution": "Sensor data: Atmy (atmy.ai), from the networks named in each sensor's \"network\", under that network's license.",
  "terms": "https://atmy.ai/legal/data/"
}