# Typical weather and stored daily observations

> NOAA 1991–2020 daily normals and available NOAA GHCN-Daily observations for a metro reference airport.

Source: https://api.tailend.dev/docs/api/get-metro-climate

```http
GET https://api.tailend.dev/v1/{metro}/climate
X-API-Key: $TAILEND_API_KEY
```

NOAA 1991–2020 daily normals and available NOAA GHCN-Daily observations for a metro reference airport. Temperatures are Fahrenheit, precipitation and snowfall inches, probabilities percent (precipitation ≥0.01 inch, snowfall ≥0.1 inch). These are climate statistics, not forecasts. Use date or both from and to (inclusive, at most 31 days). Missing values are null; dates without any available data are omitted. Actuals appear only for past dates in the metro timezone. Last year means the same month and day; February 29 has no substitute in a non-leap year. Private caching for one day, ETag revalidation supported.

Authorization: send your key in the `X-API-Key` header. Available on every plan.

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `metro` | string | yes | Metro slug from /v1/metros (e.g. philadelphia). |

## Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `date` | string (date) | no | Single date; mutually exclusive with from/to. |
| `from` | string (date) | no | Inclusive range boundary; both from and to required. |
| `to` | string (date) | no | Inclusive range boundary; both from and to required. |

## Example request

```bash
curl -sS \
  -H "X-API-Key: $TAILEND_API_KEY" \
  "https://api.tailend.dev/v1/philadelphia/climate"
```

## Responses

### 200

Available climate dates; empty data when none are stored.

```json
{
  "data": [
    {
      "date": "2026-02-28",
      "normal": {
        "normal_hi_f": 47.5,
        "normal_lo_f": 30,
        "precip_prob": 34,
        "snow_prob": 10,
        "source": "NOAA normals 1991–2020",
        "station_id": "USW00013739"
      },
      "actual": null,
      "last_year_actual": null
    }
  ],
  "meta": {
    "metro": "philadelphia",
    "from": "2026-02-28",
    "to": "2026-02-28",
    "station_id": "USW00013739",
    "station_status": "mapped",
    "empty": false
  }
}
```

### 304

Not modified; no body.

```json
null
```

### 400

Malformed or contradictory parameters (lat without lng, to before from, unknown category), or a cursor this API did not issue for this exact request — replayed from another endpoint, resource, metro or filter set, hand-crafted, or altered.

```json
{
  "error": {
    "code": "bad_request",
    "message": "radius_m: must be at least 100",
    "details": {
      "param": "radius_m"
    },
    "request_id": "req_dfbc3295a8382b05"
  }
}
```

### 401

Missing, unknown or revoked X-API-Key.

```json
{
  "error": {
    "code": "unauthorized",
    "message": "missing X-API-Key header",
    "request_id": "req_90e63908273f6bff"
  }
}
```

### 403

Two different reasons share this status.

```json
{
  "error": {
    "code": "forbidden",
    "message": "key is not scoped to metro 'boston'",
    "details": {
      "metros": [
        "philadelphia"
      ]
    },
    "request_id": "req_9e7a750acef48ab2"
  }
}
```

### 404

No published, active resource with that id (or unknown metro).

```json
{
  "error": {
    "code": "not_found",
    "message": "unknown metro 'boston'",
    "request_id": "req_7431b51e10ec2b77"
  }
}
```

### 405

The path exists; the method does not.

```json
{
  "error": {
    "code": "method_not_allowed",
    "message": "POST is not allowed on this path; this API is read-only",
    "details": {
      "allow": [
        "GET",
        "HEAD",
        "OPTIONS"
      ]
    },
    "request_id": "req_01J9Z3"
  }
}
```

### 429

A limit was reached.

```json
{
  "error": {
    "code": "rate_limited",
    "message": "3 requests per minute exceeded",
    "request_id": "req_06bfd3c2d5e8aa9f"
  }
}
```

### 500

A bug on our side.

```json
{
  "error": {
    "code": "internal",
    "message": "internal error",
    "request_id": "req_01J9Z3"
  }
}
```

### 501

This endpoint or feature is not available and will not become available without a configuration change — for ?address=, this means no geocoder is configured.

```json
{
  "error": {
    "code": "not_implemented",
    "message": "this endpoint is not enabled on this deployment; it is not a fault and retrying will not help",
    "request_id": "req_01J9Z3"
  }
}
```

### 503

A transient outage: a dependency could not be reached or did not answer in time.

```json
{
  "error": {
    "code": "unavailable",
    "message": "the service is temporarily unable to serve this request; retry after the interval in Retry-After",
    "request_id": "req_01J9Z3"
  }
}
```
