# Observations

> Get the latest reading of each sensor with a freshness verdict, or daily or hourly readings over a date range, with units, quality flags, plausibility flags, original values and revisions.

Two endpoints return measurements for a station: the newest reading of each sensor, and a range of readings. Daily and hourly values are separate series; neither is computed from the other.

## Latest conditions

`GET /api/v1/stations/{station}/latest` returns the newest reading that has a value for each sensor, such as a station's latest snow water equivalent or snow depth.

| Parameter  | Meaning                                                                 |
| ---------- | ----------------------------------------------------------------------- |
| `elements` | Comma-separated element codes, up to 10. Default `WTEQ,SNWD,PREC,TOBS`. |
| `duration` | `DAILY` or `HOURLY`. Default both.                                      |

```bash
curl 'https://opensnotel.com/api/v1/stations/312:ID:SNTL/latest?elements=WTEQ&duration=DAILY'
```

```json
{
  "station": "312:ID:SNTL",
  "data": [
    {
      "elementCode": "WTEQ",
      "duration": "DAILY",
      "ordinal": 1,
      "heightDepthIn": null,
      "unit": "in",
      "observedAt": "2026-10-24T08:00:00.000Z",
      "localDate": "2026-10-24",
      "value": 0.1,
      "flag": "R",
      "qualityFlag": "V",
      "isProvisional": null,
      "sourceUpdatedAt": "2026-10-24T19:05:00.000Z",
      "plausibilityFlags": [],
      "newestObservedAt": "2026-10-24T08:00:00.000Z",
      "freshness": { "state": "fresh", "staleAfterMinutes": 4320 }
    }
  ],
  "meta": { "generatedAt": "2026-10-25T16:48:16.000Z" }
}
```

### Reading freshness

`freshness.state` says whether the data is reaching Snotel, which is not the same as whether the snow changed:

- `fresh`: a recent period has a value. An unchanged or zero value is still fresh; no new snow is not stale data.
- `no_values`: periods keep arriving, but none recent has a value. The source is reporting the sensor as missing. `newestObservedAt` is later than `observedAt`.
- `stale`: no recent period has arrived, so the source or the feed is behind. `staleAfterMinutes` is the threshold for the duration: six hours for hourly readings, three days for daily.

Judge a reading by `observedAt`, the start of its period, not by when it was stored. [Freshness](https://opensnotel.com/docs/data/freshness.md) explains the three times a value carries.

## Observations over a range

`GET /api/v1/stations/{station}/observations` returns readings between two station-local dates, inclusive, grouped by sensor.

| Parameter  | Meaning                                                                 |
| ---------- | ----------------------------------------------------------------------- |
| `from`     | First local date, `YYYY-MM-DD`. Required.                               |
| `to`       | Last local date, `YYYY-MM-DD`, inclusive. Required.                     |
| `elements` | Comma-separated element codes, up to 10. Default `WTEQ,SNWD,PREC,TOBS`. |
| `duration` | `DAILY` (default) or `HOURLY`.                                          |

A range is at most 366 days of `DAILY` data or 31 days of `HOURLY` data. For a longer history, request consecutive ranges. A requested element the station does not report at that duration answers `404` with `element_unavailable`.

```bash
curl 'https://opensnotel.com/api/v1/stations/312:ID:SNTL/observations?elements=WTEQ&from=2026-01-05&to=2026-01-06'
```

```json
{
  "station": "312:ID:SNTL",
  "duration": "DAILY",
  "from": "2026-01-05",
  "to": "2026-01-06",
  "utcOffsetMinutes": -480,
  "data": [
    {
      "elementCode": "WTEQ",
      "ordinal": 1,
      "heightDepthIn": null,
      "unit": "in",
      "readings": [
        {
          "observedAt": "2026-01-05T08:00:00.000Z",
          "localDate": "2026-01-05",
          "value": 12.5,
          "flag": "R",
          "qualityFlag": "V",
          "originalValue": 12.5,
          "originalQualityFlag": "V",
          "isProvisional": null,
          "sourceUpdatedAt": "2026-01-06T19:05:00.000Z",
          "revision": 1,
          "plausibilityFlags": []
        },
        {
          "observedAt": "2026-01-06T08:00:00.000Z",
          "localDate": "2026-01-06",
          "value": null,
          "flag": null,
          "qualityFlag": "S",
          "originalValue": 12.9,
          "originalQualityFlag": "V",
          "isProvisional": null,
          "sourceUpdatedAt": null,
          "revision": 2,
          "plausibilityFlags": []
        }
      ]
    }
  ],
  "meta": { "generatedAt": "2026-10-23T21:20:00.000Z" }
}
```

The second reading is shown as the source blanked it, to illustrate a missing value. A range with no data answers `200` with an empty `data` array.

### Reading a reading

- `value` is `null` for the second reading: the source marked it suspect (`qualityFlag` `S`) and reported no value. `originalValue` keeps what was first received, so the evidence is not lost.
- `flag` and `qualityFlag` are the source's letters; `isProvisional` is `true` only when the flag says provisional and `false` only when it says reviewed.
- `plausibilityFlags` lists the checks a reading failed, such as a spike that reverses or a pillow reset to zero: Snotel's verdict that a sensor fault likely produced the value, which is still exactly what the source sent. An empty list means it passed every check. A missing value is never judged as zero. See [quality](https://opensnotel.com/docs/data/quality.md#plausibility-flags) for the checks and their thresholds. Latest readings carry the same field.
- `revision` counts the times Snotel stored a changed value for this reading, and `sourceUpdatedAt` is when the source last revised it. A reading you fetched yesterday for a recent day may differ today.
- A daily reading covers the whole local day; `observedAt` is its start. An hourly reading is the hour starting at `observedAt`.

## Next

- [Measurements](https://opensnotel.com/docs/data/measurements.md): What snow water equivalent (SWE), snow depth, precipitation and air temperature are, their element codes and units, how daily and hourly differ, and why null is never zero.
- [Time and dates](https://opensnotel.com/docs/reference/time.md): How timestamps work: observedAt in UTC, localDate at the station's fixed offset with no daylight saving, daily vs hourly periods, and the water year that starts October 1.

Canonical page: https://opensnotel.com/docs/api/observations
