API Documentation
Programmatic access to near real-time METAR-sourced weather station data, predictions, and historical observations.
All values use metric units — temperatures in °C, wind in km/h, pressure in hPa, precipitation in mm. Timestamps are station-local (each response includes a timezone field); dates are YYYY-MM-DD. Nullable fields return null when data is unavailable.
Authentication
All API endpoints require a Pro plan and a valid API key. Generate keys from your Account page.
Include your key in the Authorization header:
curl -H "Authorization: Bearer dh_live_xxxxx" \ https://dailyhigh.app/api/v1/stations
Keys are prefixed with dh_live_. Store them securely — you can create up to 5 active keys and revoke them at any time.
Rate Limits
Rate limits are applied per API key using a sliding 60-second window. Every response includes these headers:
| Header | Description |
|---|---|
| X-RateLimit-Limit | Maximum requests allowed per window |
| X-RateLimit-Remaining | Requests remaining in the current window |
| X-RateLimit-Reset | Seconds until the window resets |
| Retry-After | Only on 429 — seconds to wait before retrying |
| Endpoint | Limit | Cache TTL |
|---|---|---|
| /api/v1/weather/:icao | 120 req/min | ~15 s |
| /api/v1/stations | 30 req/min | 1 h (static metadata) |
| /api/v1/prediction/:icao | 60 req/min | ~2 min (30 min stale) |
| /api/v1/history/:icao/:date | 60 req/min | 15 s (today) · 1 h (past) |
Endpoints
/api/v1/stations30 req/minReturns metadata for every tracked METAR-reporting station, identified by 4-letter ICAO airport codes. Codes are uppercase in responses but accepted case-insensitively in requests. Use this endpoint to discover all available stations before calling other endpoints.
curl -H "Authorization: Bearer dh_live_xxxxx" \ https://dailyhigh.app/api/v1/stations
{
"ok": true,
"data": [
{
"icao": "EGLC",
"name": "London",
"country": "gb",
"timezone": "Europe/London",
"region": "maritime",
"latitude": 51.505,
"longitude": 0.055,
"elevation": 5.8,
"peakHour": 15
}
]
}| Field | Type | Description |
|---|---|---|
| icao | string | ICAO airport code identifying the weather station (e.g. "EGLC"). |
| name | string | Human-readable station/city name (e.g. "London"). |
| country | string | Two-letter ISO 3166-1 country code, lowercase (e.g. "gb"). |
| timezone | string | IANA timezone of the station (e.g. "Europe/London"). Use this to interpret any local timestamps. |
| region | string | Climate region classification. One of: "desert", "coastal", "continental", "maritime", "tropical". |
| latitude | number | Station latitude in decimal degrees (WGS-84). Positive = north. |
| longitude | number | Station longitude in decimal degrees (WGS-84). Positive = east. |
| elevation | number | null | Station elevation above mean sea level in metres. |
| peakHour | number | Typical hour (0–23, local time) when the daily maximum temperature occurs. Seasonally adjusted ±0.5 h. |
/api/v1/weather/:icao120 req/minComprehensive current weather for a single station, sourced from METAR observations. Includes full atmospheric observation, today's observed extremes, sun times, station metadata, and today's forecast. Data is cached for ~15 seconds — polling faster returns the same snapshot.
| Field | Type | Description |
|---|---|---|
| :icao | string | ICAO airport code, case-insensitive (e.g. "EGLC" or "eglc"). |
curl -H "Authorization: Bearer dh_live_xxxxx" \ https://dailyhigh.app/api/v1/weather/EGLC
{
"ok": true,
"data": {
"icao": "EGLC",
"name": "London",
"country": "gb",
"timezone": "Europe/London",
"region": "maritime",
"latitude": 51.505,
"longitude": 0.055,
"elevation": 5.8,
"peakHour": 15,
"temperature": 8.2,
"feelsLike": 6.1,
"dewPoint": 4.3,
"humidity": 72,
"windSpeed": 15,
"windGust": 24,
"windDirection": "SW",
"windDirectionDeg": 220,
"pressure": 1018.5,
"pressureTrend": "Falling",
"visibility": 14.0,
"uvIndex": 2,
"uvDescription": "Low",
"cloudCover": 50,
"cloudCeiling": 1200,
"precip1Hour": 0,
"precip24Hour": 2.4,
"conditions": "Partly Cloudy",
"icon": "⛅",
"dayOrNight": "D",
"observationTime": "2026-02-10T14:20:00+00:00",
"todayMax": 9.1,
"todayMin": 4.3,
"tempChange24h": 1.5,
"sunrise": "2026-02-10T07:24:00",
"sunset": "2026-02-10T17:05:00",
"forecast": { "maxTemp": 10, "minTemp": 3 }
}
}| Field | Type | Description |
|---|---|---|
| icao | string | ICAO station code. |
| name | string | Station/city name. |
| country | string | ISO 3166-1 country code (lowercase). |
| timezone | string | IANA timezone. All "local" fields use this timezone. |
| region | string | Climate region: "desert" | "coastal" | "continental" | "maritime" | "tropical". |
| latitude | number | Station latitude (decimal degrees, WGS-84). |
| longitude | number | Station longitude (decimal degrees, WGS-84). |
| elevation | number | null | Elevation above MSL in metres. |
| peakHour | number | Typical hour of daily max temperature (local time, 0–23). |
| temperature | number | null | Current observed air temperature in °C. |
| feelsLike | number | null | "Feels like" temperature in °C. Combines wind chill and heat index. |
| dewPoint | number | null | Dew point temperature in °C. |
| humidity | number | null | Relative humidity percentage (0–100). |
| windSpeed | number | null | Sustained wind speed in km/h. |
| windGust | number | null | Wind gust speed in km/h. Null if no gust reported. |
| windDirection | string | null | Cardinal wind direction (e.g. "NW", "SSE"). |
| windDirectionDeg | number | null | Wind direction in degrees (0–360, 0 = north, clockwise). |
| pressure | number | null | Mean sea-level pressure (QNH) in hPa (mbar). Comparable across stations regardless of elevation. |
| pressureTrend | string | null | Pressure trend: "Rising", "Falling", or "Steady". |
| visibility | number | null | Horizontal visibility in km. |
| uvIndex | number | null | UV index (0–11+). Null during nighttime hours — check dayOrNight to distinguish. |
| uvDescription | string | null | UV severity label (e.g. "Low", "Moderate", "High", "Very High", "Extreme"). |
| cloudCover | number | null | Cloud cover percentage (0–100). |
| cloudCeiling | number | null | Cloud ceiling height in metres. Null if sky is clear. |
| precip1Hour | number | null | Precipitation in the last 1 hour in mm. |
| precip24Hour | number | null | Precipitation in the last 24 hours in mm. |
| conditions | string | null | Human-readable weather condition (e.g. "Partly Cloudy", "Light Rain"). |
| icon | string | Weather emoji derived from current conditions (e.g. "☀️", "🌧️", "☁️", "❄️"). Day/night aware: clear skies return "🌙" after dark. |
| dayOrNight | string | null | "D" for day, "N" for night, based on local sunrise/sunset. |
| observationTime | string | ISO 8601 timestamp with UTC offset (e.g. "2026-02-10T14:20:00+00:00"). Use the timezone field for local conversion. |
| todayMax | number | null | Highest observed temperature today in °C. Resets at local midnight; may be null early morning before the first observation. |
| todayMin | number | null | Lowest observed temperature today in °C. Resets at local midnight; may be null early morning before the first observation. |
| tempChange24h | number | null | Temperature change vs. 24 hours ago in °C. Positive = warmer. |
| sunrise | string | null | Today's sunrise in station-local time (no offset suffix). Use the timezone field to interpret. |
| sunset | string | null | Today's sunset in station-local time (no offset suffix). Use the timezone field to interpret. |
| forecast | object | null | Today's forecast. Null if unavailable. |
| Field | Type | Description |
|---|---|---|
| forecast.maxTemp | number | Forecasted daily maximum temperature in °C. |
| forecast.minTemp | number | Forecasted daily minimum temperature in °C. |
/api/v1/prediction/:icao60 req/minToday's daily-high temperature prediction with confidence score and reasoning. Re-computed every ~2 minutes. Returns 202 if not yet available this cycle (retry after 30 s). A top-level 'stale: true' flag means data is from a previous cycle (up to 30 min old) while a fresh prediction is being computed.
| Field | Type | Description |
|---|---|---|
| :icao | string | ICAO airport code, case-insensitive. |
curl -H "Authorization: Bearer dh_live_xxxxx" \ https://dailyhigh.app/api/v1/prediction/EGLC
{
"ok": true,
"data": {
"currentTemp": 8.2,
"observedMax": 9.1,
"predictedMax": 10.3,
"forecastMax": 10.0,
"modelMax": 10.1,
"climoMax": 9.5,
"confidence": 7,
"predictionReason": "Warming trend",
"reasoning": [
"About 4h until peak warming",
"Temperatures still climbing",
"Observed temps tracking close to prediction"
],
"isPastPeak": false,
"hoursUntilPeak": 3.5,
"slope": 1.2,
"slopeWindow": "90 min"
}
}| Field | Type | Description |
|---|---|---|
| currentTemp | number | Current temperature at the station in °C. |
| observedMax | number | Highest temperature observed so far today in °C. |
| predictedMax | number | DailyHigh's prediction for today's maximum temperature in °C. Updated every ~2 minutes using the latest observations and near real-time trajectory. |
| forecastMax | number | Third-party forecast max for today in °C. |
| modelMax | number | null | Numerical weather model max in °C, bias-corrected for the station. |
| climoMax | number | null | Climatological average daily high for this date and station in °C. |
| confidence | number | Confidence score from 1 (low) to 10 (high). Rises through the day as more observations arrive and models converge. |
| predictionReason | string | Short one-line summary of the prediction logic (e.g. "Warming trend", "Near peak"). |
| reasoning | string[] | Array of human-readable reasoning lines with emoji prefixes, explaining the prediction factors. |
| isPastPeak | boolean | Whether the station has likely passed its daily temperature peak. Based on solar noon and the temperature trajectory. |
| hoursUntilPeak | number | Estimated hours remaining until the daily temperature peak. 0 if past peak. Uses station-local solar time. |
| slope | number | null | Temperature rate of change in °C/hour over the last 90 minutes. Positive = warming, negative = cooling. |
| slopeWindow | string | null | Description of the window used for slope calculation (e.g. "90 min"). |
/api/v1/history/:icao/:date60 req/minHourly weather observations for a station on a specific date. Returns the full 24-hour profile with max/min summary and sun times.
| Field | Type | Description |
|---|---|---|
| :icao | string | ICAO airport code, case-insensitive. |
| :date | string | Calendar date in YYYY-MM-DD format, in the station's local timezone. Use today's date for live intra-day data. |
curl -H "Authorization: Bearer dh_live_xxxxx" \ https://dailyhigh.app/api/v1/history/EGLC/2026-02-09
{
"ok": true,
"data": {
"date": "2026-02-09",
"icao": "EGLC",
"name": "London City",
"timezone": "Europe/London",
"maxTemp": 9.8,
"minTemp": 3.2,
"sunrise": "2026-02-09T07:24:00",
"sunset": "2026-02-09T17:05:00",
"forecast": { "maxTemp": 10, "minTemp": 3 },
"hourly": [
{
"time": "2026-02-09T00:00:00",
"temperature": 4.1,
"conditions": "Clear",
"humidity": 85,
"windSpeed": 8
}
]
}
}| Field | Type | Description |
|---|---|---|
| date | string | The requested date in YYYY-MM-DD format (station-local calendar date). |
| icao | string | ICAO station code. |
| name | string | Station name. |
| timezone | string | IANA timezone of the station. All times in the hourly array are in this timezone. |
| maxTemp | number | null | Observed daily maximum temperature in °C for the requested date. |
| minTemp | number | null | Observed daily minimum temperature in °C for the requested date. |
| sunrise | string | null | Sunrise time as an ISO 8601 string in station-local time. |
| sunset | string | null | Sunset time as an ISO 8601 string in station-local time. |
| forecast | object | The forecast that was issued for this date. |
| hourly | object[] | Array of hourly observations ordered chronologically. |
| Field | Type | Description |
|---|---|---|
| forecast.maxTemp | number | Forecasted daily maximum temperature in °C. |
| forecast.minTemp | number | Forecasted daily minimum temperature in °C. |
| Field | Type | Description |
|---|---|---|
| hourly[].time | string | ISO 8601 timestamp in station-local time, without offset (e.g. "2026-02-09T14:00:00"). Aligned to whole hours. |
| hourly[].temperature | number | null | Observed temperature at this hour in °C. |
| hourly[].conditions | string | null | Weather condition string (e.g. "Clear", "Overcast"). |
| hourly[].humidity | number | null | Relative humidity percentage (0–100). |
| hourly[].windSpeed | number | null | Wind speed in km/h. |
💡 For today's date, the hourly array grows throughout the day and is cached for ~15 seconds.
💡 For past dates, the full 24-hour array is returned and cached for 1 hour.
💡 All timestamps in the hourly array are in the station's local timezone without an offset suffix — use the top-level timezone field to interpret them.
💡 sunrise and sunset are also in station-local time.
Error Responses
Error responses use the shape { "error": "Human-readable message" }. The HTTP status code indicates the error category:
| Status | Meaning | When |
|---|---|---|
| 202 | Accepted | Prediction not yet cached — retry in 30 s (prediction endpoint only) |
| 400 | Bad Request | Invalid date format or malformed parameters |
| 401 | Unauthorized | Missing / invalid API key, or account is not on the Pro plan |
| 404 | Not Found | ICAO code does not match a tracked station |
| 429 | Too Many Requests | Rate limit exceeded — check Retry-After header |
| 500 | Server Error | Upstream data source failure — safe to retry |