Mountain forecast

GET /api/v1/weather/{mountainId} — Mountain forecast.

GET /api/v1/weather/{mountainId}

Retrieve stored modeled forecasts for an available mountain point/model. This is not a live weather-station observation.

Authentication

An API key is required for external integrations. Send X-API-Key: YOUR_API_KEY or Authorization: Bearer YOUR_API_KEY. Authentication explains public origin and secret IP restrictions.

Weather is optional and may be unavailable in your deployment. A route-level 404 does not prove that a mountain has no weather observations.

Parameters

Path parameters

ParameterTypeRequiredDefaultDescription
mountainIdstringYes—Mountain UUID. Format: uuid

Query parameters

ParameterTypeRequiredDefaultDescription
rolestringNoresortForecast point role. Accepted: resort, base, mid, summit
modelstringNogfs_globalStored model product; availability varies. Pattern ^[a-z0-9_]{1,80}$

Optional resource, not enabled in every deployment; unavailable routes return 404. Stored reads never trigger collection. Successful responses: Cache-Control: public, max-age=60, stale-if-error=300. Forecast stale is true when age/data age exceeds 12 hours or a recent current forecast hour is absent. Reported weather is source evidence, separate from modeled forecasts; unknown source age or age over 24 hours is stale. History returns metadata only, with no offset pagination.

Example request

curl -H "X-API-Key: $ICECOAST_API_KEY" 'https://api.icecoast.us/api/v1/weather/00000000-0000-4000-8000-000000000001'

JavaScript above is a server-side Node.js example. Browser clients must use an origin-restricted public key; never bundle a secret key.

Response

Success is HTTP 200 with success: true, data and meta.version: "v1".

The following is a synthetic response excerpt illustrating the verified structure. Names, IDs, counts and dates are examples, not live resort data. Optional fields are omitted.

{
  "success": true,
  "data": {
    "mountain_id": "00000000-0000-4000-8000-000000000001",
    "snapshot_id": "example-snapshot",
    "product": "gfs_global",
    "point": "resort",
    "fetched_at": "2026-12-04T12:00:00Z",
    "first_fetched_at": "2026-12-04T12:00:00Z",
    "initialized_at": null,
    "age_seconds": 0,
    "data_age_seconds": 0,
    "stale": true,
    "current": null,
    "hourly": [],
    "daily": [],
    "metadata": {}
  },
  "meta": {
    "version": "v1"
  }
}

Resource fields

FieldTypeMeaning
mountain_idstringMountain UUID.
snapshot_idstring / integerSee the data model and returned resource.
productstringStored model product.
pointstringresort/base/mid/summit.
locationobjectForecast location.
fetched_atstringLatest retrieval.
first_fetched_atstringFirst retrieval of this snapshot.
initialized_atstring / nullProvider initialization.
data_age_secondsintegerSee the data model and returned resource.
age_secondsintegerSee the data model and returned resource.
stalebooleanSee the data model and returned resource.
currentobject / nullSee the data model and returned resource.
hourlyarraySee the data model and returned resource.
dailyarraySee the data model and returned resource.
metadataobjectProvider/collection metadata.

Record fields may be missing or null. Treat identifiers as opaque and distinguish unavailable values from confirmed false/zero. See data semantics.

Errors

HTTP statusMeaning
400Invalid request parameters where validated.
401Missing, invalid, expired or revoked API key.
403Origin/IP restriction or endpoint key-type restriction denied the request.
404Weather is not available for this mountain point.
429Monthly API allowance exhausted when a key is used.
503Weather temporarily unavailable.

JSON errors may use error or message; the global handler maps validation/runtime errors to success: false, error (name) and message (details). See error handling.