Skip to content
Open Snotel home
API

Nearest stations

Find the SNOTEL stations nearest a latitude and longitude, or nearest another station, ranked by great-circle distance, with limit and radius filters.

GET /api/v1/stations/nearest ranks stations by distance from a point.

ParameterMeaning
latLatitude in degrees north, -90 to 90. Required.
lngLongitude in degrees east, -180 to 180. Required.
limitStations to return, 1 to 25. Default 5.
radiusKmOnly stations within this distance, up to 500. Default 500.
networkNetwork code. Default SNTL.
activetrue (default) for active stations only, false to include all.
providerWhich provider's stations to rank, by code. Default nrcs.
curl 'https://opensnotel.com/api/v1/stations/nearest?lat=44.31&lng=-115.2&limit=1'
{
  "data": [
    {
      "station": {
        "id": "312:ID:SNTL",
        "name": "Banner Summit",
        "stateCode": "ID",
        "networkCode": "SNTL",
        "latitude": 44.30342,
        "longitude": -115.23447,
        "elevationFt": 7040,
        "utcOffsetMinutes": -480,
        "isActive": true,
        "periodOfRecord": { "start": "1979-10-01", "end": null }
      },
      "distanceKm": 2.839
    }
  ],
  "query": { "lat": 44.31, "lng": -115.2, "limit": 1, "radiusKm": 500 },
  "meta": { "generatedAt": "2026-10-23T21:20:00.000Z" }
}

Near a station

GET /api/v1/stations/{station}/nearby ranks the stations around a station you already have, so you don't need its coordinates. It returns active SNTL stations in any state, never the station itself, each with its distanceKm from it.

ParameterMeaning
limitStations to return, 1 to 25. Default 5.
radiusKmOnly stations within this distance, up to 500. Default 500.
curl 'https://opensnotel.com/api/v1/stations/312:ID:SNTL/nearby?limit=1&radiusKm=80'
{
  "station": "312:ID:SNTL",
  "data": [
    {
      "station": {
        "id": "550:ID:SNTL",
        "name": "Jackson Peak",
        "stateCode": "ID",
        "networkCode": "SNTL",
        "latitude": 44.05092,
        "longitude": -115.44322,
        "elevationFt": 7060,
        "utcOffsetMinutes": -480,
        "isActive": true,
        "periodOfRecord": { "start": "1979-10-01", "end": null }
      },
      "distanceKm": 32.641
    }
  ],
  "query": { "limit": 1, "radiusKm": 80 },
  "meta": { "generatedAt": "2026-10-23T21:20:00.000Z" }
}

data is empty when no station is within the radius, or when the station has no coordinates to measure from. An unknown station is a 404 (station_not_found). A different station at the same coordinates is a neighbor, 0 km away.

How distance is measured

distanceKm is the great-circle distance in kilometres on a spherical Earth (the haversine formula), from the point you gave (or the station you named) to the station's coordinates. It is a straight line over the surface, not a travel distance and not a measure of whether the station is on the same side of a ridge. Stations without coordinates are left out.

Results are deterministic: nearest first, and stations at the same distance order by triplet. The ranking covers every station of the network, so a station never drops out because of how the catalog is paged.

Use the returned id with observations to read what each station is measuring now.