# NWS on Onekey > 13 endpoints for NWS (13 stable, 0 beta), 1 to 5 credits each. Category: Maps, weather & space. One key, one JSON shape. Base URL: https://api.onekey.dev Auth: header `x-api-key: `. Call shape: `GET /v1/{platform}/{endpoint}?{params}`. Every response is `{success, data, metadata, error}`; check `success` first. Cost is in `metadata.credits_charged`. Free when served from cache (0.2 credit for a cached response over 100 KB). Failed and not-found calls are refunded. Status: stable = verified against the live source; beta = not yet verified, fields may be missing. Page: https://onekey.dev/platforms/nws Reference (Markdown): https://onekey.dev/docs/api/nws.md All docs: https://onekey.dev/llms.txt ## Canonical fields returned Unified-schema fields (same names on every platform), with how many of the 13 mapped NWS endpoints return each: - `entity.name` (string): 13 - `entity.id` (string): 11 - `entity.category` (string): 8 - `entity.date` (ISO 8601 date): 5 - `entity.description` (string): 5 - `place.timeZone` (string): 5 - `content.createdAt` (ISO 8601 date): 4 - `entity.url` (URL): 4 - `place.elevationM` (number): 3 - `place.lat` (number): 3 - `place.lon` (number): 3 - `author.displayName` (string): 2 - `content.text` (string): 2 - `media.thumbnailUrl` (URL): 2 - plus 24 platform-specific fields under `ext.` ## Endpoints ### nws.alert_types All NWS alert event types. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/nws/alert_types` with header `x-api-key: YOUR_API_KEY` - Parameters: none - Fields returned: `entity.name` - Reference: https://onekey.dev/docs/api/nws/alert_types.md ### nws.alerts_point Active weather alerts covering a US point. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/nws/alerts_point?lat=39.7456&lon=-97.0892` with header `x-api-key: YOUR_API_KEY` - Parameters: - `lat` (string, required): Latitude (max 4 decimals) - `lon` (string, required): Longitude (max 4 decimals) - Fields returned: `entity.id`, `entity.name`, `entity.description`, `entity.category`, `author.displayName`, `content.createdAt`, `entity.date`, `content.text`, `ext.urgency`, `ext.certainty`, `ext.areaDesc`, `ext.expires`, `ext.instruction` - Reference: https://onekey.dev/docs/api/nws/alerts_point.md ### nws.alerts_state Active weather alerts for a US state/territory (2-letter code). - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/nws/alerts_state?area=KS` with header `x-api-key: YOUR_API_KEY` - Parameters: - `area` (string, required): State/territory code, UPPERCASE (e.g. KS) - Fields returned: `entity.id`, `entity.name`, `entity.description`, `entity.category`, `author.displayName`, `content.createdAt`, `entity.date`, `content.text`, `ext.urgency`, `ext.certainty`, `ext.areaDesc`, `ext.expires`, `ext.instruction` - Reference: https://onekey.dev/docs/api/nws/alerts_state.md ### nws.forecast 12-hour period forecast (7 days) for an NWS grid point. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/nws/forecast?office=TOP&x=31&y=80` with header `x-api-key: YOUR_API_KEY` - Parameters: - `office` (string, required): Forecast office / WFO id, UPPERCASE (e.g. TOP) - `x` (string, required): Grid X - `y` (string, required): Grid Y - Fields returned: `entity.id`, `entity.name`, `entity.date`, `content.createdAt`, `entity.category`, `entity.description`, `media.thumbnailUrl`, `ext.isDaytime`, `ext.temperature`, `ext.temperatureUnit`, `ext.windSpeed`, `ext.windDirection`, `ext.precipProbabilityPct` - Reference: https://onekey.dev/docs/api/nws/forecast.md ### nws.forecast_hourly Hourly forecast (156 h) for an NWS grid point. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/nws/forecast_hourly?office=TOP&x=31&y=80` with header `x-api-key: YOUR_API_KEY` - Parameters: - `office` (string, required): Forecast office / WFO id, UPPERCASE (e.g. TOP) - `x` (string, required): Grid X - `y` (string, required): Grid Y - Fields returned: `entity.id`, `entity.name`, `entity.date`, `content.createdAt`, `entity.category`, `entity.description`, `media.thumbnailUrl`, `ext.isDaytime`, `ext.temperature`, `ext.temperatureUnit`, `ext.windSpeed`, `ext.windDirection`, `ext.precipProbabilityPct` - Reference: https://onekey.dev/docs/api/nws/forecast_hourly.md ### nws.glossary NWS weather glossary (term and definition). - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/nws/glossary` with header `x-api-key: YOUR_API_KEY` - Parameters: none - Fields returned: `entity.name`, `entity.description` - Reference: https://onekey.dev/docs/api/nws/glossary.md ### nws.grid_stations Observation stations near an NWS grid point. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/nws/grid_stations?office=TOP&x=31&y=80` with header `x-api-key: YOUR_API_KEY` - Parameters: - `office` (string, required): Forecast office / WFO id, UPPERCASE (e.g. TOP) - `x` (string, required): Grid X - `y` (string, required): Grid Y - Fields returned: `entity.id`, `entity.name`, `place.timeZone`, `place.elevationM`, `place.lat`, `place.lon`, `entity.url` - Reference: https://onekey.dev/docs/api/nws/grid_stations.md ### nws.observation_latest Latest observation at a station (temperature, wind, pressure, humidity). - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/nws/observation_latest?station=KTOP` with header `x-api-key: YOUR_API_KEY` - Parameters: - `station` (string, required): Station id, UPPERCASE (e.g. KTOP) - Fields returned: `entity.id`, `entity.name`, `entity.category`, `entity.date`, `ext.temperatureC`, `ext.dewpointC`, `ext.windSpeedKmH`, `ext.windDirectionDeg`, `ext.pressurePa`, `ext.humidityPct`, `ext.visibilityM` - Reference: https://onekey.dev/docs/api/nws/observation_latest.md ### nws.point Resolve a US lat/lon to its NWS grid, forecast office, city and time zone. - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/nws/point?lat=39.7456&lon=-97.0892` with header `x-api-key: YOUR_API_KEY` - Parameters: - `lat` (string, required): Latitude (max 4 decimals) - `lon` (string, required): Longitude (max 4 decimals) - Fields returned: `entity.id`, `entity.name`, `entity.category`, `place.timeZone`, `entity.url`, `ext.gridX`, `ext.gridY`, `ext.radarStation`, `ext.forecastHourlyUrl`, `ext.cwa` - Reference: https://onekey.dev/docs/api/nws/point.md ### nws.product_types NWS text product types (code and name). - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/nws/product_types` with header `x-api-key: YOUR_API_KEY` - Parameters: none - Fields returned: `entity.id`, `entity.name` - Reference: https://onekey.dev/docs/api/nws/product_types.md ### nws.radar_stations NWS radar stations (WSR-88D and others). - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/nws/radar_stations` with header `x-api-key: YOUR_API_KEY` - Parameters: none - Fields returned: `entity.id`, `entity.name`, `entity.category`, `place.elevationM`, `place.timeZone`, `place.lat`, `place.lon` - Reference: https://onekey.dev/docs/api/nws/radar_stations.md ### nws.station One NWS observation station by id (e.g. KTOP). - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/nws/station?station=KTOP` with header `x-api-key: YOUR_API_KEY` - Parameters: - `station` (string, required): Station id, UPPERCASE (e.g. KTOP) - Fields returned: `entity.id`, `entity.name`, `place.timeZone`, `place.elevationM`, `place.lat`, `place.lon`, `entity.url` - Reference: https://onekey.dev/docs/api/nws/station.md ### nws.zone One NWS forecast zone by id (e.g. KSZ022). - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/nws/zone?zone=KSZ022` with header `x-api-key: YOUR_API_KEY` - Parameters: - `zone` (string, required): Zone id, UPPERCASE (e.g. KSZ022) - Fields returned: `entity.id`, `entity.name`, `entity.category`, `entity.url`, `place.timeZone`, `ext.zoneType` - Reference: https://onekey.dev/docs/api/nws/zone.md ## Sample request ```bash curl "https://api.onekey.dev/v1/nws/observation_latest?station=KTOP" \ -H "x-api-key: YOUR_API_KEY" ```