---
navigation: false
title: 'Forecast snapshot history'
description: 'GET /api/v1/weather/{mountainId}/history — Forecast snapshot history.'
---

`GET /api/v1/weather/{mountainId}/history`

List available forecast snapshot metadata for a mountain point/model. This route does not return archived hourly/daily forecast values.

## Authentication

An API key is required for external integrations. Send `X-API-Key: YOUR_API_KEY` or `Authorization: Bearer YOUR_API_KEY`. [Authentication](/docs/getting-started/authentication) explains public origin and secret IP restrictions.

::warning
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

| Parameter    | Type   | Required | Default | Description                 |
| ------------ | ------ | -------- | ------- | --------------------------- |
| `mountainId` | string | Yes      | —       | Mountain UUID. Format: uuid |

### Query parameters

| Parameter | Type    | Required | Default      | Description                                                            |
| --------- | ------- | -------- | ------------ | ---------------------------------------------------------------------- |
| `role`    | string  | No       | `resort`     | Forecast point role. Accepted: `resort`, `base`, `mid`, `summit`       |
| `model`   | string  | No       | `gfs_global` | Stored model product; availability varies. Pattern `^[a-z0-9_]{1,80}$` |
| `limit`   | integer | No       | `20`         | Snapshot metadata limit. Min 1; Max 100                                |

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

::code-group

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

```js [JavaScript]
const response = await fetch(
  'https://api.icecoast.us/api/v1/weather/00000000-0000-4000-8000-000000000001/history',
  {
    headers: { 'X-API-Key': process.env.ICECOAST_API_KEY },
  }
);
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const result = await response.json();
console.log(result);
```

```python [Python]
import os
import requests

response = requests.get(
    'https://api.icecoast.us/api/v1/weather/00000000-0000-4000-8000-000000000001/history',
    headers={'X-API-Key': os.environ['ICECOAST_API_KEY']},
    timeout=30,
)
response.raise_for_status()
print(response.json())
```

::

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.

```json
{
  "success": true,
  "data": [
    {
      "snapshot_id": "example-snapshot",
      "fetched_at": "2026-12-04T12:00:00Z",
      "valid_from": "2026-12-04T00:00:00Z",
      "valid_to": "2026-12-05T00:00:00Z",
      "snapshot_kind": "forecast",
      "content_hash": "example-fingerprint"
    }
  ],
  "meta": {
    "version": "v1"
  }
}
```

### Resource fields

| Field           | Type             | Meaning                                   |
| --------------- | ---------------- | ----------------------------------------- |
| `snapshot_id`   | integer / string | See the data model and returned resource. |
| `fetched_at`    | string           | Retrieval time.                           |
| `valid_from`    | string           | Validity start.                           |
| `valid_to`      | string           | Validity end.                             |
| `snapshot_kind` | string           | Snapshot category.                        |
| `content_hash`  | string           | Content fingerprint.                      |

Record fields may be missing or null. Treat identifiers as opaque and distinguish unavailable values from confirmed false/zero. See [data semantics](/docs/concepts/data-model).

## Errors

| HTTP status | Meaning                                                                    |
| ----------- | -------------------------------------------------------------------------- |
| 400         | Invalid request parameters where validated.                                |
| 401         | Missing, invalid, expired or revoked API key.                              |
| 403         | Origin/IP restriction or endpoint key-type restriction denied the request. |
| 404         | Weather is not available for this mountain point.                          |
| 429         | Monthly API allowance exhausted when a key is used.                        |
| 503         | Weather 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](/docs/concepts/errors).

## Related resources

- [Mountain forecast](/docs/reference/weather/forecast)
- [Resort-reported weather](/docs/reference/weather/reported)

- [Data freshness](/docs/concepts/freshness)
- [OpenAPI specification](/openapi.json){external}
