KTML WEATHER DOCUMENTATION

Personal-use API

Read-only JSON endpoints for the operator's own private applications and same-origin site features.

Connection

GET https://weather.ktml.space/api/v1/health
Accept: application/json

Successful JSON responses use UTF-8. Read-only and bounded historical JSON routes allow 60 requests per minute with a burst of 20. Archive navigation and generated media have separate edge limits sized for interactive timelines and video playback.

The API is for a single person’s reasonable use in their own private applications. It is not a data origin for another public website, hosted dashboard, widget, feed, mirror, resale product, or bulk archive. Browser requests are same-origin only: no cross-origin access headers are emitted and explicit cross-site browser requests are rejected. Personal native or server-side clients can call the API directly within the published limits. See the Terms of Use.

Same-origin KTML pages and the two health routes do not require credentials. Other native or server-side clients must send the operator’s private token as Authorization: Bearer <token>. Never put that token in a public webpage, client bundle, URL, log, or shared repository.

GET /api/v1/station/current HTTP/1.1
Host: weather.ktml.space
Accept: application/json
Authorization: Bearer YOUR_PRIVATE_TOKEN

Endpoints

ROUTERESULTCACHE
/api/health.jsonWeb-process livenessNo store
/api/v1/healthAPI, database, station, and camera healthNo store
/api/v1/conditionsCurrent observation, NWS delta, and Realistic Expectation reportNo store
/api/v1/forecast?hours=48Detailed periods and 24/48-hour forecasts with source freshness1 minute
/api/v1/messagesActive public messages and revisions15 seconds
/api/v1/stationPublic station metadata5 minutes
/api/v1/station/currentLatest normalized observationNo store
/api/v1/station/statusStation and camera freshnessNo store
/api/v1/station/historyBounded aggregate history30 seconds
/api/v1/station/dailyDaily almanac and prior-day comparison1 minute
/api/v1/station/sensorsPrivacy-safe sensor inventory5 minutes
/api/v1/air-quality/currentPreliminary AQI with per-pollutant freshness1 minute
/api/v1/air-quality/history?hours=24Bounded 1-168 hour AQI history5 minutes
/api/v1/alertsVerified NWS alerts with direct-source fallback15 seconds
/api/v1/thunderNWS thunder and detector freshness1 minute
/api/v1/camerasCamera identities and latest archive timestamps1 minute
/api/v1/cameras/{camera}/framesBounded frame list1 minute
/api/v1/cameras/nearFrames nearest an ISO timestamp5 minutes
/api/v1/timelapses/latestPer-camera rolling editions and publication targets15 seconds
/api/v1/archive/calendarProtected recent/year/month/day index1 minute
/api/v1/archive/dayProtected daily camera/video/weather summary1 minute
/api/v1/archive/atProtected exact-time frame and weather match1 minute

Air and storms

GET /api/v1/air-quality/current

GET /api/v1/air-quality/history?hours=24

GET /api/v1/alerts

GET /api/v1/thunder

AirNow data is preliminary. The thunder response keeps NWS probability/alerts separate from fields supplied by a compatible on-site Ambient lightning detector. Provider credentials and raw payloads remain server-side. Freshness separates observation or issue time from successful provider retrieval and response generation. Alert checked_at is response time; last_verified_at is the last successful upstream check.

History examples

GET /api/v1/station/history?range=24h&metrics=temperature_f,dew_point_f

GET /api/v1/station/history?range=7d&metrics=temperature_f&compare=previous

GET /api/v1/cameras/north/frames?from=2026-08-22T00:00:00Z&to=2026-08-23T00:00:00Z&limit=100
GET /api/v1/cameras/sky-wide/frames?from=2026-08-25T00:00:00Z&to=2026-08-26T00:00:00Z&limit=100

GET /api/v1/cameras/near?at=2026-08-23T02:15:00Z&tolerance=300

Station ranges are 6h, 24h, 7d, 30d, and 1y. Camera ranges are limited to 31 days and 500 frames per request.

Historical access

Archive JSON, derived historical frames, generated videos, and archive pages require a completed Anubis browser challenge. Canonical original frames have no public route. These endpoints are designed for the interactive archive, not bulk mirroring.

Errors

Invalid bounded requests return 400. Missing or incorrect personal-client credentials return 401. Disallowed cross-site browser use returns 403. Limits return 429 with Retry-After. Missing historical frames return 404. Temporary database or media failures return 503. Internal paths, raw Ambient payloads, device identifiers, and credentials are not returned.